weewx stop working after upgrading from 3.6.x to 3.9.1

102 views
Skip to first unread message

St. B.

unread,
Jun 3, 2019, 4:49:17 PM6/3/19
to weewx-user
Hi, 

I decided (because my WU forecast where not working anymore) to update weewx to 3.9.1. on my raspberry running debian stretch.
downloaded the weewx.3.9.1.all.deb installed, and kept my conf files.
Upon install completion, no restart of the service.

When starting, weewx starts the mainloop then shutsdown, wait for RTL process shutdown and dies.
rtl runs fine from the command prompt.
when running from the command prompt weewxd starts, and dies quickly with an invalid key "windSpeed" or some other key.
These keys are in my mappings, but did not change since 3.6

I ran a full update of my raspberry and am now at deb 9.9, but still no weewx.

What obvious "you must check when updating" did I miss on this one ?

Regards;

Pat

unread,
Jun 3, 2019, 5:19:52 PM6/3/19
to weewx-user
Nothing jumping out. Pasting some logs and debugs would be super helpful. See Help! Posting to weewx user

St. B.

unread,
Jun 3, 2019, 5:36:16 PM6/3/19
to weewx-user
Ok, 

Below is the the /var/log/messages generated when running systemctl restart weewx.

Weirdly enough systemctl start weewx does not seem to run anything.

Stack trace when running from command prompt is as follows : 
root@raspberrypi:~# weewxd /etc/weewx/weewx.conf
Traceback (most recent call last):
  File "/usr/bin/weewxd", line 64, in <module>
    weewx.engine.main(options, args)
  File "/usr/share/weewx/weewx/engine.py", line 890, in main
    engine.run()
  File "/usr/share/weewx/weewx/engine.py", line 191, in run
    self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
  File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
    callback(event)
  File "/usr/share/weewx/user/weewxwd3.py", line 144, in new_loop_packet
    wd_data['humidex'] = weewx.wxformulas.humidexC(data_metricwx['outTemp'],
KeyError: 'outTemp'
root@raspberrypi:~#

Associated message traces are in mylog.shell
mylog
mylog.shell

Pat

unread,
Jun 3, 2019, 5:45:56 PM6/3/19
to weewx-user
I'm not seeing much here for me to go on, but some more questions: did you change your database? I wonder if it's locked or modified?

What happens if you run  weewxd /etc/weewx/weewx.conf

Paste the output if/when it crashes.

Thomas Keffer

unread,
Jun 3, 2019, 9:51:45 PM6/3/19
to weewx-user
The problem is not with WeeWX, but with the weewxwd3 extension you installed. It does not seem to check for missing data before attempting to calculate humidity.

--
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/66dc95b4-7dff-42f7-9d7f-476efdbe8225%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gjr80

unread,
Jun 3, 2019, 11:14:57 PM6/3/19
to weewx-user
Agree that WeeWX-WD has struck again and caused the error that was posted. Am sure this been fixed in a later version, I will track that one down and post a link as necessary.

I also think there is another somewhat more critical issue - refer to the highlighted lines:

Jun  3 23:29:29 raspberrypi weewx[22046]: engine: Initializing weewx version 3.9.1
Jun  3 23:29:29 raspberrypi weewx[22046]: engine: Using Python 2.7.13 (default, Sep 26 2018, 18:42:22) #012[GCC 6.3.0 20170516]
Jun  3 23:29:29 raspberrypi weewx[22046]: engine: Platform Linux-4.19.42-v7+-armv7l-with-debian-9.9
Jun  3 23:29:29 raspberrypi weewx[22046]: engine: Locale is 'en_GB.UTF-8'
Jun  3 23:29:29 raspberrypi weewx[22046]: engine: pid file is /var/run/weewx.pid
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: Using configuration file /etc/weewx/weewx.conf
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: Loading station type SDR (user.sdr)
Jun  3 23:29:29 raspberrypi weewx[22051]: sdr: MainThread: driver version is 0.14rc1
Jun  3 23:29:29 raspberrypi weewx[22051]: sdr: MainThread: sensor map is {'windGust': 'wind_gust.0:*.OSWGR800Packet', 'windSpeed': 'wind_speed.0:*.OSWGR800Packet', 'windBatteryStatus': 'battery.0:*.OSWGR800Packet', 'windDir': 'wind_dir.0:*.OSWGR800Packet', 'outHumidity': 'humidity.1:*.OSTHGR810Packet', 'outTemp': 'temperature.1:*.OSTHGR810Packet', 'outTempBatteryStatus': 'battery.1:*.OSTHGR810Packet', 'rain_total': 'rain_total.0:*.OSPCR800Packet', 'rainBatteryStatus': 'battery.0:*.OSPCR800Packet', 'extraTemp1': 'temperature.1:14.RubicsonTempPacket', 'UV': 'uv_index.1:*.OSUV800Packet', 'pressure': 'pressure.1:*.OSBTHGN129Packet', 'inTemp': 'temperature.1:*.OSBTHGN129Packet', 'inHumidity': 'humidity.1:*.OSBTHGN129Packet', 'inTempBatteryStatus': 'battery.1:*.OSBTHGN129Packet'}
Jun  3 23:29:29 raspberrypi weewx[22051]: sdr: MainThread: deltas is {'strikes': 'strikes_total', 'rain': 'rain_total'}
Jun  3 23:29:29 raspberrypi weewx[22051]: sdr: MainThread: startup process '/usr/local/bin/rtl_433 -q -U'
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: StdConvert target unit is 0x1
Jun  3 23:29:29 raspberrypi weewx[22051]: wxcalculate: The following values will be calculated: barometer=software, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=software, cloudbase=prefer_hardware
Jun  3 23:29:29 raspberrypi weewx[22051]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: Archive will use data binding wx_binding
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: Record generation will be attempted in 'hardware'
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: Using archive interval of 90 seconds (specified in weewx configuration)
Jun  3 23:29:29 raspberrypi weewx[22051]: engine: Using binding 'wx_binding' to database 'weewx'
Jun  3 23:29:29 raspberrypi weewx[22051]: manager: Starting backfill of daily summaries
Jun  3 23:29:29 raspberrypi weewx[22051]: WdArchive: WdArchive will use data binding wd_binding
Jun  3 23:29:29 raspberrypi weewx[22051]: WdArchive: Using binding 'wd_binding' to database 'weewxwd'
Jun  3 23:29:29 raspberrypi weewx[22051]: WdArchive: Starting backfill of daily summaries
Jun  3 23:29:29 raspberrypi kernel: [113521.231818] r820t 4-001a: destroying instance
Jun  3 23:29:29 raspberrypi kernel: [113521.232349] dvb_usb_v2: 'Realtek RTL2832U reference design:1-1.4' successfully deinitialized and disconnected
Jun  3 23:29:29 raspberrypi weewx[22051]: manager: Starting backfill of daily summaries
Jun  3 23:29:29 raspberrypi weewx[22051]: WdArchive: Daily summaries up to date.
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: Zambretti: forecast version 3.2.14
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: Zambretti: interval=600 max_age=604800 winddir_period=1800 pressure_period=10800 hemisphere=NORTH lower_pressure=950.0 upper_pressure=1050.0
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: NWS: forecast version 3.2.14
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: WU: forecast version 3.2.14
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: WU: interval=10800 max_age=604800 api_key=XXXXXXXXXXXXb92d location=pws:IRHNEALP38 fc=hourly10day
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: OWM: forecast version 3.2.14
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: UKMO: forecast version 3.2.14
Jun  3 23:29:29 raspberrypi weewx[22051]: forecast: MainThread: Aeris: forecast version 3.2.14
Jun  3 23:29:30 raspberrypi weewx[22051]: forecast: MainThread: WWO: forecast version 3.2.14
Jun  3 23:29:30 raspberrypi weewx[22051]: forecast: MainThread: XTide: forecast version 3.2.14
Jun  3 23:29:30 raspberrypi weewx[22051]: restx: StationRegistry: Station will be registered.
Jun  3 23:29:30 raspberrypi weewx[22051]: restx: Wunderground-PWS: Data for station IRHNEALP38 will be posted
Jun  3 23:29:30 raspberrypi weewx[22051]: engine: Starting up weewx version 3.9.1
Jun  3 23:29:30 raspberrypi weewx[22051]: engine: Starting main packet loop.
Jun  3 23:29:34 raspberrypi weewx[22051]: engine: Main loop exiting. Shutting engine down.
Jun  3 23:29:34 raspberrypi weewx[22051]: sdr: MainThread: shutdown process /usr/local/bin/rtl_433 -q -U
Jun  3 23:29:54 raspberrypi weewx[22051]: sdr: MainThread: timed out waiting for stderr-thread


It would appear that the SDR driver is being used and it is dying. Consequently no data is being received and the poorly written weewxwd3.py fails.

It may help to see a wee_debug report (make sure you check the report for sensitive info/passwords etc before posting) as well as a log extract from WeeWX startup with debug = 1 in weewx.conf.

Gary
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

St. B.

unread,
Jun 4, 2019, 1:16:44 AM6/4/19
to weewx...@googlegroups.com
Hi,,

You guys rock. weewxwd3 was the culprit and removing it from the conf just fixed the "not starting issue". Now I will dig into figuring what it did for me :p and why I still get no WU forecast even with the latest version.



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/AHcg1IQhcik/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/1f49289d-57eb-46ed-a390-ab6ed6ec30e3%40googlegroups.com.

gjr80

unread,
Jun 4, 2019, 3:09:32 AM6/4/19
to weewx-user
You won’t be getting any forecast from WU using the forecast extension for the time being as it has not yet been updated to work with the new WU API. I suspect your time will be better spent looking into why the SDR driver is exiting and causing the WeeWX engine to shut down.

Gary

St. B.

unread,
Jun 4, 2019, 3:24:52 AM6/4/19
to weewx-user
Ok, 

Thanks for the info regarding WU. I might give a look into this, if it is not already taken care of by someone proficient on this topic.

The SDR is not failing, it was closed by Weewx, and the message order is somehow wrong. My station is back online since this morning, and did not shutdown.

gjr80

unread,
Jun 4, 2019, 7:13:16 PM6/4/19
to weewx-user
This issue was fixed in v1.0.4. The v1.0.4 code was not released as a package but can be installed by following the instructions in this post.

Gary

St. B.

unread,
Jun 5, 2019, 1:12:26 AM6/5/19
to weewx-user
Great, I will look into this thank you.
Reply all
Reply to author
Forward
0 new messages