GEM & BTMON & Home Assistant - No Dashbox

Post any 3rd party software here.
Post Reply
adamall
Posts: 18
Joined: Wed Nov 10, 2010 3:22 pm

GEM & BTMON & Home Assistant - No Dashbox

Post by adamall » Wed Jan 03, 2024 8:09 pm

So I have searched through a lot of the threads both here and on Home Assistant to see how to set this up but without any success. What I want to do is use BTMON to send data to influxdb (this is currently setup and and has been running for years now) and us the GEM to send data to home assistant for viewing on there. I have BTMON setup in client mode with the below settings. This works mostly flawlessly. Every few months or so the GEM device seems to lock up. A simple power cycle fixes it.

Code: Select all

[source]
device_type = gem 
ip_read = true 
ip_host = 10.0.0.236 
ip_port = 80
ip_mode = client
INCLUDE_CURRENT = 1
REVERSE_POLARITY = 1
ip_poll_interval = 30
TRUST_DEVICE_CLOCK = 1
In the packet send area of the GEM webpage I have keep alive off and BIN48NET - TIME selected.

So then I decided to see if I can add home assistant to the mix. All the threads I reviewed though seem to have a DASHBOX involved which I do not have.

To get things setup for Home assistant I made the following changes. I added a server destination and port to the GEM network utility.
Setup as seen below.
GEM setup.PNG
GEM setup.PNG (98.33 KiB) Viewed 1643 times
In the packet send area of the GEM webpage I turned keep alive on and set the packet type to BIN32NET. And this work for getting data into home assistant, but BTMON then wasn't working right.

If I put the packet type back to BIN48NET BTMON works but Home assistant doesn't collect data any longer. So is there something I am missing?

In order for Home assistant to read the data I think the packet needs to be in BIN32NET format as far as I can tell. But that then makes it so BTMON can't get a proper reading.

So the problem is I can't have BTMON and HA getting data at the same time as I can only set one packet format.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM & BTMON & Home Assistant - No Dashbox

Post by ben » Thu Jan 04, 2024 2:18 pm

Patched in Bin-32-NET, give it a go.

https://github.com/BenK22/mtools/blob/i ... /btmon3.py
Ben
Brultech Research Inc.
E: ben(at)brultech.com
adamall
Posts: 18
Joined: Wed Nov 10, 2010 3:22 pm

Re: GEM & BTMON & Home Assistant - No Dashbox

Post by adamall » Sun Jan 14, 2024 10:30 am

What version of Influxdb does this is use? My current version uses Influxdb V2. Also what version of python is needed?
adamall
Posts: 18
Joined: Wed Nov 10, 2010 3:22 pm

Re: GEM & BTMON & Home Assistant - No Dashbox

Post by adamall » Sun Jan 14, 2024 4:56 pm

Nevermind I figured it out. The BTMON3 version does work and allows you to select gem32pbin. It does not have influxdb v2 capabilities though. This person https://hub.docker.com/r/jdahlke/btmon3 has made a version that they made into a docker container and works with influxdb V2 though the docker container has not been updated to include the latest btmon3.py. It does look like he has updated the btmon3.py in his project but it has not been included in his docker build yet for some reason.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM & BTMON & Home Assistant - No Dashbox

Post by ben » Mon Jan 15, 2024 10:43 am

adamall wrote:
Sun Jan 14, 2024 4:56 pm
Nevermind I figured it out. The BTMON3 version does work and allows you to select gem32pbin. It does not have influxdb v2 capabilities though. This person https://hub.docker.com/r/jdahlke/btmon3 has made a version that they made into a docker container and works with influxdb V2 though the docker container has not been updated to include the latest btmon3.py. It does look like he has updated the btmon3.py in his project but it has not been included in his docker build yet for some reason.
Looks like he merged the bin32 format. Later today I'll see about merging the InfluxDB2 back my way also.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Post Reply