If you’re plagued by perpetually dead bike light batteries you’ll like this one. It’ll also fix the problem of remembering to turn the lights on in the first place. This hack uses an accelerometer to switch the light when the bike is in motion.
In this case the bike light was chosen for its ability to fit the control board inside the case. But with this proof-of-concept you can easily spin a tiny board with uC and accelerometer to replicate the functionality (the Bluetooth module shown above is going unused in this application). Many accelerometer chips have low-power mode that can be used to was a uC so we could easily see this having very little impact on the normally battery life of your light. The one caveat being the need to regulate the voltage as many of these lights take a 12V cell.
The other alternative is to make sure your battery is always charging during the day. This solar setup is one way, but then you won’t want to leave the thing unattended.