What is the data structured published to the MQTT broker with Weewx stdRESTful service

36 views
Skip to first unread message

Rui Pinto

unread,
Sep 2, 2019, 10:47:01 AM9/2/19
to weewx-user
Hello!!

I have a Davis Vantage Pro2 station and i'm using Weewx to publish data to an MQTT broker (Mosquitto) and i would like to know if the data that i'm pusblishing to a specific topic is structured in JSON?


Best Regards.

Rui Pinto

unread,
Sep 2, 2019, 10:49:14 AM9/2/19
to weewx-user
Another curiosity question:

- Why all the variables are published in floats?

Greg Troxel

unread,
Sep 2, 2019, 10:52:48 AM9/2/19
to Rui Pinto, weewx-user
I just updated the wiki page a bit. Basically:

aggregrate publishes json to $TOPIC/loop
individual publishes plain values (I think) to $TOPIC/dewpoint_F
(etc.)

https://github.com/weewx/weewx/wiki/mqtt

But, if it is being published, use mosquitto_sub or something like that
and look at what you are publishing.

Greg Troxel

unread,
Sep 2, 2019, 10:55:46 AM9/2/19
to Rui Pinto, weewx-user
Rui Pinto <ruialexand...@gmail.com> writes:

> Another curiosity question:
>
> - Why all the variables are published in floats?

Because that is the natural computer represntation for the underlying
data, except alarms, and maybe dates.

Keep in mind that mqtt publishes octect sequences, not objects with
types.
Reply all
Reply to author
Forward
0 new messages