DC Power Meter for Battery Monitoring using BT-DCPM and Rpi 3
Posted: Sunday 20 May 2018 8:57
I've been working on integrating a DC power meter for monitoring my battery into a Domoticz install for our RV which runs on an Rpi 3. Attached is the LUA script I've developed. Here's some information on how to use it:
You can purchase a BT-DCPM from https://www.thornwave.com/products-btdcpm.
After you install it with an appropriate shunt on your battery-based power system, configure the monitor using Thornwave's app for your particular battery type and size. Then follow the instructions at the top of the script to get Bluetooth running and add your sensors to Domoticz.
I've updated my script as the original did not give me notifications. Turns out the UpdateDevice method I was using updated the Domoticz database itself and did not allow it to process the value and decide to send the notification. I changed the method to "OpenURL" and used JSON to update the values and I now get notifications!
Here is the updated script, note the additional variable of the IP address:
Here's a screenshot of the Utility sensors:
You can purchase a BT-DCPM from https://www.thornwave.com/products-btdcpm.
After you install it with an appropriate shunt on your battery-based power system, configure the monitor using Thornwave's app for your particular battery type and size. Then follow the instructions at the top of the script to get Bluetooth running and add your sensors to Domoticz.
I've updated my script as the original did not give me notifications. Turns out the UpdateDevice method I was using updated the Domoticz database itself and did not allow it to process the value and decide to send the notification. I changed the method to "OpenURL" and used JSON to update the values and I now get notifications!
Here is the updated script, note the additional variable of the IP address:
Here's a screenshot of the Utility sensors: