Be a little careful re: how ecowitt devices report battery status.  Ecowitt 
is not consistent. Some devices 0=good.  Some devices report a voltage.

On Thursday, November 19, 2026 at 12:22:22 AM UTC-8 Michael Waldor wrote:

> In the meantime I can answer my question from above myself: ecowittGateway 
> does report the battery states as far as possible - the state is either 0 
> for good or 1 for bad. The other not-populated fields do not really match 
> one-to-one to the data provided by ecowitt. Thus best is to store them 
> separately for usage by skin developers. 
>
> Regards, Michael
> Michael Waldor schrieb am Mittwoch, 18. November 2026 um 14:59:42 UTC+1:
>
>> It was really a pleasure to switch from ecowit_HTTP to ecowittGateway by 
>> using weectl - it worked out of the box within 10mins. I only had to 
>> manually activate "wn32_indoor = True" - but maybe I've missed the 
>> installation question on that.
>>
>> A final question w.r.t. battery status: I do see the standard database 
>> fields within weewx.sdb out/inTempBatteryStatus with values 0.0. And there 
>> are other database fields like rxCheckPercent, txBatteryStatus, 
>> consBatteryVoltage - all NULL. Does my ecowitt station WS3900 not report 
>> some of them? I've not discovered any battery related fields within the new 
>> ecowitt_additions.sdb. But it provides rss & sig data - great!
>>
>> Big thanks @milliardiang
>>
>> [email protected] schrieb am Mittwoch, 18. November 2026 um 11:49:38 
>> UTC+1:
>>
>>> Just install a new weewx instance in a venv, set everything up and then 
>>> migrate the exisiting database to the new setup.
>>> https://weewx.com/docs/5.5/quickstarts/pip/
>>>
>>> Michael Waldor schrieb am Mittwoch, 18. November 2026 um 10:42:00 UTC+1:
>>>
>>>> Thanks for all your hints. I'll switch over to Ian's version.
>>>>
>>>> I guess that one must stop a running weewx instance using Ecowitt_HTTP 
>>>> before using weectl to install ecowittGateway, correct?
>>>> Otherwise tweaks done by ecowittGateway during installation to 
>>>> /etc/weewx.conf might interfere with the active running weewx.
>>>>
>>>> Regards, Michael
>>>>
>>>>
>>>> Dr__Bob schrieb am Dienstag, 17. November 2026 um 20:14:37 UTC+1:
>>>>
>>>>> And Ian’s version does fix the issue of weewx crashing on network 
>>>>> errors.  
>>>>>
>>>>> On Sunday, November 15, 2026 at 11:43:39 PM UTC-8 [email protected] 
>>>>> wrote:
>>>>>
>>>>>> 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/7e0ffedd-8f32-42fc-b58c-668eed6d575en%40googlegroups.com.

Reply via email to