MQTT

ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: MQTT

Post by ben » Tue Dec 27, 2022 10:49 am

vilord wrote:
Tue Dec 27, 2022 7:33 am
I am running c15d and just turned on MQTT publishing, it does not appear to be setting the retain flag on any of the messages. Is there a trick to this?
It looks like there's topic retain flags and client retain flags. The topic-level retain flags should be on.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: MQTT

Post by vilord » Tue Dec 27, 2022 12:52 pm

Looks like I was wrong, retain is correctly set, I just didn't understand the way that MQTT Explorer shows whether a value is retained or not... it will only show retained/not retained until it gets a new value, so I have to pause the client immediately after connecting to see what is retained.
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: MQTT

Post by vilord » Tue Dec 27, 2022 1:18 pm

Some of the kwh numbers don't seem to make a lot of sense though...

For my channel 26, total for the day is 0.775 kWh, total since I turned on MQTT transmittal (since it appears to start at 0, not to send the currently stored kWh?) is about 0.529kWh, and the kwh topic for c26 has had 0.002 kwh and 100-150 watts in it all morning
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: MQTT

Post by ben » Tue Dec 27, 2022 1:51 pm

vilord wrote:
Tue Dec 27, 2022 1:18 pm
Some of the kwh numbers don't seem to make a lot of sense though...

For my channel 26, total for the day is 0.775 kWh, total since I turned on MQTT transmittal (since it appears to start at 0, not to send the currently stored kWh?) is about 0.529kWh, and the kwh topic for c26 has had 0.002 kwh and 100-150 watts in it all morning
The DashBox is sending the kWh, Watts, and Amperage used each minute.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: MQTT

Post by vilord » Tue Dec 27, 2022 1:55 pm

Ah okay, so it is not a cumulative number, it only sends the last minute's consumption, and I'd need something to capture that every minute and add it up.
vilord
Posts: 32
Joined: Fri Aug 23, 2019 10:54 am

Re: MQTT

Post by vilord » Wed Dec 28, 2022 10:21 am

I built a small esp8266-based GEM to MQTT ESPHome interface that will plug into the XBee slot and post the GEM's cumulative wattsecond meters as watthours here: https://github.com/jcam/gem-mqtt-esphome
This doesn't rely on the dashbox, so would work without it.
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: MQTT

Post by ben » Thu Dec 29, 2022 10:50 am

vilord wrote:
Wed Dec 28, 2022 10:21 am
I built a small esp8266-based GEM to MQTT ESPHome interface that will plug into the XBee slot and post the GEM's cumulative wattsecond meters as watthours here: https://github.com/jcam/gem-mqtt-esphome
This doesn't rely on the dashbox, so would work without it.
Might be worth making a new thread about this, I'm sure there'd be some interest.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ColoradoSolar
Posts: 26
Joined: Fri Oct 20, 2017 9:50 pm
Location: Rocky Mountain High

Re: MQTT

Post by ColoradoSolar » Tue Nov 07, 2023 12:18 pm

Ben any chance to get the Dashbox to publish MQTT topics more often?
ben
Site Admin
Posts: 4269
Joined: Fri Jun 04, 2010 9:39 am

Re: MQTT

Post by ben » Thu Nov 09, 2023 10:19 am

ColoradoSolar wrote:
Tue Nov 07, 2023 12:18 pm
Ben any chance to get the Dashbox to publish MQTT topics more often?
What are you using MQTT with? Packet forwarding has been improved and will send every packet to whatever host you're using.

You could have it fire to a btmon.py script and have it convert MQTT with every packet.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ColoradoSolar
Posts: 26
Joined: Fri Oct 20, 2017 9:50 pm
Location: Rocky Mountain High

Re: MQTT

Post by ColoradoSolar » Thu Nov 09, 2023 11:48 am

I am using the data is an app I wrote that I use for controlling my solar system. I went the MQTT route since it seemed the easiest and it works fine just the updates are not quick enough. Where is there some docs on packet forwarding, including the format of the packets?

I found the packet format doc. Another question. One of my GEMs is connected RS-232 to the dashbox and the other is through WiFi. Can I still use packet forwarding?

Eric
Post Reply