btmon not reporting Amps via mqtt

Post any 3rd party software here.
Post Reply
thesalcedo
Posts: 17
Joined: Wed Dec 12, 2018 9:02 pm

btmon not reporting Amps via mqtt

Post by thesalcedo » Wed Mar 17, 2021 3:35 pm

What am I missing? I had amps reporting via Influxdb, but now that I've switched to mqtt it only reports w, wh, and dwh. Here's my config:
[source]
device_type = gem
ip_read = true
ip_host = gemhost
ip_port = 80
ip_mode = client
include_current = true
reverse_polarity = true
full_serials = true

[mqtt]
mqtt_out=true
mqtt_host=homecontrol
mqtt_port=1883
mqtt_clientid=btmon
mqtt_base_topic=/home/energy
mqtt_user=xxxxx
mqtt_passwd=xxxxx
mqtt_upload_period=10
My broker log (mosquitto) shows the message being published, but no amps:
Untitled.png
Untitled.png (40.26 KiB) Viewed 11678 times

Any ideas?
Cheers!
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: btmon not reporting Amps via mqtt

Post by ben » Thu Mar 18, 2021 9:34 am

Line 4212 (in my file, around line 4212) try changing:

Code: Select all

 for f in [FILTER_POWER, FILTER_ENERGY, FILTER_PULSE, FILTER_SENSOR]:
to

Code: Select all

 for f in [FILTER_POWER, FILTER_ENERGY, FILTER_CURRENT, FILTER_PULSE, FILTER_SENSOR]:
Ben
Brultech Research Inc.
E: ben(at)brultech.com
thesalcedo
Posts: 17
Joined: Wed Dec 12, 2018 9:02 pm

Re: btmon not reporting Amps via mqtt

Post by thesalcedo » Thu Mar 18, 2021 9:50 am

That did it! Thanks Ben!
Line 4209 for me... I wonder what other fun stuff you have in your btmon.py? :D

Oscar.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: btmon not reporting Amps via mqtt

Post by ben » Thu Mar 18, 2021 10:17 am

thesalcedo wrote:
Thu Mar 18, 2021 9:50 am
That did it! Thanks Ben!
Line 4209 for me... I wonder what other fun stuff you have in your btmon.py? :D

Oscar.
Took that from the Python 3 conversion I was working on. There's a bunch of compatibility issues.

https://github.com/BenK22/mtools/blob/i ... /btmon3.py
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Post Reply