DC Power Meter for Battery Monitoring using BT-DCPM and Rpi 3

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
Post Reply
MobileDomUser
Posts: 4
Joined: Sunday 20 May 2018 8:09
Target OS: Raspberry Pi
Domoticz version: 3.8.8153
Contact:

DC Power Meter for Battery Monitoring using BT-DCPM and Rpi 3

Post by MobileDomUser » 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:
BT-DCPMLuaScript.lua.txt
(11.08 KiB) Downloaded 7 times
Here's a screenshot of the Utility sensors:
Attachments
RVBattery.JPG
RVBattery.JPG (131.72 KiB) Viewed 595 times
RVBattery.JPG
RVBattery.JPG (131.72 KiB) Viewed 596 times
Last edited by MobileDomUser on Friday 22 June 2018 4:43, edited 2 times in total.

User avatar
EdddieN
Posts: 379
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: DC Power Meter for Battery Monitoring using BT-DCPM and Rpi 3

Post by EdddieN » Sunday 20 May 2018 11:04

Nice!

The connection is via Bluetooth to the RPI?
11101101 - www.machinon.com

MobileDomUser
Posts: 4
Joined: Sunday 20 May 2018 8:09
Target OS: Raspberry Pi
Domoticz version: 3.8.8153
Contact:

Re: DC Power Meter for Battery Monitoring using BT-DCPM and Rpi 3

Post by MobileDomUser » Wednesday 23 May 2018 6:09

Sorry for the late reply, evidently I don't have my notifications correct. Yes, it is Bluetooth.

MobileDomUser
Posts: 4
Joined: Sunday 20 May 2018 8:09
Target OS: Raspberry Pi
Domoticz version: 3.8.8153
Contact:

Re: DC Power Meter for Battery Monitoring using BT-DCPM and Rpi 3

Post by MobileDomUser » Friday 22 June 2018 4:42

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!

Updated script is available in the first post.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests