Hi all,
I just tried to integrate a lightning sensor attached to the GW1200 Gateway
into weewx with MQTTSubscribe
<https://github.com/bellrichm/WeeWX-MQTTSubscribe/blob/master/bin/user/MQTTSubscribe.py>
.
I enablede MQTT in the GW1200 but I struggle to get the data parsed.
The problem seems to be this added header in the MQTT message..?!
Any chance to get it working I didn't find a solution.
The MQTT message from the GW1200:
POST /data/ip_api/ HTTP/1.1
HOST: cdnrtpdate.ecowitt.net
Connection: Close
Content-Type: application/x-www-form-urlencoded
Content-Length: 353
PASSKEY=7EDF1C083D41E2564A22B916BBD1979C&stationtype=GW1200A_V1.4.8&runtime=1788421&heap=88084&dateutc=2026-08-20+21%3A24%3A41&dns_err_cnt=2&cdnflg=1&adc=1007,987,987,987,988&freq_volt=758&tempinf=75.92&humidityin=44&baromrelin=29.840&baromabsin=28.372&lightning_num=0&lightning=34&lightning_time=1787171122&wh57batt=5&freq=868M&model=GW1200A&interval=0
My config for MQTTSubscribeService VERSION = '3.1.0-rc01', running as a
service:
[[[ecowitt/gw1000]]] # The topic you are subscribing to
ignore = false
unit_system = METRICWX # Not sure weather you want METRICWX
or METRIC. See http://weewx.com/docs/customizing.htm#units
[[[[message]]]]
type = keyword
keyword_delimiter = "&"
# map MQTT field to WeeWX database field
[[[[PASSKEY]]]]
ignore = True
[[[[stationtype]]]]
ignore = True
[[[[runtime]]]]
ignore = True
[[[[heap]]]]
ignore = True
[[[[dateutc]]]]
ignore = True
[[[[dns_err_cnt]]]]
ignore = True
[[[[cdnflg]]]]
ignore = True
[[[[adc]]]]
ignore = True
[[[[freq_volt]]]]
ignore = True
[[[[tempinf]]]]
ignore = True
[[[[humidityin]]]]
ignore = True
[[[[baromrelin]]]]
ignore = True
[[[[baromabsin]]]]
ignore = True
[[[[wh57batt]]]]
ignore = True
[[[[freq]]]]
ignore = True
[[[[model]]]]
ignore = True
[[[[interval]]]]
ignore = True
[[[[lightning]]]]
name = lightning_dist
[[[[lightning_num]]]]
name = lightning_strike_count
[[[[lightning_time]]]]
name = lightning_last_det_time
My error/debug output form weewx:
2026-08-20T23:11:41.607918+02:00 weewx weewxd[1953952]: DEBUG
user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming
topic: ecowitt/gw1000, QOS: 0, retain: False, payload: b'POST /data/ip_api/
HTTP/1.1\r\nHOST: cdnrtpdate.ecowitt.net\r\nConnection:
Close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length:
353\r\n\r\nPASSKEY=7EDF1C083D41E2564A22B916BBD1979C&stationtype=GW1200A_V1.4.8&runtime=1787641&heap=88084&dateutc=2026-08-20+21%3A11%3A41&dns_err_cnt=2&cdnflg=1&adc=1007,987,987,987,988&freq_volt=758&tempinf=76.10&humidityin=44&baromrelin=29.843&baromabsin=28.375&lightning_num=0&lightning=34&lightning_time=1787171122&wh57batt=5&freq=868M&model=GW1200A&interval=0'
2026-08-20T23:11:41.608973+02:00 weewx weewxd[1953952]: ERROR
user.MQTTSubscribe: (Service) **** MessageCallbackProvider Ignoring
topic=ecowitt/gw1000 and payload=b'POST /data/ip_api/ HTTP/1.1\r\nHOST:
cdnrtpdate.ecowitt.net\r\nConnection: Close\r\nContent-Type:
application/x-www-form-urlencoded\r\nContent-Length:
353\r\n\r\nPASSKEY=7EDF1C083D41E2564A22B916BBD1979C&stationtype=GW1200A_V1.4.8&runtime=1787641&heap=88084&dateutc=2026-08-20+21%3A11%3A41&dns_err_cnt=2&cdnflg=1&adc=1007,987,987,987,988&freq_volt=758&tempinf=76.10&humidityin=44&baromrelin=29.843&baromabsin=28.375&lightning_num=0&lightning=34&lightning_time=1787171122&wh57batt=5&freq=868M&model=GW1200A&interval=0'
Any help would be appreciated.
Maybe bellrichm could give some hints to get it working...!?
Thanks in advance!
Christian
vince schrieb am Freitag, 10. Oktober 2025 um 00:08:29 UTC+2:
> 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.
>
> On Friday, August 22, 2025 at 6:24:24 AM UTC-7 Paul R Anderson wrote:
>
> 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.
>
>
>
>
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/weewx-user/d67ab855-2203-4870-ba29-62b70daf30f0n%40googlegroups.com.