Custom UPS/Inverter Integration with Home Assistant

Years ago, I became frustrated with the tiny batteries and short run time of consumer/small biz grade UPS devices (Cyberpower, APC, Tripp lite). Rather than invest in a larger system, I decided to move to an inverter and marine battery setup. Essentially the same setup you may find in an RV or boat. This worked really well but I had very little monitoring of the battery capacity other than a beep emitted from the inverter seconds before the battery was empty. Pretty much no notification, and then my servers and NAS would just die which is terrible for the health of those devices.

So, I needed to build a monitoring solution and chose to use Home Assistant as the brains of the solution.

The result was this project that I call AIMSPowerInverterMQTT (named after the brand of the inverter I purchased). You can find the full repo and code here: AIMSPowerInverterMQTT Github Repo.

This project was created to automatically monitor the AIMS Power 1250W Power Inverter Charger (PICOGLF12W12V120AL)] and connected deep-cycle battery(s) via Home Assistant using MQTT and the UART serial port pins of a Raspberry Pi Zero W connected to the inverter RJ-45 (serial) port. This setup may be compatible with other AIMS Power inverter models that include a serial port accessible via the RJ-45 port.

The inverter and battery data published to Home Assistant can be used to create custom automations to send notifications and take actions on other devices integrated into the Home Assistant ecosystem such as automatically powering down devices when the inverter battery is low.

In my case, I immediately used the Synology integration with a custom automation to send the command to shut down the Synology NAS when the battery voltage hit a certain level to make sure my data is absolutely protected. I’m still working on other automations to shut down my servers gracefully.

If anyone else has this inverter or something similar, I hope this provides some value to you. If you are considering building your own UPS, absolutely do it. It can be a little costly up front, but it’s so nice to have a UPS that can power my gear for almost a full day of no power and the longevity of a marine battery is much longer than the junk you get in the consumer/small biz gear on the market.