As some of you may know, I have a Raspberry Pi which handles all of the radios for Home Assistant. It runs ZwaveJS2MQTT (using the WebSockets connection to Home Assistant, not MQTT), Zigbee2MQTT (using MQTT), and RTL-433 (also using MQTT). So, it’s fairly critical infrastructure. Usually, with critical infrastructure, I try to get it PoE powered so I don’t have to worry about power bricks and can get battery backup via the CRS328 network switch in the basement (which is on a battery of its own). But, unfortunately, the connection between my upstairs laundry room and basement network closet is via fiber, so no power being carried there. I need another solution, and not wanting a giant AC UPS I decided on a tiny Pi UPS from Waveshare.
It’s a hat for the Pi with two 18650 lithium batteries, a charger circuit, power monitor and balancing ICs, and an 8.4v to 5v buck converter to power the Pi itself. It comes with an 8.4v wall brick to power the whole thing, and is designed to be plugged in to wall power normally and transition to battery power without any interruption. But, that’s still not good enough for me. I want the data collected to get into Home Assistant. So, I wrote a custom Python script to push the power monitor data to MQTT, and made a video about it.
In a bit of a divergence from my other blog posts, I’m linking to my Github for the code and instructions. So, read the readme to install my code if you want to use it.
- Waveshare Pi UPS (B) - Pogo Pins model is what I got - Amazon or Waveshare
- Waveshare Pi UPS - female header hat is another model that I didn’t get - Amazon or Waveshare
- Wavehare Pi UPS for Pi Zero - another model that I didn’t get but the code should work with hopefully - Amazon or Waveshare
- My Software on Github