From MQTT to WeeWX

90 views
Skip to first unread message

Tarmo

unread,
Jan 19, 2021, 5:08:18 PM1/19/21
to weewx-user

We have a temporary situation here where the Vantage station is not available. Meanwhile, I have access to the MQTT broker with all the measurements from another station.

I would like to keep the Vantage driver running for inside temperature and humidity and add a service augmenting station data with outside measurements from MQTT.

Which service do you recommend for this task? I have briefly looked at Rich's WeeWX-MQTTSubscribe which looks complicated for a simple query to fetch outTemp and outHumidity from MQTT and add these to the archive.

Thank you in advance!

bell...@gmail.com

unread,
Jan 19, 2021, 5:50:02 PM1/19/21
to weewx-user
Yeah, it has become a bit complicated.  If you post your topic and an example payload we should be able to get you up and running pretty quickly.
rich

Tarmo

unread,
Jan 20, 2021, 2:44:52 AM1/20/21
to weewx-user
The topics are
rtl_433/lab/devices/Solight-TE44/1/4/temperature_C
rtl_433/lab/devices/LaCrosse-WS2310/242/humidity

How do I get example payload? I am running Mosquitto.

Tarmo

unread,
Jan 20, 2021, 6:32:34 AM1/20/21
to weewx-user
Update on example payload:
{"time":"2021-01-20 13:28:57","model":"Solight-TE44","id":4,"channel":1,"temperature_C":-7.1,"mic":"CRC"}
{"time":"2021-01-20 13:29:20","model":"LaCrosse-WS2310","id":242,"humidity":78}


bell...@gmail.com

unread,
Jan 20, 2021, 9:34:20 AM1/20/21
to weewx-user
After installation, you will need to update the MQTTSubscribeService to look something like this.
[MQTTSubscribeService]
    host = replace with your broker
    # any other MQTT options you need, like port, user, password, etc.

    [[message_callback]]
         type = individual

    [[topics]]
        unit_system = METRIC
        use_topic_as_fieldname = true

        [[[rtl_433/lab/devices/Solight-TE44/1/4/temperature_C]]]
            name = outTemp
        [[[rtl_433/lab/devices/LaCrosse-WS2310/242/humidity]]]
            name = outHumidity

Tarmo

unread,
Jan 20, 2021, 12:30:10 PM1/20/21
to weewx-user
That was easy. Thank you very much, Rich.
Reply all
Reply to author
Forward
0 new messages