WeatherFlowUDP driver for Tempest Weatherstations

404 weergaven
Naar het eerste ongelezen bericht

Ton Karsten

ongelezen,
14 feb 2024, 09:31:5014 feb
aan weewx-user
I use the WeatherFlow Tempest for my weather station.
I have equipped my weather station with the latest version of weewx.
Is the WeatherFlowUDP driver suitable for weewx 5.x and has this been tested?
I'm not sure if the installation will go without errors.

Tom Hogland

ongelezen,
14 feb 2024, 10:26:5914 feb
aan weewx-user
I'm currently using WeatherflowUDP with weewx 5.0.2 and it's working fine.

Ton Karsten

ongelezen,
14 feb 2024, 10:47:1714 feb
aan weewx-user
Thanks for sharing.
Which version are you using?
This: https://github.com/captain-coredump/weatherflow-udp
Or this one: https://github.com/rongrimes/weewx-tempest-pi

Op woensdag 14 februari 2024 om 16:26:59 UTC+1 schreef Tom Hogland:

vince

ongelezen,
14 feb 2024, 12:12:2614 feb
aan weewx-user
The weatherflow-udp driver works just fine on v5.

Ton Karsten

ongelezen,
14 feb 2024, 12:32:2514 feb
aan weewx...@googlegroups.com
Okay thanks.

Op wo 14 feb 2024 om 18:12 schreef vince <vince...@gmail.com>:
--
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 on the web visit https://groups.google.com/d/msgid/weewx-user/50f83928-617b-447c-98a1-daff5f80964bn%40googlegroups.com.

Ton Karsten

ongelezen,
15 feb 2024, 10:55:3815 feb
aan weewx-user
When I restart weexw with the WeatherFlowUDP driver in use, I get the following error messages once:
feb 15 16:00:17 raspberrypi weewxd.py[8060]: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket False...
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: *** Traceback (most recent call last):
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 384, in run_loop
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     self.process_record(_record, dbmanager)
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 438, in process_record
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     _payload = self.get_post_body(_full_record)
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 1560, in get_post_body
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     json_body = json.dumps(body)
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***                 ^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     return _default_encoder.encode(obj)
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     chunks = self.iterencode(o, _one_shot=True)
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     return _iterencode(o, 0)
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***            ^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***   File "/usr/lib/python3.11/json/encoder.py", line 180, in default
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: ***     raise TypeError(f'Object of type {o.__class__.__name__} '
feb 15 16:00:17 raspberrypi weewxd[8060]: ERROR weewx.restx: *** TypeError: Object of type method is not JSON serializable
feb 15 16:00:17 raspberrypi weewxd[8060]: CRITICAL weewx.restx: StationRegistry: Thread terminating. Reason: Object of type method is not JSON serializable
feb 15 16:00:17 raspberrypi weewxd[8060]: Exception in thread StationRegistry:
feb 15 16:00:17 raspberrypi weewxd[8060]: Traceback (most recent call last):
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
feb 15 16:00:17 raspberrypi weewxd[8060]:     self.run()
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/share/weewx/weewx/restx.py", line 359, in run
feb 15 16:00:17 raspberrypi weewxd[8060]:     self.run_loop()
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/share/weewx/weewx/restx.py", line 384, in run_loop
feb 15 16:00:17 raspberrypi weewxd[8060]:     self.process_record(_record, dbmanager)
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/share/weewx/weewx/restx.py", line 438, in process_record
feb 15 16:00:17 raspberrypi weewxd[8060]:     _payload = self.get_post_body(_full_record)
feb 15 16:00:17 raspberrypi weewxd[8060]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/share/weewx/weewx/restx.py", line 1560, in get_post_body
feb 15 16:00:17 raspberrypi weewxd[8060]:     json_body = json.dumps(body)
feb 15 16:00:17 raspberrypi weewxd[8060]:                 ^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/lib/python3.11/json/__init__.py", line 231, in dumps
feb 15 16:00:17 raspberrypi weewxd[8060]:     return _default_encoder.encode(obj)
feb 15 16:00:17 raspberrypi weewxd[8060]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
feb 15 16:00:17 raspberrypi weewxd[8060]:     chunks = self.iterencode(o, _one_shot=True)
feb 15 16:00:17 raspberrypi weewxd[8060]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
feb 15 16:00:17 raspberrypi weewxd[8060]:     return _iterencode(o, 0)
feb 15 16:00:17 raspberrypi weewxd[8060]:            ^^^^^^^^^^^^^^^^^
feb 15 16:00:17 raspberrypi weewxd[8060]:   File "/usr/lib/python3.11/json/encoder.py", line 180, in default
feb 15 16:00:17 raspberrypi weewxd[8060]:     raise TypeError(f'Object of type {o.__class__.__name__} '
feb 15 16:00:17 raspberrypi weewxd[8060]: TypeError: Object of type method is not JSON serializable
feb 15 16:00:17 raspberrypi weewxd[8060]: INFO user.belchertown: version 1.3.1

Are these reports serious?
Op woensdag 14 februari 2024 om 18:32:25 UTC+1 schreef Ton Karsten:

Tom Keffer

ongelezen,
15 feb 2024, 17:05:1815 feb
aan weewx...@googlegroups.com
Potentially. The station registry is being passed some bad information. It's possible that information is needed elsewhere in the program.

Set debug=1, then restart weewxd. Post the log from startup through the first reporting cycle.

Also, please note which version of the driver you ended up using.

-tk


pmcg...@gmail.com

ongelezen,
17 feb 2024, 08:22:3317 feb
aan weewx-user
I am seeing the same issue.  Here is my startup through a reporting cycle log with debug=1

Feb 17 06:07:18 Garagepi weewxd-weatherflow[1999]: INFO weewx.engine: Using binding 'wx_binding' to database 'weatherflow.sdb'
Feb 17 06:07:18 Garagepi weewxd-weatherflow[1999]: INFO weewx.manager: Starting backfill of daily summaries
Feb 17 06:07:18 Garagepi weewxd-weatherflow[1999]: INFO weewx.manager: Daily summaries up to date
Feb 17 06:07:18 Garagepi weewxd-weatherflow[1999]: INFO weewx.engine: Starting main packet loop.
Feb 17 06:07:18 Garagepi weewxd-weatherflow[1999]: INFO user.weatherflowudp: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Feb 17 06:07:28 Garagepi weewxd-weatherflow[1999]: INFO weewx.wxxtypes: Type beaufort has been deprecated. Use unit beaufort instead.
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: INFO __main__: Received signal TERM (15).
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: INFO weewx.engine: Main loop exiting. Shutting engine down.
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG weewx.restx: Shut down StationRegistry thread.
Feb 17 06:07:57 Garagepi systemd[1]: Stopping WeeWX weatherflow...
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: INFO __main__: Terminating weewx version 5.0.2
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****  Traceback (most recent call last):
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****    File "/usr/share/weewx/weewxd.py", line 166, in main
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****      engine.run()
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 204, in run
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****      for packet in self.console.genLoopPackets():
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****    File "/etc/weewx/bin/user/weatherflowudp.py", line 290, in genLoopPackets
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****      for udp_packet in self.gen_udp_packets():
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****    File "/etc/weewx/bin/user/weatherflowudp.py", line 310, in gen_udp_packets
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****      m0, host_info = sock.recvfrom(1024)
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****    File "/usr/share/weewx/weewxd.py", line 260, in sigTERMhandler
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****      raise Terminate
Feb 17 06:07:57 Garagepi weewxd-weatherflow[1999]: DEBUG __main__:     ****  Terminate
Feb 17 06:07:57 Garagepi systemd[1]: we...@weatherflow.service: Main process exited, code=killed, status=15/TERM
Feb 17 06:07:57 Garagepi systemd[1]: we...@weatherflow.service: Succeeded.
Feb 17 06:07:57 Garagepi systemd[1]: Stopped WeeWX weatherflow.
Feb 17 06:07:57 Garagepi systemd[1]: Started WeeWX weatherflow.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Initializing weewxd version 5.0.2
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Command line: /usr/share/weewx/weewxd.py --log-label weewxd-weatherflow /etc/weewx/weatherflow.conf
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Using Python 3.7.3 (default, Oct 11 2023, 09:51:27) #012[GCC 8.3.0]
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Located at /usr/bin/python3
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Platform Linux-5.10.103-v7+-armv7l-with-debian-10.13
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Locale: 'en_US.UTF-8'
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Entry path: /usr/share/weewx/weewxd.py
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: WEEWX_ROOT: /etc/weewx
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Configuration file: /etc/weewx/weatherflow.conf
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: User module: /etc/weewx/bin/user
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Debug: 1
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG __main__: Initializing engine
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: Loading station type WeatherFlowUDP (user.weatherflowudp)
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: driver version is 1.11
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: sensor map is {'outTemp': 'air_temperature.ST-00000353.obs_st', 'outHumidity': 'relative_humidity.ST-00000353.obs_st', 'pressure': 'station_pressure.ST-00000353.obs_st', 'lightning_strike_count': 'lightning_strike_count.ST-00000353.obs_st', 'lightning_distance': 'lightning_strike_avg_distance.ST-00000353.obs_st', 'outTempBatteryStatus': 'battery.ST-00000353.obs_st', 'windSpeed': 'wind_speed.ST-00000353.rapid_wind', 'windDir': 'wind_direction.ST-00000353.rapid_wind', 'luminosity': 'illuminance.ST-00000353.obs_st', 'UV': 'uv.ST-00000353.obs_st', 'rain': 'rain_accumulated.ST-00000353.obs_st', 'radiation': 'solar_radiation.ST-00000353.obs_st'}
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: *** Sensor names per packet type
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: packet obs_air: ('time_epoch', 'station_pressure', 'air_temperature', 'relative_humidity', 'lightning_strike_count', 'lightning_strike_avg_distance', 'battery', 'report_interval')
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: packet obs_sky: ('time_epoch', 'illuminance', 'uv', 'rain_accumulated', 'wind_lull', 'wind_avg', 'wind_gust', 'wind_direction', 'battery', 'report_interval', 'solar_radiation', 'local_day_rain_accumulation', 'precipitation_type', 'wind_sample_interval')
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: packet rapid_wind: ('time_epoch', 'wind_speed', 'wind_direction')
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: packet evt_precip: ('time_epoch',)
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: packet evt_strike: ('time_epoch', 'distance', 'energy')
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: packet obs_st: ('time_epoch', 'wind_lull', 'wind_avg', 'wind_gust', 'wind_direction', 'wind_sample_interval', 'station_pressure', 'air_temperature', 'relative_humidity', 'illuminance', 'uv', 'solar_radiation', 'rain_accumulated', 'precipitation_type', 'lightning_strike_avg_distance', 'lightning_strike_count', 'battery', 'report_interval')
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: StdConvert target unit is 0x1
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdQC
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.manager: Daily summary version is 4.0
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.wxxtypes.StdWXXTypes
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdWXXTypes
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.wxxtypes.StdPressureCooker
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdPressureCooker
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.wxxtypes.StdRainRater
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdRainRater
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.wxxtypes.StdDelta
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdDelta
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: Archive will use data binding wx_binding
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: Record generation will be attempted in 'hardware'
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.restx: StationRegistry: Station will be registered.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.restx: Wunderground: Posting not enabled.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.restx: PWSweather: Posting not enabled.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.restx: CWOP: Posting not enabled.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.restx: WOW: Posting not enabled.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.restx: AWEKAS: Posting not enabled.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Loading service weewx.engine.StdReport
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: 'pyephem' detected, extended almanac data is available
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO __main__: Starting up weewx version 5.0.2
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.engine: Station does not support reading the time
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: Using binding 'wx_binding' to database 'weatherflow.sdb'
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.manager: Starting backfill of daily summaries
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.manager: Daily summaries up to date
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO weewx.engine: Starting main packet loop.
Feb 17 06:07:58 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Feb 17 06:08:07 Garagepi weewxd-weatherflow[2016]: INFO weewx.wxxtypes: Type beaufort has been deprecated. Use unit beaufort instead.
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: INFO weewx.manager: Added record 2024-02-17 06:10:00 MST (1708175400) to database 'weatherflow.sdb'
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: INFO weewx.manager: Added record 2024-02-17 06:10:00 MST (1708175400) to daily summary in 'weatherflow.sdb'
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: StationRegistry: Unexpected exception of type <class 'TypeError'>
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Running reports for latest time in the database.
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Running report 'SeasonsReport'
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: *** Traceback (most recent call last):
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 384, in run_loop
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     self.process_record(_record, dbmanager)
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 438, in process_record
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     _payload = self.get_post_body(_full_record)
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/share/weewx/weewx/restx.py", line 1560, in get_post_body
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     json_body = json.dumps(body)
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/lib/python3.7/json/__init__.py", line 231, in dumps
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     return _default_encoder.encode(obj)
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/lib/python3.7/json/encoder.py", line 199, in encode
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     chunks = self.iterencode(o, _one_shot=True)
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     return _iterencode(o, 0)
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***   File "/usr/lib/python3.7/json/encoder.py", line 179, in default
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: ***     raise TypeError(f'Object of type {o.__class__.__name__} '
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: ERROR weewx.restx: *** TypeError: Object of type method is not JSON serializable
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: CRITICAL weewx.restx: StationRegistry: Thread terminating. Reason: Object of type method is not JSON serializable
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Seasons_WF/skin.conf for report 'SeasonsReport'
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Running generators for report 'SeasonsReport' in directory '/etc/weewx/skins/Seasons_WF'
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.DisplayOptions', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.Gettext', 'weewx.cheetahgenerator.JSONHelpers', 'weewx.cheetahgenerator.PlotInfo', 'weewx.cheetahgenerator.SkinInfo', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo']
Feb 17 06:10:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.manager: Daily summary version is 4.0
Feb 17 06:10:33 Garagepi weewxd-weatherflow[2016]: INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 4.45 seconds
Feb 17 06:10:33 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.manager: Daily summary version is 4.0
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 1.18 seconds
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: INFO weewx.reportengine: Copied 5 files to /var/www/html/weatherflow
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Feb 17 06:10:34 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: INFO weewx.manager: Added record 2024-02-17 06:15:00 MST (1708175700) to database 'weatherflow.sdb'
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: INFO weewx.manager: Added record 2024-02-17 06:15:00 MST (1708175700) to daily summary in 'weatherflow.sdb'
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Running reports for latest time in the database.
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Running report 'SeasonsReport'
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: INFO user.weatherflowudp: Listening for UDP broadcasts to IP address <broadcast> on port 50222, with timeout 90 and share_socket True...
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Seasons_WF/skin.conf for report 'SeasonsReport'
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.reportengine: Running generators for report 'SeasonsReport' in directory '/etc/weewx/skins/Seasons_WF'
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.DisplayOptions', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.Gettext', 'weewx.cheetahgenerator.JSONHelpers', 'weewx.cheetahgenerator.PlotInfo', 'weewx.cheetahgenerator.SkinInfo', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo']
Feb 17 06:15:28 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.manager: Daily summary version is 4.0
Feb 17 06:15:32 Garagepi weewxd-weatherflow[2016]: INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 3.37 seconds
Feb 17 06:15:32 Garagepi weewxd-weatherflow[2016]: DEBUG weewx.manager: Daily summary version is 4.0
Feb 17 06:15:33 Garagepi weewxd-weather

vince

ongelezen,
17 feb 2024, 13:49:0617 feb
aan weewx-user
Tom - I can duplicate this here with 5.0.2 running vs. my wfudpsimulator tool since I don't have actual hardware any more

If registering is enabled, you get that error when the archive period rolls around.

I added some debugging to restx that might help. 

        # Delay the registration by a random amount so all stations don't hit the server
        # at the same time.
        _registry_dict.setdefault('delay_post', random.randint(0, 45))

        log.info("StationRegistry _registry_dict: %s", _registry_dict)

Which outputs....

2024-02-17T10:36:57.489015-08:00 raspberrypi weewxd[1902]: INFO weewx.restx: StationRegistry _registry_dict: {'log_success': True, 'log_failure': True, 'station_url': 'https://www.example.com/no-station-here', 'station_type': 'WeatherFlowUDP', 'description': 'WeatherflowUDP Simulator test station', 'latitude': 47.31, 'longitude': -122.36, 'station_model': <bound method WeatherFlowUDPDriver.hardware_name of <user.weatherflowudp.WeatherFlowUDPDriver object at 0xf6ff9670>>, 'config_path': '/home/pi/weewx-data/weewx.conf', 'entry_path': '/home/pi/weewx-venv/lib/python3.11/site-packages/weewxd.py', 'delay_post': 39}

 Notice the station_model value.  Looks a little odd....

The driver sets the following....

# Default settings...
DRIVER_VERSION = "1.10"
HARDWARE_NAME = "WeatherFlow"
DRIVER_NAME = 'WeatherFlowUDP'

Notice the single quotes around DRIVER_NAME there ?
Perhaps some obscure single vs. double quote thing going on ?


bell...@gmail.com

ongelezen,
17 feb 2024, 16:44:3817 feb
aan weewx-user
Theory:
Drivers are suppose to implement hardware_name as a property. The driver is missing the @property for hardware_name. When WeeWX accesses it as property, for example, instance.hardware_name it returns the function definition.
Try adding the @property decorator to hardware_name in the driver. (I did some minor testing by removing it in my driver)
If this is it, I am stumped why it ever worked….
rich

vince

ongelezen,
17 feb 2024, 17:24:1317 feb
aan weewx-user
There are 75 currently registered sites using this driver but 'all' are showing as running 4.x so I'm guessing something changed in v5 weewx......

Tom Keffer

ongelezen,
17 feb 2024, 18:45:3817 feb
aan weewx...@googlegroups.com
The difference is that to upload to the station registry, V5 uses an HTTP POST with a serialized JSON payload, while V4 uses an HTTP GET.  The GET sent an "unbound method" to the registry as a query parameter. We get a lot of those, so I included a bit of code to salvage the hardware type from the "unbound method" parameter. Hence, no one noticed.



--
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

ongelezen,
18 feb 2024, 01:01:0518 feb
aan weewx-user
Meaning what for users or devs ?

bell...@gmail.com

ongelezen,
18 feb 2024, 10:14:1418 feb
aan weewx-user
Ah, I see that now. Thanks.

bell...@gmail.com

ongelezen,
18 feb 2024, 10:16:1718 feb
aan weewx-user

I’d try adding the missing @property decorator. All signs point to that being the problem. It can’t hurt and it fixes a bug.

vince

ongelezen,
18 feb 2024, 13:30:4418 feb
aan weewx-user
I tried to do so but am still getting BAD REQUEST trying to register a test pi.  Of course now it'll wait a day til trying again.  Sigh.

I opened https://github.com/weewx/weewx/issues/936 on this one rather than get multiple conversations all cross-intermingled here.

bell...@gmail.com

ongelezen,
18 feb 2024, 14:03:0718 feb
aan weewx-user
Quick look of the code and it looks like  ‘example.com’ is rejected. Seems the error logging could be improved. I’ll poke around and see if I can create a decent pull request. But, I may have to defer to the experts.

vince

ongelezen,
18 feb 2024, 15:07:5318 feb
aan weewx-user
I can confirm that adding @property in the driver and restarting weewx 'does' work as a workaround, assuming you didn't use example.com as your host (sigh - another undocumented thing).

    # add the next line here around line 289 in the driver or so...
    @property
    def hardware_name(self):
        return HARDWARE_NAME

So there's at least one WeatherFlowUDP v5 system registered now.  Cool.

Thanks Rich !

bell...@gmail.com

ongelezen,
18 feb 2024, 15:41:3718 feb
aan weewx-user

Good to here. Work around or bug fix, I guess that is in the eye of the beholder….
While the docs may need some ‘sprucing up’, if one performs static code analysis; the error is pretty obvious. Here is the lint error I got when I removed it
‘bin/user/MQTTSubscribe.py:2155:4: W0236: Method 'hardware_name' was expected to be 'property', found it instead as 'method' (invalid-overridden-method)‘
rich

vince

ongelezen,
18 feb 2024, 17:11:4018 feb
aan weewx-user
Not at all obvious to my eyes, nor do I know how to lint to find that stuff, but you're better at this than I am :-)

FWIW - I have a fork of this driver that I added this workaround to...
Changes from the upstream 1.10 version that's been stable for years...
  • added this @property line so v5 registration works vs. this driver
  • I also add a full Tempest sensor map on a clean installation so you don't need to do any cut+paste (other than editing your sensor ID in)
  • added v5 installation note re: weectl
  • and bumped the version string and changelog of course
I'll ask the upstream author again to merge my PR these changes are on but last I checked he was kinda busy with having a life too. 

Hope this helps.

vince

ongelezen,
18 feb 2024, 19:33:4118 feb
aan weewx-user
Update - the upstream author was nice enough to merge my PR for this problem, so you can simply upgrade your driver to the latest version and your station registration should work again with weewx v5.

sudo systemctl restart weewx

After upgrading your driver you should see the following output from 'weectl extension list':

Extension Name    Version   Description
weatherflowudp    1.10.2    Capture data from WeatherFlow Bridge via UDP broadcast packets


Thanks again Rich for the nudge(s) !!!

bell...@gmail.com

ongelezen,
18 feb 2024, 19:36:1718 feb
aan weewx-user
Thanks for pushing it over the goal line. Always the hardest part.

Ton Karsten

ongelezen,
19 feb 2024, 04:25:2819 feb
aan weewx...@googlegroups.com
Thank you for resolving the error message.

Op ma 19 feb 2024 om 01:36 schreef bell...@gmail.com <bell...@gmail.com>:
--
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.

Jamie Stephens

ongelezen,
19 feb 2024, 19:09:1619 feb
aan weewx-user
Thanks for the fix, I didn't;t even noticed it was not working

Jamie Stephens

ongelezen,
22 feb 2024, 08:43:4322 feb
aan weewx-user
mmmm thread exited last night and won't restart
Feb 21 17:08:31 weewx weewxd[763]:   File "/usr/share/weewx/weewxd.py", line 166, in main
Feb 21 17:08:31 weewx weewxd[763]:     engine.run()
Feb 21 17:08:31 weewx weewxd[763]:   File "/usr/share/weewx/weewx/engine.py", line 204, in run
Feb 21 17:08:31 weewx weewxd[763]:     for packet in self.console.genLoopPackets():
Feb 21 17:08:31 weewx weewxd[763]:   File "/etc/weewx/bin/user/weatherflowudp.py", line 313, in genLoopPackets
Feb 21 17:08:31 weewx weewxd[763]:     m0 = m[0].replace(",null",",None")                 # Python 2
Feb 21 17:08:31 weewx weewxd[763]: TypeError: a bytes-like object is required, not 'str'
Feb 21 17:08:31 weewx systemd[1]: weewx.service: Main process exited, code=exited, status=1/FAILURE
Feb 21 17:08:31 weewx systemd[1]: weewx.service: Failed with result 'exit-code'.
Feb 21 17:08:31 weewx systemd[1]: weewx.service: Consumed 39min 16.609s CPU time.

Jamie Stephens

ongelezen,
22 feb 2024, 09:00:4822 feb
aan weewx-user
i manually restarted it and it's running right now just the registry push error but not exited 
Feb 22 08:50:19 weewx weewxd[68909]: ERROR weewx.restx: StationRegistry: Failed to publish record 2024-02-22 08:50:00 EST (17086098>

will report back if weewx crashes again

On Monday, February 19, 2024 at 7:09:16 PM UTC-5 Jamie Stephens wrote:

Tom Keffer

ongelezen,
22 feb 2024, 10:07:4522 feb
aan weewx...@googlegroups.com
It looks like the author of the driver is trying to insert a string into a byte array. You should file an issue on the repository's issue list.

Jamie Stephens

ongelezen,
22 feb 2024, 10:24:2322 feb
aan weewx-user
Thanks Tom, this is the new updated driver that Vince got pushed on this thread. maybe it was a one off 

vince

ongelezen,
22 feb 2024, 13:20:1622 feb
aan weewx-user
Jamie - I didn't change anything related to how the driver actually works.  I just added one line to hopefully get it to register vs. v5 weewx.  The map shows a few v5 sites using that driver now, so that part seems to be working.

Jamie Stephens

ongelezen,
23 feb 2024, 15:10:5423 feb
aan weewx-user
i went ahead and opened up a issue with the driver, had another crash today

vince

ongelezen,
23 feb 2024, 20:29:2323 feb
aan weewx-user
Source is at https://github.com/captain-coredump/weatherflow-udp/blob/master/bin/user/weatherflowudp.py if some driver experts wanted to suggest fixes. This one is beyond me other than to suggest that since weewx v5 does not support python2 anymore that perhaps the try/except block needs something tweaked to deal with what I'm guessing (like totally guessing) is garbage-in a little more gracefully (anybody ?????)

            if timeouterr == 0:
                try:
                    m0 = str(m[0],'utf-8').replace(",null",",None")    # Python 3
                except:

                    m0 = m[0].replace(",null",",None")                 # Python 2
                m1=''
                try:
                    m1=eval(m0)
                except SyntaxError:
                    logerr('Packet parse error: %s' % m0)
                if self._log_raw_packets:
                    loginf('raw packet: %s' % m1)
                m2=parseUDPPacket(m1)
                m3=sendMyLoopPacket(m2, self._sensor_map)
                if len(m3) > 2:
                    yield m3

Jamie Stephens

ongelezen,
23 feb 2024, 21:29:2923 feb
aan weewx-user
I'm not code savvy but I seem to recall I personally was running this fork from tkeffer that he ported to python 3 
I might roll back tot hat and see if the issue go away, I don't think it was ever committed to the main

Jamie Stephens

ongelezen,
26 feb 2024, 17:24:2226 feb
aan weewx...@googlegroups.com
FYI no issues  with Tom’s driver.  Just not registered 

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/JWTsu4s3TvY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8b15753c-088a-449b-87af-d7b37de9a15en%40googlegroups.com.
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten