Hopefully a simle question WRT WeeWX-MQTTSubscribe...

132 views
Skip to first unread message

richard maliszewski

unread,
May 17, 2021, 5:12:49 PM5/17/21
to weewx-user
I have an AW WS5000 station, and am using the excellent GW1000 driver to pull data off of it into WeeWX.  Am also using the Purple Air plugin to bring data from our local sesnor in as well.  This all works well.

We have a handful of Aqara temp/hum/bar sensors that talk to an Aqara-Home bridge.  I have Home automations set up to "publish" readings to our home automation system, and that all works well.  It'd be lovely to be able to send those readings to WeeWX as well, for archiving of data if nothing else.

It's not hard to augment the Home automations to publish readings via MQTT as well.  It looks like WeeWX-MQTTSubscribe is a good collector for such.  I've bumbled around searching for in-use examples enough that I believe I can get the weewx.conf entries correct.

But to make certain (before I do the wrong thing and break things that are currently working quite well), the READE.md says that if I am adding data to that provided by another driver, install as a service.  I am augmenting data from other drivers, but those are both producing software records.  Is service the right way to go, or will this play nicely with the other software drivers?

Thanks in advance.
Richard 

bell...@gmail.com

unread,
May 19, 2021, 2:00:57 PM5/19/21
to weewx-user

Since you have a working install of WeeWX that you want to augment with MQTT data, you want to run MQTTSubscribe as a service. It doesn't matter whether the driver is using software or hardware record generation. 

rich

richard maliszewski

unread,
May 24, 2021, 4:46:57 PM5/24/21
to weewx-user
So have MQTTSubscribe installed as a service, and have made what I believe to be reasonable entries into its section of weewx.conf, and modified the Seasons skin.conf and current.inc to display the new data, which I assume is getting archived.  I have two inbound MQTT temperature values assigned to extraTemp1 and extraTemp2.  In the "current" readings, I have seen valid readings, but much of the time, I see "N/A".  I'm guessing this is because there was no published reading received during the archive interval?  The Aqara sensors only send updates when the sensed reading changes, so for one of the sensors ( garage) that can be fairly infrequent.  I see these N/A values whether I use $current or $latest for the displayed values.

How can I get the display of the last published value?  I've done some digging, and I suspect I may have to add an Accumulator section?  If so, what would that look like?

And on a related note, is the last published value getting archived at each archive interval, or only when there's a new value in the current archive interval?

Thanks in advance for any light shined this direction.

--Richard

richard maliszewski

unread,
May 25, 2021, 2:59:39 PM5/25/21
to weewx-user
And digging through the MQTTSubscribe customization guide, found "expires_after", which does exactly what I needed when set to "None".

--Richard

Reply all
Reply to author
Forward
0 new messages