EcoWitt GW3000 --> mqtt --> WeeWx possible?

473 views
Skip to first unread message

James Pattinson

unread,
Jul 25, 2025, 7:57:21 AMJul 25
to weewx-user
Hi All!

I am setting up a WeeWx system in a remote location where they do have WiFi but nowhere to actually install the software. Since I have WeeWx running elsewhere, I'd like to be able to feed into a new instance of WeeWx under my control.

I am used to using Davis stuff, but as these guys are on a budget, we went for EcoWitt. We have a WS69 with LCD display, and a GW3000.

This is my first time using a GW3000, and I was quite happy to see that it supports MQTT so it can push data out in almost real time (down to 8 seconds). I have this working and I can see the updates coming into my MQTT server, albeit in a weird HTTP POST style:

PASSKEY=xxx&stationtype=GW3000A_V1.0.9&runtime=1124&heap=68736&dateutc=2025-07-25%2011%3A50%3A12&dns_err_cnt=0&cdnflg=1&tempinf=74.12&humidityin=56&baromrelin=29.483&baromabsin=29.483&tempf=72.86&humidity=55&vpd=0.367&winddir=294&windspeedmph=0.00&windgustmph=0.00&maxdailygust=0.00&solarradiation=4.96&uv=0&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.000&yearlyrainin=0.000&wh65batt=0&freq=868M&model=GW3000A&interval=60

If there was a way of having this MQTT message feed directly into the LOOP of WeeWx, it would make my life SO much easier, as I can have the GW3000 publish this out to an external MQTT server and connect WeeWx to the same server. Has anyone got a WeeWx driver to do this?

Without this, I think I am looking at the GW1000 API polling driver, which appears to have become unmaintained quite recently. For that to work I'd need to arrange things such that WeeWx can connect to the GW3000 over the Internet, which might be challenging without a VPN.

Plan B is to tell them they need to buy a Pi or something and do it all locally, but I would really like to be able to get some semi real-time push method doing for this use case.

Any other ideas would be appreciated!

Cheers
James

michael.k...@gmx.at

unread,
Jul 25, 2025, 9:33:52 AMJul 25
to weewx-user

Steeple Ian

unread,
Jul 25, 2025, 10:17:20 AMJul 25
to weewx-user
@Michael
I have not looked at MQTT in any depth before so forgive me if my question is naive. Using WeeWX-MQTTSubcribe with the Ecowitt MQTT protocol, is there still a requirement for a-man-in-the middle server? 
Thanks, 
Ian

James Pattinson

unread,
Jul 25, 2025, 10:30:19 AMJul 25
to weewx-user
Hi Ian,

The GW3000 publishes the MQTT messages direwctly to the broker, so there is nothing else needed - this would be ideal for my use-case!

Cheers
James

vince

unread,
Jul 25, 2025, 12:07:21 PMJul 25
to weewx-user
Yes. You still will need the ecowitt gateway to publish to a MQTT broker in the middle.  I just run a little docker container on my LAN for that.

In my case I have two weewx instances that both publish to MQTT as ecowitt/loop and vp2/loop (via Matthew's MQTT extension, to later feed influxdb), but the VP2 weewx instance subscribes to the ecowitt data (via Rich's MQTTSubscribe as a service) to add data to a few extraTempNNN elements so that I can show data from both in my main skin.

Rich's MQTTSubscribe works great.  I didn't know until now that it can be run as a driver.  Very cool.

James Pattinson

unread,
Jul 25, 2025, 4:15:15 PMJul 25
to weewx-user
Hi Vince,

Did you have to do any customisation at all? I am using MQTTSubscribe and it is now working, but I had to write an external python script to subscribe to the Ecowitt topic, parse the payload and re-publish it in JSON format to another topic, which WeeWx then subscribes to.

Before I did that it was trying to convert the whole string (including &s) to a value, even in 'individual' mode.

Cheers
James

vince

unread,
Jul 25, 2025, 4:39:41 PMJul 25
to weewx-user
Nope - just use MQTTSubscribe when I want to listen, and MQTT when I want to publish.  Apply a sensor_map on the subscribe side to map the elements you want into the weewx db as desired.

Here's some excerpts from my vp2 (main) instance that subscribes to a few things from ecowitt/loop

# dial back some logging a bit for when we set debug=1
[Logging]
    [[loggers]]
        [[[user.MQTTSubscribe]]]
            level = INFO

[MQTTSubscribeService]
    enable = true
    host = 192.168.1.171
    port = 1883
    keepalive = 60
    username = None
    password = None
    binding = loop

    [[message_callback]]
        type = json

    [[topics]]
        unit_system = US
        ignore_start_time = True
        ignore_end_time = True

        #----- example data ----

        #     {"dateTime": 1703364600.0, "usUnits": 1.0, "inTemp_F": 64.03999999999998, "outTemp_F": 40.01600000000001, "inHumidity": 51.0, "outHumidity": 99.0, "pressure_inHg": 29.9502976554
16673, "relbarometer": 1025.7333333333336, "extraTemp1_F": 67.46000000000002, "extraTemp2_F": 70.34000000000002, "extraTemp3_F": 70.87999999999998, "extraTemp4_F": 70.112, "extraTemp5_F": 50.
888000000000005, "extraHumid1": 46.53333333333333, "extraHumid2": 40.0, "extraHumid3": 43.0, "extraHumid4": 46.0, "extraHumid5": 88.33333333333333, "soilMoist1_centibar": 40.0, "wh32_batt": 0
.0, "wh31_ch1_batt": 0.0, "wh31_ch2_batt": 0.0, "wh31_ch3_batt": 0.0, "wh31_ch4_batt": 0.0, "wh31_ch5_batt": 0.0, "wh51_ch1_batt": 1.5, "wh32_sig": 4.0, "wh31_ch1_sig": 4.0, "wh31_ch2_sig": 4
.0, "wh31_ch3_sig": 4.0, "wh31_ch4_sig": 4.0, "wh31_ch5_sig": 4.0, "wh51_ch1_sig": 4.0, "altimeter_inHg": 30.35012374517868, "barometer_inHg": 30.363289630598434, "cloudbase_foot": 423.695175
8301455, "dewpoint_F": 39.75774122634734, "heatindex_F": 39.14293333333334, "humidex_F": 40.01600000000001, "inDewpoint_F": 45.54133535588047, "maxSolarRad_Wpm2": 228.29873036475112, "rainRat
e_inch_per_hour": 0.0, "interval_minute": 5.0}

        # we subscribe to ecowitt/loop from a second weewx instance for that
        [[[ecowitt/loop]]]

            # items we map to weewx schema elements
            [[[[outTemp_F]]]]
                name = extraTemp1
                units = degree_F
            [[[[extraTemp5_F]]]]
                name = extraTemp5
                units = degree_F

            # the rest of the items we ignore, uncertain if this is needed or not
            # if so - I likely missed ignoring some elements plus/minus which sensors
            # we've added or deleted from the initial setup
            [[[[dateTime]]]]
                ignore = True
            [[[[usUnits]]]]
                ignore = True
            [[[[inTemp_F]]]]
                ignore = True
            [[[[inHumidity]]]]
                ignore = True
            [[[[outHumidity]]]]
                ignore = True
            [[[[pressure_inHg]]]]
                ignore = True
            [[[[relbarometer]]]]
                ignore = True
            [[[[extraTemp1_F]]]]
                ignore = True
            [[[[extraTemp2_F]]]]
                ignore = True
            [[[[extraTemp3_F]]]]
                ignore = True
            [[[[extraTemp4_F]]]]
                ignore = True
            [[[[extraHumid1]]]]
                ignore = True
            [[[[extraHumid2]]]]
                ignore = True
            [[[[extraHumid3]]]]
                ignore = True
            [[[[extraHumid4]]]]
                ignore = True
            [[[[soilMoist1_centibar]]]]
                ignore = True
            [[[[wh26_sig]]]]
                ignore = True
            [[[[wh65_sig]]]]
                ignore = True
            [[[[wh31_ch1_sig]]]]
                ignore = True
            [[[[wh31_ch2_sig]]]]
                ignore = True
            [[[[wh31_ch3_sig]]]]
                ignore = True
            [[[[wh31_ch4_sig]]]]
                ignore = True
            [[[[wh31_ch5_sig]]]]
                ignore = True
            [[[[wh51_ch1_sig]]]]
                ignore = True
            [[[[altimeter_inHg]]]]
                ignore = True
            [[[[barometer_inHg]]]]
                ignore = True
            [[[[cloudbase_foot]]]]
                ignore = True
            [[[[dewpoint_F]]]]
                ignore = True
            [[[[heatindex_F]]]]
                ignore = True
            [[[[humidex_F]]]]
                ignore = True
            [[[[inDewpoint_F]]]]
                ignore = True
            [[[[maxSolarRad_Wpm2]]]]
                ignore = True
            [[[[rainRate_inch_per_hour]]]]
                ignore = True
            [[[[interval_minute]]]]
                ignore = True

James Pattinson

unread,
Jul 25, 2025, 4:56:08 PMJul 25
to weewx-user
Hi Vince,

Ah, I get it - I think we are doing two slightly different things. I think you are subscribing to the published output of the other WeeWx rather than the EcoWitt gateway - so your data is already in JSON format.

As shown in my first post. the GW3000 doesn't publish it's payload in JSON format, it's separated like URL, So I have a simple script running externally to WeeWx which converts it from:

PASSKEY=xxx&stationtype=GW3000A_V1.0.9&runtime=20638&heap=68388&dateutc=2025-07-25%2020%3A54%3A42&dns_err_cnt=0&cdnflg=1&tempinf=71.42&humidityin=68&baromrelin=30.129&baromabsin=29.441&tempf=62.06&humidity=90&vpd=0.056&winddir=216&windspeedmph=0.00&windgustmph=0.00&maxdailygust=5.82&solarradiation=0.02&uv=0&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&dailyrainin=0.020&weeklyrainin=0.020&monthlyrainin=0.020&yearlyrainin=0.020&wh65batt=0&freq=868M&model=GW3000A&interval=60

to

{"PASSKEY": "xxx", "stationtype": "GW3000A_V1.0.9", "runtime": "20646", "heap": "68388", "dateutc": "2025-07-25 20:54:50", "dns_err_cnt": "0", "cdnflg": "1", "tempinf": "71.42", "humidityin": "68", "baromrelin": "30.129", "baromabsin": "29.441", "tempf": "62.06", "humidity": "90", "vpd": "0.056", "winddir": "216", "windspeedmph": "0.00", "windgustmph": "0.00", "maxdailygust": "5.82", "solarradiation": "0.02", "uv": "0", "rainratein": "0.000", "eventrainin": "0.000", "hourlyrainin": "0.000", "dailyrainin": "0.020", "weeklyrainin": "0.020", "monthlyrainin": "0.020", "yearlyrainin": "0.020", "wh65batt": "0", "freq": "868M", "model": "GW3000A", "interval": "60"}

Then MQTTSubscribe is happy :)

Cheers
James

bell...@gmail.com

unread,
Jul 25, 2025, 6:33:00 PMJul 25
to weewx-user
I would have tried ‘type=keyword’ with keyword_deliimter of ‘=‘ (the default) and keyword_separator of ‘&’.
If this didn’t work and I was bored and daring, I would try writing my own parser, https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Handling-different-MQTT-message-formats.
But seriously, if the keyword_separator of ‘&’ doesn’t work, let me know. If Ecowitt has their own MQTT format I might be interested in baking it into the base MQTTSubscribe code (guessing that more people will be looking to use it).
rich

vince

unread,
Jul 25, 2025, 7:08:30 PMJul 25
to weewx-user
James can you share how you set the gateway to post to MQTT ?  I can check the gw1200 for similar settings and try to duplicate your setup….

vince

unread,
Jul 25, 2025, 10:24:31 PMJul 25
to weewx-user
update - looks like the gw1200 doesn't support MQTT.  No MQTT option in the customized servers menus in WSView Plus or in the web gui directly. Sigh.

steepleian

unread,
Jul 26, 2025, 12:36:54 AMJul 26
to weewx...@googlegroups.com, weewx-user
@Vince, you are correct, it’s only GW2000 and GW3000 devices


On 26 Jul 2025, at 03:24, vince <vince...@gmail.com> wrote:

update - looks like the gw1200 doesn't support MQTT.  No MQTT option in the customized servers menus in WSView Plus or in the web gui directly. Sigh.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/a78a4fbf-706f-4e1c-bc0e-81bc76047dd1n%40googlegroups.com.

steepleian

unread,
Jul 26, 2025, 12:41:30 AMJul 26
to weewx...@googlegroups.com, weewx-user
@rich,
I think that would be an excellent solution to bake the Ecowitt format into your subscribe code.


On 26 Jul 2025, at 05:36, 'steepleian' via weewx-user <weewx...@googlegroups.com> wrote:

@Vince, you are correct, it’s only GW2000 and GW3000 devices

Rainer Lang

unread,
Jul 26, 2025, 2:12:33 AMJul 26
to weewx...@googlegroups.com

the MQTT protocol as a customized server protocol hasn't been rolled out to all Ecowitt consoles (yet)
- rolled out to: GW2000, GW3000 so far

after having successfully proven itself in the field, it will be rolled out to all IoT enabled consoles.

You could have known this if you had consulted the Fine Offset / Ecowitt WiKi which was created to answer such questions -
and which has an answer to many Ecowitt (and clone device) related questions:
here: http://192.168.1.111/dokuwiki/doku.php?id=start#the_mqtt_protocol

James Pattinson

unread,
Jul 26, 2025, 4:13:38 AMJul 26
to weewx-user
Hi Rich,

Hah, that works great and I can throw away my script now

                type = keyword

                keyword_delimiter = "&"


Cheers
James

James Pattinson

unread,
Jul 26, 2025, 4:18:19 AMJul 26
to weewx-user
I think I was rather lucky - coming to EcoWitt just as this feature is being rolled out!

One thing worth mentioning in the Wiki is that it seems TLS is not supported for either regular TCP or Websocket MQTT connections, which is a shame, My 'Internet facing' MQTT broker is behind CloudFlare so TLS is required. I am going to have to get another broker behind a static IP and export the regular 1883 port.

bell...@gmail.com

unread,
Jul 26, 2025, 8:32:29 AMJul 26
to weewx-user
James,
That’s good news. Thanks for letting us know!
rich

steepleian

unread,
Aug 7, 2025, 3:15:47 AMAug 7
to weewx...@googlegroups.com
@james
Could you share your subscribe configuration please. I have the GW3000 publishing directly to a local broker which works fine. I am having problems with getting the settings right for Rich’s MQTTSubscribe. I usually manage to muddle my way through solutions but this one is evading me.
Many thanks in advance.
Ian


On 26 Jul 2025, at 13:32, bell...@gmail.com <bell...@gmail.com> wrote:

James,
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

vince

unread,
Aug 7, 2025, 12:44:37 PMAug 7
to weewx-user
What problems are you running into ?

Does my MQTT subscribe example not work ? I’ve been subscribing to MQTT ecowitt data for years that way.

Rajarajan Rajamani

unread,
Aug 7, 2025, 6:04:54 PMAug 7
to weewx...@googlegroups.com
Am jumping late into the discussion. If you just want weewx to get data from the GW3000 wouldn't it be way easier to just have the GW3000 publish data in the ecowit format to weewx directly. I have some change to make it listen for incoming data - using the option (under the [Station] block) driver = user.interceptor  followed by (in the [Interceptor] block) device-type = ecowitt_client

Thats is

Am I missing something?

Ian Millard

unread,
Aug 11, 2025, 6:21:03 PMAug 11
to weewx...@googlegroups.com
Vince,
Sorry for the delay, I missed your post on my phone whilst away from home.

Status as follows: -

The new Ecowitt MQTT protocol is publishing to broker with no problem and I can see the data arriving in the broker browser.

In weewx.conf I have this: -

[MQTTSubscribeDriver]
    driver = user.MQTTSubscribe
    host = broker.mqtt.cool
    port = 1883
    keepalive = 60
    username = None
    password = None
    binding = loop
    
    [[topics]]
        unit_system = US
        [[[ecowitt/1C6920E3A8F3]]]
           subscribe = True
           ignore = False
            [[[[message]]]]
                type = keyword
                keyword_delimiter = "&"

Then, extract from journal log: -

Aug 11 23:18:27 dvm weewxd[764736]: INFO __main__: Starting up weewx version 5.1.0

Aug 11 23:18:27 dvm weewxd[764736]: DEBUG weewx.engine: Station does not support reading the time

Aug 11 23:18:27 dvm weewxd[764736]: INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'

Aug 11 23:18:27 dvm weewxd[764736]: INFO weewx.manager: Starting backfill of daily summaries

Aug 11 23:18:27 dvm weewxd[764736]: INFO weewx.manager: Daily summaries up to date

Aug 11 23:18:27 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) No archive topic configured.

Aug 11 23:18:27 dvm weewxd[764736]: INFO weewx.engine: Starting main packet loop.

Aug 11 23:18:27 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) TopicManager starting queue ecowitt/1C6920E3A8F3 size is: 0

Aug 11 23:18:27 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) TopicManager starting queue 1754950706.041299-windGust-windGustDir-windDir-windSpeed size is: 0

Aug 11 23:18:27 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) Queues are empty.

Aug 11 23:18:29 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) TopicManager starting queue ecowitt/1C6920E3A8F3 size is: 0

Aug 11 23:18:29 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) TopicManager starting queue 1754950706.041299-windGust-windGustDir-windDir-windSpeed size is: 0

Aug 11 23:18:29 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) Queues are empty.

Aug 11 23:18:29 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: ecowitt/1C6920E3A8F3, QOS: 0, retain: False, payload: b'PASSKEY=ED62ACE35A6D1A6CBFFC085BAADF1F1A&stationtype=GW3000A_V1.1.0&runtime=638367&heap=73048&dateutc=2025-08-11%2022%3A18%3A29&dns_err_cnt=0&cdnflg=42&tempinf=79.16&humidityin=51&baromrelin=30.064&baromabsin=29.763&tempf=71.78&humidity=60&vpd=0.314&winddir=169&winddir_avg10m=150&windspeedmph=4.25&windgustmph=6.26&maxdailygust=13.20&solarradiation=0.00&uv=0&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&last24hrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.240&yearlyrainin=6.583&rrain_piezo=0.000&erain_piezo=0.000&hrain_piezo=0.000&last24hrain_piezo=0.000&drain_piezo=0.000&wrain_piezo=0.000&mrain_piezo=0.173&yrain_piezo=11.531&srain_piezo=0&ws90cap_volt=5.4&ws90_ver=143&lightning_num=0&lightning=24&lightning_time=1753979889&wh40batt=1.7&wh57batt=3&wh90batt=3.28&freq=868M&model=GW3000A&interval=60'

Aug 11 23:18:29 dvm weewxd[764736]: ERROR user.MQTTSubscribe: (Driver) MessageCallbackProvider on_message_keyword failed with <class 'user.MQTTSubscribe.ConversionError'> and reason Failed converting field PASSKEY with value ED62ACE35A6D1A6CBFFC085BAADF1F1A using 'lambda x: to_float(x)' with reason could not convert string to float: 'ED62ACE35A6D1A6CBFFC085BAADF1F1A'..

Aug 11 23:18:29 dvm weewxd[764736]: ERROR user.MQTTSubscribe: (Driver) **** MessageCallbackProvider Ignoring topic=ecowitt/1C6920E3A8F3 and payload=b'PASSKEY=ED62ACE35A6D1A6CBFFC085BAADF1F1A&stationtype=GW3000A_V1.1.0&runtime=638367&heap=73048&dateutc=2025-08-11%2022%3A18%3A29&dns_err_cnt=0&cdnflg=42&tempinf=79.16&humidityin=51&baromrelin=30.064&baromabsin=29.763&tempf=71.78&humidity=60&vpd=0.314&winddir=169&winddir_avg10m=150&windspeedmph=4.25&windgustmph=6.26&maxdailygust=13.20&solarradiation=0.00&uv=0&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&last24hrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.240&yearlyrainin=6.583&rrain_piezo=0.000&erain_piezo=0.000&hrain_piezo=0.000&last24hrain_piezo=0.000&drain_piezo=0.000&wrain_piezo=0.000&mrain_piezo=0.173&yrain_piezo=11.531&srain_piezo=0&ws90cap_volt=5.4&ws90_ver=143&lightning_num=0&lightning=24&lightning_time=1753979889&wh40batt=1.7&wh57batt=3&wh90batt=3.28&freq=868M&model=GW3000A&interval=60'

Aug 11 23:18:29 dvm weewxd[764736]: ERROR user.MQTTSubscribe: (Driver) **** MessageCallbackProvider Traceback (most recent call last):

                                      File "/home/dvm/weewx-data/bin/user/MQTTSubscribe.py", line 1441, in _convert_value

                                        return conversion_func['compiled'](value)

                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                                      File "<string>", line 1, in <lambda>

                                      File "/home/dvm/weewx-venv/lib/python3.11/site-packages/weeutil/weeutil.py", line 1584, in to_float

                                        return float(x) if x is not None else None

                                               ^^^^^^^^

                                    ValueError: could not convert string to float: 'ED62ACE35A6D1A6CBFFC085BAADF1F1A'

                                    

                                    The above exception was the direct cause of the following exception:

                                    

                                    Traceback (most recent call last):

                                      File "/home/dvm/weewx-data/bin/user/MQTTSubscribe.py", line 1560, in _on_message_keyword

                                        (fieldname, value) = self._update_data(key, field[eq_index + 1:].strip(), fields, fields_conversion_func, unit_system)

                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                                      File "/home/dvm/weewx-data/bin/user/MQTTSubscribe.py", line 1400, in _update_data

                                        value = self._convert_value(fields, default_field_conversion_func, orig_name, orig_value)

                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                                      File "/home/dvm/weewx-data/bin/user/MQTTSubscribe.py", line 1446, in _convert_value

                                        raise ConversionError(

                                    user.MQTTSubscribe.ConversionError: Failed converting field PASSKEY with value ED62ACE35A6D1A6CBFFC085BAADF1F1A using 'lambda x: to_float(x)' with reason could not convert string to float: 'ED62ACE35A6D1A6CBFFC085BAADF1F1A'.

Aug 11 23:18:31 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) TopicManager starting queue ecowitt/1C6920E3A8F3 size is: 0

Aug 11 23:18:31 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) TopicManager starting queue 1754950706.041299-windGust-windGustDir-windDir-windSpeed size is: 0

Aug 11 23:18:31 dvm weewxd[764736]: DEBUG user.MQTTSubscribe: (Driver) Queues are empty.








--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

vince

unread,
Aug 11, 2025, 6:39:59 PMAug 11
to weewx-user
I’m sure Rich will chime in but my first impression is you should ignore the elements within the reply that cannot be mapped to weewx db elements, so ignore everything to the left of tempinf in the payload

Ian Millard

unread,
Aug 11, 2025, 6:57:55 PMAug 11
to weewx...@googlegroups.com
Vince,
Bingo, you nailed it in one. It worked perfectly.
As always, thanks very much for your help.
Ian

Ian Millard

unread,
Aug 12, 2025, 1:08:20 AMAug 12
to weewx...@googlegroups.com
Just in case this is useful for anyone.

This is an example [MQTTSubscribeDriver] stanza to use in conjunction with Ecowitt MQTT weather service protocol which is now included in GW2000 and GW3000 gateway devices.

##############################################################################

[MQTTSubscribeDriver]
    driver = user.MQTTSubscribe
    host = broker.mqtt.cool
    port = 1883
    keepalive = 60
    username = None
    password = None
    binding = loop
    
    [[topics]]
        unit_system = US
        [[[ecowitt/1C6920E3A8F3]]]
           subscribe = True
           ignore = False
            [[[[message]]]]
                type = keyword
                keyword_delimiter = "&"
            [[[[PASSKEY]]]]
                ignore = True
            [[[[stationtype]]]]
                ignore = True
            [[[[runtime]]]]
                ignore = True
            [[[[dns_err_cnt]]]]
                ignore = True
            [[[[cdnflg]]]]
                ignore = True
            [[[[dateutc]]]]
                ignore = True
            [[[[freq]]]]
                ignore = True
            [[[[model]]]]
                ignore = True
            [[[[baromrelin]]]]
                name = barometer
            [[[[baromabsin]]]]
                name = pressure
            [[[[dailyrainin]]]]
                name = dayRain
            [[[[drain_piezo]]]]
                name = p_dayRain
            [[[[erain_piezo]]]]
                name = p_stormRain
            [[[[eventrainin]]]]
                name = stormRain
            [[[[hourlyrainin]]]]
                name = hourRain
            [[[[hrain_piezo]]]]
                name = p_hourRain
            [[[[humidityin]]]]
                name = inHumidity
            [[[[humidity]]]]
                name = outHumidity
            [[[[last24hrain_piezo]]]]
                name = p_24Rain
            [[[[last24hrainin]]]]
                name = 24Rain
            [[[[lightning]]]]
                name = lightning_dist
            [[[[lightning_num]]]]
                name = lightning_strike_count
            [[[[lightning_time]]]]
                name = lightning_last_det_time
            [[[[monthlyrainin]]]]
                name = monthRain
            [[[[mrain_piezo]]]]
                name = p_monthRain
            [[[[rainratein]]]]
                name = rainRate
            [[[[rrain_piezo]]]]
                name = p_rainRate
            [[[[solarradiation]]]]
               name = radiation
            [[[[srain_piezo]]]]
                name = isRaining
            [[[[tempf]]]]
                name = outTemp
            [[[[tempinf]]]]
               name = inTemp
            [[[[uv]]]]
                name = UV
            [[[[weeklyrainin]]]]
                name = weekRain
            [[[[wrain_piezo]]]]
                name = p_weekRain
            [[[[winddir]]]]
                name = windDir
            [[[[windgustmph]]]]
                name = windGust
            [[[[windspeedmph]]]]
               name = windSpeed
            [[[[yearlyrainin]]]]
                name = yearRain
            [[[[yrain_piezo]]]]
                name = p_yearRain

##############################################################################


bell...@gmail.com

unread,
Aug 12, 2025, 1:14:32 PMAug 12
to weewx-user
Thanks for sharing! Any interest in adding it to the examples repository at, https://github.com/bellrichm/WeeWX-MQTTSubscribe/tree/master/exampleConfigs?
rich

steepleian

unread,
Aug 12, 2025, 1:59:48 PMAug 12
to weewx...@googlegroups.com
Rich,
Yes will do.

I was thinking to myself, whilst I was working on this, would it be possible to add an option to generate the loop data as a file? In this way it would be a complete solution providing live data as well. I assume that this is possible but way above my pay grade.
Ian


On 12 Aug 2025, at 18:14, bell...@gmail.com <bell...@gmail.com> wrote:

Thanks for sharing! Any interest in adding it to the examples repository at, https://github.com/bellrichm/WeeWX-MQTTSubscribe/tree/master/exampleConfigs?

bell...@gmail.com

unread,
Aug 14, 2025, 8:23:33 PMAug 14
to weewx-user
Ian,
I have no interest in having MQTTSubscribe write to a file. It doesn’t fit into its purpose.
Aren’t there other WeeWX services that write loop data to a file?
What are you trying to accomplish?
rich

Ian Millard

unread,
Aug 15, 2025, 1:17:49 AMAug 15
to weewx...@googlegroups.com
Rich,
Don’t worry about that, it was me thinking out aloud. My purpose was to create a live data stream written directly to a web page. I have now worked out how to do this with a simple piece of Python code.
Ian

On 15 Aug 2025, at 01:23, bell...@gmail.com <bell...@gmail.com> wrote:

services

pa...@pauland.net

unread,
Aug 20, 2025, 10:03:26 AMAug 20
to weewx-user
Rainer,
I have a GW2000 and notice that when enabled the MQTT protocol uses " & " as the Topic level separator. This is problematic, because many MQTT clients expect  " / " to be the separator. Many clients such as Home Assistant do not allow a means to change the separator. I am aware that " & " is the common URL  separator but for MQTT it really should be "  / ". This would really help people who want to use the MQQT output in various clients.

From MQTT Version 5.0 OASIS Standard 07 March 2019
4.7.1.1 Topic level separator

The forward slash (‘/’ U+002F) is used to separate each level within a topic tree and provide a hierarchical structure to the Topic Names. The use of the topic level separator is significant when either of the two wildcard characters is encountered in Topic Filters specified by subscribing Clients. Topic level separators can appear anywhere in a Topic Filter or Topic Name. Adjacent Topic level separators indicate a zero-length topic level.

Thanks,
Paul

steepleian

unread,
Aug 20, 2025, 10:23:44 AMAug 20
to weewx...@googlegroups.com
Paul,
I am just about to release a new service extension which solves this issue. It subscribes to the Ecowitt topic and outputs a file in json data format. It’s working fine on my test server. Just need to package it up.
Ian


On 20 Aug 2025, at 15:03, pa...@pauland.net <pa...@pauland.net> wrote:

Rainer,

Paul R Anderson

unread,
Aug 22, 2025, 9:24:24 AMAug 22
to weewx...@googlegroups.com
That sounds like a great "work around" for some who use WeeWX. But I really wish the underlying  issue of using a non standard separator, which does not comply with the published MQTT standard.could be addressed and fixed. Design a device that offers to publish to a MQTT server, make it standard compliant , so that it will be easy to subscribe to that topic on a wide range of MQTT clients.

vince

unread,
Oct 9, 2025, 6:08:29 PM (6 days ago) Oct 9
to weewx-user
Just a quick update - the GW1200 with latest V1.4.0 firmware now supports posting to MQTT too.

I enabled it for a quick test and poked around a little with mosquitto_sub to look at what it sends and it looks like the same data elements that I'm getting for Gary's legacy GW1000 driver plus one additional element "srain_piezo" which we neglected to make known to his driver last year when I was working with him to support the WS85.  My best guess is that it means "state of raining (or not) on the piezo sensor" where 0 = not raining, 1 = raining.

Upside is you can set MQTT to send data as frequently as every 10 seconds.  Downside is the sensors don't send data that often so kinda why bother running faster than maybe every 30 seconds.

Re: the use of & my guess is this is WU protocol.  If you subscribe to topic_name/# you see a header ala:

POST /data/ip_api/ HTTP/1.1
HOST: cdnrtpdate.ecowitt.net
Connection: Close
Content-Type: application/x-www-form-urlencoded
Content-Length: 925

I have never configured my gateway to talk to ecowitt, so I don't know if it's actually trying to post data to ecowitt's servers (or not), but it sure looks fishy to me.

steepleian

unread,
Oct 10, 2025, 6:40:12 AM (6 days ago) Oct 10
to weewx...@googlegroups.com
Yes state of raining is correct. The piezo sensors update every 8.5 seconds on WS90. The MQTT payload from WS90 is unique which requires a bit of manipulation to use it.

On 9 Oct 2025, at 23:08, vince <vince...@gmail.com> wrote:

Just a quick update - the GW1200 with latest V1.4.0 firmware now supports posting to MQTT too.
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

michael.k...@gmx.at

unread,
Oct 10, 2025, 6:54:13 AM (6 days ago) Oct 10
to weewx-user
If you use a skin which supports MQTT, the 10s interval enables you showing wind, gust an direction in (almost) real time, at least very close to the WS90 broadcast interval of 8.5s.
Reply all
Reply to author
Forward
0 new messages