The driver with the IMHO best support for both, the ecowitt devices and the
driver itself, is currently this
one: https://github.com/Millardiang/weewx-ecowittGateway
I highly recommend you to look into it.
Michael Waldor schrieb am Montag, 16. November 2026 um 08:15:02 UTC+1:
> Just yesterday the ecowitt driver did crash unexpectedly after many weeks
> of runtime. It did not recover automatically - instead I had to restart
> weewx manually. See below the error messages
> (weewx-ecowitt_http_updatedriver_0.3.4.zip from WernerKr - I'm aware of
> 0.3.5, but it does add sensors, no changes at locations of crash). As far
> as I can tell there was no network problem at that time (OK, there was an
> automatic channel switch for 5GHz at 20:53:02, but that happens regularly).
> Please note the time gap - first errors are recovered at 19:46, failure was
> around 1h later
>
> Nov 15 19:41:50 imurr9 weewxd[577]: ERROR user.ecowitt_http: URL - Failed
> to get device data on attempt 1 of 3
> Nov 15 19:41:50 imurr9 weewxd[577]: ERROR user.ecowitt_http: ****
> <urlopen error timed out>
> Nov 15 19:41:50 imurr9 weewxd[577]: ERROR user.ecowitt_http: Unable to
> obtain live sensor data
> Nov 15 19:41:51 imurr9 weewxd[577]: CRITICAL __main__: Caught WeeWxIOError:
> Nov 15 19:41:51 imurr9 weewxd[577]: CRITICAL __main__: **** Waiting
> 60.0 seconds then retrying...
> Nov 15 19:42:58 imurr9 weewxd[577]: ERROR user.ecowitt_http: URL - Failed
> to get device data on attempt 1 of 3
> Nov 15 19:42:58 imurr9 weewxd[577]: ERROR user.ecowitt_http: **** HTTP
> Error 404: Not Found
> Nov 15 19:46:20 imurr9 weewxd[577]: ERROR weewx.restx: StationRegistry:
> Failed to publish record 2026-11-15 19:45:00 CET (1794768300): HTTP Error
> 429: TOO MANY REQUESTS
>
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> Traceback (most recent call last):
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> File "/etc/weewx/bin/user/ecowitt_http.py", line 7074, in run
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> self.client.collect()
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> File "/etc/weewx/bin/user/ecowitt_http.py", line 6923, in collect
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> queue_data = self.get_current_data()
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> File "/etc/weewx/bin/user/ecowitt_http.py", line 7016, in get_current_data
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> curr_data.update(self.device.get_sensors_data())
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> File "/etc/weewx/bin/user/ecowitt_http.py", line 13450, in get_sensors_data
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> sensors_data = self.api.get_sensors_info()
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> File "/etc/weewx/bin/user/ecowitt_http.py", line 7300, in get_sensors_info
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> page_2 = self.request('get_sensors_info', data={'page': 2})
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> File "/etc/weewx/bin/user/ecowitt_http.py", line 7198, in request
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> resp = resp.replace(old, new)
> Nov 15 20:53:21 imurr9 weewxd[577]: CRITICAL user.ecowitt_http: ****
> UnboundLocalError: local variable 'resp' referenced before assignment
>
>
> Doc Matt schrieb am Montag, 28. September 2026 um 18:57:56 UTC+2:
>
>> FWIW I've seen crashes in ecowitt_http for the following reasons:
>>
>> - no SD card installed in GW3000
>> - gateway is currently rebooting and does not respond in time
>> - gateway has no upstream sensor data (battery gone on the weather
>> station?), so there's no catchup data file for "today". This one hits just
>> after midnight, following any upstream outage.
>>
>> The systemd retry workaround seems effective, but there's a lot of holes
>> to fall into here.
>>
>> On Wednesday, August 5, 2026 at 2:45:47 PM UTC+1 matthew wall wrote:
>>
>>>
>>>
>>> > On Aug 5, 2026, at 02:18, 'Michael Waldor' via weewx-user <
>>> [email protected]> wrote:
>>> >
>>> > Of course the driver EcowittHttp relies on a working network
>>> connection. But during boot weewx might be started too early before network
>>> is up. In that exceptional case weewx will crash:
>>> >
>>> > CRITICAL __main__: **** File "/etc/weewx/bin/user/ecowitt_http.py",
>>> line 6775> CRITICAL __main__: **** if self.collector.device.model is not
>>> None: CRITICAL __main__: **** File "/etc/weewx/bin/user/ecowitt_http.py",
>>> line 13722> CRITICAL __main__: **** version_data = self.api.get_version()
>>> CRITICAL __main__: **** File "/etc/weewx/bin/user/ecowitt_http.py", line
>>> 7224> CRITICAL __main__: **** raise DeviceIOError(f"Failed to obtain
>>> 'get_version' data: {e}")> CRITICAL __main__: ****
>>> user.ecowitt_http.DeviceIOError: Failed to obtain 'get> CRITICAL __main__:
>>> **** Exiting.
>>> >
>>> > I myself have resolved that issue on my raspberry pi4 by enabling
>>> "wait on network" before starting other services.
>>>
>>> this behavior is by design. when a driver fails during initialization,
>>> it is *supposed* to fail hard - that way you can figure out what is
>>> happening and fix it.
>>>
>>> in this particular case, the solution is to either set
>>> "loop_on_init=True", or fix your system configuration so that networking is
>>> established before weewx starts up.
>>>
>>> details:
>>>
>>> there are some drivers and weewx installations that never use
>>> networking. in those cases, they do not need the system to have networking
>>> before weewx starts.
>>>
>>> there are some installations of the ecowitt driver that are bound to a
>>> specific ip address, others use the discovery option to automatically find
>>> an ecowitt station on the network. there are some installations that have
>>> multiple weewx instances, each of which talks to a different ecowitt
>>> station. this requires binding to an address instead of discovery. in the
>>> binding case, it is useful to have the driver fail hard when it cannot
>>> contact the ecowitt station - that indicates that the ip address of the
>>> station has changed, or the station is not online, or ...
>>>
>>>
>>>
>>>
--
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/375f5b93-b250-4d82-bff3-aa1f0dc8ea3cn%40googlegroups.com.