One of the first things that most people think when they open up their BBS02 kit is they take one look at the handbrakes and are left wondering how such a nice kit comes with such crappy brakes. Hydraulic brakes are the defacto standard for most people who ride ebikes in the US which turns a 30 minutes install job into several hours as people scratch their heads wondering how to install the ebrakes on a hydraulic braking system. Here are some options that will help you through.
Option 1) Decide if you really need ebrakes at all. If you are going to disable the PAS(Pedal assist system) and use just a thumb throttle then you don’t even need to hook up the ebrake system at all. To disable the PAS system just remove the controller. Remove crank, chainring and the plastic cover then remove the 3 small hex bolts and carefully wiggle it off. Find the black connector (probably covered with silicone) and peel off the silicone, find the release lever and press it and pull the connector apart. Using something small and pointy (screwdriver, screw point, etc) on the female connector press down on the release pin of the grey wire and pull it out. Cover the wire with electrical tape and put the controller back together. Walla. No PAS anymore. No need for ebrakes as the only time the motor will put out power is when you have your thumb on the throttle.
Option 2) If you are going to use the PAS and have cable brakes then you can just install the brake handles that are included and hook them up. Although they are ridiculously large and look like motorcycle brakes I find if you cut off half the handle and grind off the edges with an angle grinder they start to resemble something closer to what you would expect on a bicycle.
Option 3) Got Hydraulic brakes or you are too fashion conscious to install the levers that come with the BBS02? That leaves you with a few different options. The first option is to take apart the handbrakes that come with the kit and custom mount them on your existing hydraulic handbrakes. The switch on these is set to NORMALLY CLOSED position so it will take a little finagling to get them to work but it can be done in less than an hour. Remove the steel pin that the brake and pivots on and remove the handle and spring. Remove the ring around the cable and push the micro switch through the housing so the cable is ‘trapped’ in the hole but there is a little play. Carefully cut or grind the aluminum away until you can pull the cable out of the side of the housing. Make sure not to hit the cable when you are grinding away. Now you should have a microswitch with the correct adapter on the end of it. You will need to position the switch in front of the brake with the switch pointing toward the handle. I had to grind a small amount of material away on the handbrake to get this switch to connect to the handle. The idea is that you want the microswitch to push against the handle near the pivot point while the brakes are not active and then when the brakes are pulled the switch will stick out as the handle moves away from the microswitch. Using zipties to get it to line up properly, then black silicone to hold it permanently in place works quite well.
Option 4) If you want the best looking and most functional system to be had then you will have to order a pair of Generic Ebrake sensors from em3ev here for $13 each. These are hall effect sensors and have the correct ends already connected making it a plug and play system. You hook it up, zip tie it to your handle then ziptie the hoop magnet to the brake handle so when you pull the brakes the and the magnet moves away the switch turns ON. There are several people on endless sphere who also install this unit inside their brakes by drilling holes in their brakes and epoxying the magnet into the brake handle.
Update: em3ev just started selling a push button motor shutoff for $6. This solves the problem of wanting to use the PAS and not wanting to shift while under load. This hooks up to one of the brake connectors and stops the motor so you can shift without breaking chains under load. You can also do what I do which is just tap the ebrakes when using the PAS and shifting which will accomplish the exact same thing.