Motion activated power switch?

I’ll elaborate.

Let’s say you have a baby stroller and you’re so neurotically inventive that you decide you want to add some features like:

  • Speedometer
  • Odometer
  • Headlamps
  • LED Strip with WLED for festive days
  • Pyrotechnics (no, not really, but yes on everything else.)

So, you decide to use a micro-processor and ESPHome

…but…

You want activation of the system to be automatic, and you don’t want to have to turn it on or off when not in use (this translates to, “good luck getting the wife to remember to turn it on every time it’s used.”)

So the challenge is to create some sort of mechanical trigger that activates the power switch to the NodeMCU, drawing from a battery pack that can be charged when not being used.

Since most of the sensors we tinker with require power in order to operate, how could I create a mechanical sensor that would turn on the system?

Would I simply use a mechanical switch to activate a relay?

Perhaps I could integrate a mechanical power switch into the stroller brake system so the system would be ON when the brake is disengaged and off when the brakes are engaged.

Another challenge in the project is to create something with ESPHome that can actually write data to the device that can later be transferred through HA to a more permanent record. The odometer, for example, would simply be a counter that would count the number of times a wheel rotates in a forward direction. That count would be transferred once per day to a spreadsheet, then cleared. Every day would be represented by a row on the spreadsheet…etc.

Thoughts?