spurious gaps within weather data - wh23xx on raspberry pi 3

240 views
Skip to first unread message

Michale Waldor

unread,
Mar 11, 2018, 4:05:47 AM3/11/18
to weewx-user
I'm a new user to weewx running on a raspberry pi 3 connected to the weatherstation Renkforce WH2300. And I have some spurious problems where I need some help:

Raspberry pi 3, 16GB sdcard,
network connection via wifi,
2A power supply for raspberry pi,
batteries within weatherstation (BTW I believe that USB connection will power weatherstation, too)
cat /etc/issue --> Raspbian GNU/Linux 9, uname -a --> Linux IMURR9 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l

I gradually added functionality to weewx in the following sequence
- base installation weewx 3.8.0 + wh23xx driver 0.14
- nginx Web server on the same pi
- upload towards wunderground
- German Sofaskin_1.1_DE, partly tweaked to match my preferences
- forecast plugin 3.2.19
- pyephem 3.7.6.0
- reboot once per day at around midnight

Everything worked smooth but some problems started after installing the forecast plugin. Randomly for a short timespan data from the sensor array was missing. The amount of missing data continuously increased from day to day. Thus I assumed bad batteries within the sensor array are the problem (it worked without any problem for about 2 weeks even for outside temperature ~ -10°C). First I tried a reset/resync of my weatherstation. Afterwards it worked for 1..2 days, then the gaps increased again (in the meantime outside temperature was at +5°C or above). Yesterday the connection to the sensor array was more or less completely broken. Thus I replaced the orginal rechargeable batteries by standard alkaline batteries - immedeately the connection worked smooth again.

Thus: All problems solved (but why do I post that at all)? No, during last night again (one small) gap appeared within the data despite new batteries. Ok, then I inspected the logfiles from weewx to search for potential reasons. I have no real clue about the cause of my problem since there are some different kinds of errors:

2..3 times per day
Mär 11 00:02:15 IMURR9 kernel: usb 1-1.3: reset full-speed USB device number 4 using dwc_otg

during boot: I wonder that there were never ids be printed from "Found device ..." - but the USB connection always works:
Mär 11 07:43:13 IMURR9 weewx[3157]: wh23xx: driver version is 0.14
Mär 11 07:43:13 IMURR9 weewx[3157]: wh23xx: usb info: pyusb_version=1.0.0
Mär 11 07:43:13 IMURR9 weewx[3157]: wh23xx: poll interval is 15
Mär 11 07:43:13 IMURR9 weewx[3157]: wh23xx: Found device on USB bus= device=
Mär 11 07:43:13 IMURR9 kernel: usb 1-1.3: reset full-speed USB device number 4 using dwc_otg
Mär 11 07:43:13 IMURR9 weewx[3157]: engine: StdConvert target unit is 0x1
Mär 11 07:43:13 IMURR9 weewx[3157]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware
Mär 11 07:43:13 IMURR9 weewx[3157]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Mär 11 07:43:13 IMURR9 weewx[3157]: engine: Archive will use data binding wx_binding
Mär 11 07:43:13 IMURR9 weewx[3157]: engine: Record generation will be attempted in 'hardware'
Mär 11 07:43:13 IMURR9 weewx[3157]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Mär 11 07:43:13 IMURR9 weewx[3157]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Mär 11 07:43:13 IMURR9 weewx[3157]: manager: Starting backfill of daily summaries

sometimes per day
Mär 11 08:17:23 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out
Mär 11 08:17:50 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out
Mär 11 08:18:16 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out
Mär 11 08:18:43 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out
Mär 11 08:19:10 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out
Mär 11 08:19:36 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out
Mär 11 08:20:03 IMURR9 weewx[3157]: wh23xx: get_current: failed attempt 1 of 5: [Errno 110] Operation timed out

once per day
Mär 11 03:40:30 IMURR9 weewx[532]: cheetahgenerator: Generate failed with exception '<class 'sqlite3.OperationalError'>'
Mär 11 03:40:30 IMURR9 weewx[532]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/forecast/compact.html.tmpl
Mär 11 03:40:30 IMURR9 weewx[532]: cheetahgenerator: **** Reason: database is locked
Mär 11 03:40:31 IMURR9 weewx[532]: forecast: WUThread: WU: deleted forecasts prior to 1520131228
Mär 11 03:40:31 IMURR9 weewx[532]: ****  Traceback (most recent call last):
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 330, in generate
Mär 11 03:40:31 IMURR9 weewx[532]: ****      print >> _file, compiled_template
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Mär 11 03:40:31 IMURR9 weewx[532]: ****      rc = getattr(self, mainMethName)()
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "_etc_weewx_skins_forecast_compact_html_tmpl.py", line 103, in respond
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in _handleCheetahInclude
Mär 11 03:40:31 IMURR9 weewx[532]: ****      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "_etc_weewx_skins_forecast_forecast_compact_inc.py", line 154, in respond
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/user/forecast.py", line 4038, in weather_periods
Mär 11 03:40:31 IMURR9 weewx[532]: ****      records = self._getRecords(fid, from_ts, to_ts, max_events=max_events)
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/user/forecast.py", line 3908, in _getRecords
Mär 11 03:40:31 IMURR9 weewx[532]: ****      with weewx.manager.open_manager(dbm_dict) as dbm:
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/weewx/manager.py", line 1009, in open_manager
Mär 11 03:40:31 IMURR9 weewx[532]: ****      manager_dict['table_name'])
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/weewx/manager.py", line 104, in open
Mär 11 03:40:31 IMURR9 weewx[532]: ****      dbmanager = cls(connection, table_name)
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/weewx/manager.py", line 72, in __init__
Mär 11 03:40:31 IMURR9 weewx[532]: ****      self.sqlkeys = self.connection.columnsOf(self.table_name)
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/weedb/sqlite.py", line 167, in columnsOf
Mär 11 03:40:31 IMURR9 weewx[532]: ****      column_list = [row[1] for row in self.genSchemaOf(table)]
Mär 11 03:40:31 IMURR9 weewx[532]: ****    File "/usr/share/weewx/weedb/sqlite.py", line 156, in genSchemaOf
Mär 11 03:40:31 IMURR9 weewx[532]: ****      for row in self.connection.execute("""PRAGMA table_info(%s);""" % table):
Mär 11 03:40:31 IMURR9 weewx[532]: ****  OperationalError: database is locked
Mär 11 03:41:25 IMURR9 weewx[532]: cheetahgenerator: Generated 11 files for report forecast in 59.72 seconds



Greg Troxel

unread,
Mar 11, 2018, 10:19:40 AM3/11/18
to Michale Waldor, weewx-user

One bit of advice: Do not assume that you only have one problem. You
might have multiple ones, and that makes debugging much harder.

If you had problems after installing the forecast plugin, then uninstall
it and try for a while. I don't mean to say that I suspect it's a
problem, but all sorts of things could be going on, like increased CPU
temperature, load on the power supply, or lots of others that no one can
think of.
signature.asc

Michale Waldor

unread,
Mar 18, 2018, 3:03:35 AM3/18/18
to weewx-user
In the meantime I'm quite convinced that my problem is power supply of my sensor array or radio transmissionproblems. If I replace the batteries my problem is immedeately resolved, but only for a limited amount of time (some days or some hours).

Within the next weeks I'll proceed to experiment a little bit with different positions of sensor array and weather station. And I will connect my Raspy's USB power supply with the power inlet of my weather station. If all that won't help I will install a power supply for my outdoor sensor array.

One thing I've seen: If reception is starting to become bad, first the UV data is missing.

But there is still something puzzling me: Just yesterday in the afternoon the reception was quite worse with long interruption of some hours. Temperature went down during the night below 0°C, and I have expected missing data in the morning. But - to my surprise - after my automatic reboot of my Raspy at midnight, all data arrived without interruption (despite lower temperature).

Michale Waldor

unread,
Mar 31, 2018, 4:33:04 AM3/31/18
to weewx-user
Now I have tried two things:

1. I have moved the sensor array from balcony into the garden. Now there are no longer gaps in the data.

2. I have tried to use the power supply for my raspberry to also feed the base station. This worked for half a day - but in the early morning USB connection between base station and Raspy died completely. Thus I conclude that either my power supply is too weak, or there are some spikes on the power net which might have disturbed the base station. But only the USB connection has died, the weather station itself worked smoothly including logging of data.
Thus I have withdrawn my idea to use the power supply for the base station, too.

Holger Megies

unread,
Feb 8, 2021, 11:53:00 AM2/8/21
to weewx-user
Hi there,

same thing here.

  • WH2315 (Renkforce from Conrad)
  • RaspberryPi 3B
  • weewx 4.3.0
  • Python 3.7
  • SofaskinCW9009
  • driver: wh23xx (EdwinGH fork)
I'm also experiencing data gaps / lockups at random intervals (> once per day). I suspected RFI -> put RF chokes on all cables to an from the pi (snap ferrites and ferrite rings), shielded the USB cable with aluminum foil: problem persists.

Of course I also changed the batteries in the outdoor unit: problem pesists.

Here's the log:

Feb  8 17:39:31 raspberrypi weewx[623] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.85 seconds
Feb  8 17:39:31 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:33 raspberrypi weewx[623] INFO weewx.imagegenerator: Generated 15 images for report SeasonsReport in 1.66 seconds
Feb  8 17:39:33 raspberrypi weewx[623] INFO weewx.reportengine: Copied 0 files to /var/www/html
Feb  8 17:39:33 raspberrypi weewx[623] DEBUG weewx.reportengine: Running report 'SmartphoneReport'
Feb  8 17:39:33 raspberrypi weewx[623] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Smartphone/skin.conf for report 'SmartphoneReport'
Feb  8 17:39:33 raspberrypi weewx[623] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
Feb  8 17:39:33 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:33 raspberrypi weewx[623] INFO weewx.cheetahgenerator: Generated 6 files for report SmartphoneReport in 0.11 seconds
Feb  8 17:39:33 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:33 raspberrypi weewx[623] INFO weewx.imagegenerator: Generated 6 images for report SmartphoneReport in 0.61 seconds
Feb  8 17:39:33 raspberrypi weewx[623] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/smartphone
Feb  8 17:39:33 raspberrypi weewx[623] DEBUG weewx.reportengine: Running report 'MobileReport'
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Mobile/skin.conf for report 'MobileReport'
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:34 raspberrypi weewx[623] INFO weewx.cheetahgenerator: Generated 1 files for report MobileReport in 0.05 seconds
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:34 raspberrypi weewx[623] INFO weewx.imagegenerator: Generated 4 images for report MobileReport in 0.46 seconds
Feb  8 17:39:34 raspberrypi weewx[623] INFO weewx.reportengine: Copied 0 files to /var/www/html/weewx/mobile
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.reportengine: Running report 'StandardReport'
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/SofaCW/skin.conf for report 'StandardReport'
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.historygenerator.MyXSearch']
Feb  8 17:39:34 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:34 raspberrypi /weewxd: historygenerator.py: No bootstrap specific labels found
Feb  8 17:39:34 raspberrypi /weewxd: historygenerator.py: Generated 8 tables in 0.08 seconds
Feb  8 17:39:36 raspberrypi weewx[623] INFO weewx.cheetahgenerator: Generated 10 files for report StandardReport in 1.52 seconds
Feb  8 17:39:36 raspberrypi weewx[623] DEBUG weewx.manager: Daily summary version is 3.0
Feb  8 17:39:37 raspberrypi weewx[623] INFO weewx.imagegenerator: Generated 11 images for report StandardReport in 1.74 seconds
Feb  8 17:39:37 raspberrypi weewx[623] INFO weewx.reportengine: Copied 0 files to /var/www/html
Feb  8 17:39:37 raspberrypi weewx[623] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Feb  8 17:39:37 raspberrypi weewx[623] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Feb  8 17:39:44 raspberrypi /weewxd: wh23xx: read_record: write: 02 02 04 04 (len=4)
Feb  8 17:39:44 raspberrypi /weewxd: wh23xx: read_record: buf: 01 35 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 35 09 26 f9 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 00 01 14 13 00 00 (len=61)
Feb  8 17:39:44 raspberrypi /weewxd: wh23xx: get_current: failed attempt 1 of 5: read_record: missing READ_RECORD: 0x01 != 0x04
Feb  8 17:39:54 raspberrypi /weewxd: wh23xx: read_record: write: 02 02 04 04 (len=4)
Feb  8 17:39:54 raspberrypi /weewxd: wh23xx: read_record: buf: 01 12 02 82 14 00 00 02 82 15 00 00 00 00 16 00 00 17 00 e1 09 26 f9 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 00 01 14 13 00 00 (len=61)
Feb  8 17:39:54 raspberrypi /weewxd: wh23xx: get_current: failed attempt 2 of 5: read_record: missing READ_RECORD: 0x02 != 0x04
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: read_record: write: 02 02 04 04 (len=4)
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: read_record: buf: 01 4d 04 4a 01 02 65 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 35 09 26 f9 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 (len=61)
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: read_record: record_size: 74
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: read_record: buf: 01 4d 04 4a 01 02 65 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 35 09 26 f9 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 (len=61)
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: read_record: rbuf: 01 02 65 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 35 09 26 f9 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 04 4a 01 02 65 02 01 a5 03 01 9a 04 01 a5 05 01 a5 (len=74) chksum_pkt=06 chksum=0xd4
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: read_record: checksum mismatch: 0x06 != 0xd4 (01 02 65 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 35 09 26 f9 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 04 4a 01 02 65 02 01 a5 03 01 9a 04 01 a5 05 01 a5 (len=74))
Feb  8 17:40:04 raspberrypi /weewxd: wh23xx: get_current: failed attempt 3 of 5: read_record: checksum mismatch: 06 != d4
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: read_record: write: 02 02 04 04 (len=4)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: read_record: buf: 01 3b 04 4a 01 02 64 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 37 09 26 fb 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 (len=61)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: read_record: record_size: 74
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: read_record: buf: 01 12 02 82 14 00 00 02 82 15 00 00 00 00 16 00 00 17 00 e4 33 07 5d 08 25 37 09 26 fb 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 (len=61)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: read_record: rbuf: 01 02 64 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 37 09 26 fb 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 02 82 14 00 00 02 82 15 00 00 00 00 16 00 00 17 00 (len=74) chksum_pkt=e4 chksum=0xe4
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: raw data: [1, 2, 100, 2, 1, 165, 3, 1, 154, 4, 1, 165, 5, 1, 165, 6, 51, 7, 93, 8, 37, 55, 9, 38, 251, 10, 0, 45, 11, 0, 0, 12, 0, 0, 14, 0, 0, 0, 0, 16, 0, 0, 0, 42, 17, 0, 0, 0, 42, 18, 0, 0, 1, 20, 19, 0, 0, 2, 130, 20, 0, 0, 2, 130, 21, 0, 0, 0, 0, 22, 0, 0, 23, 0]
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: in_temp: {'value': 21.200000000000003} (0x01 0x01)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: out_temp: {'value': 2.1000000000000014} (0x02 0x02)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: dewpoint: {'value': 1.0} (0x03 0x03)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: windchill: {'value': 2.1000000000000014} (0x04 0x04)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: heatindex: {'value': 2.1000000000000014} (0x05 0x05)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: in_humidity: {'value': 51} (0x06 0x06)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: out_humidity: {'value': 93} (0x07 0x07)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: abs_baro: {'value': 952.7} (0x08 0x08)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rel_baro: {'value': 997.9} (0x09 0x09)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: wind_dir: {'value': 45} (0x0a 0x0a)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: wind_speed: {'value': 0.0} (0x0b 0x0b)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: gust_speed: {'value': 0.0} (0x0c 0x0c)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rain_rate: {'value': 0.0} (0x0e 0x0e)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rain_day: {'value': 4.2} (0x10 0x10)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rain_week: {'value': 4.2} (0x11 0x11)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rain_month: {'value': 27.6} (0x12 0x12)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rain_year: {'value': 64.2} (0x13 0x13)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: rain_totals: {'value': 64.2} (0x14 0x14)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: light: {'value': 0.0} (0x15 0x15)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: uv: {'value': 0} (0x16 0x16)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: uvi: {'value': 0} (0x17 0x17)
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: decoded data: {'in_temp': {'value': 21.200000000000003}, 'out_temp': {'value': 2.1000000000000014}, 'dewpoint': {'value': 1.0}, 'windchill': {'value': 2.1000000000000014}, 'heatindex': {'value': 2.1000000000000014}, 'in_humidity': {'value': 51}, 'out_humidity': {'value': 93}, 'abs_baro': {'value': 952.7}, 'rel_baro': {'value': 997.9}, 'wind_dir': {'value': 45}, 'wind_speed': {'value': 0.0}, 'gust_speed': {'value': 0.0}, 'rain_rate': {'value': 0.0}, 'rain_day': {'value': 4.2}, 'rain_week': {'value': 4.2}, 'rain_month': {'value': 27.6}, 'rain_year': {'value': 64.2}, 'rain_totals': {'value': 64.2}, 'light': {'value': 0.0}, 'uv': {'value': 0}, 'uvi': {'value': 0}}
Feb  8 17:40:14 raspberrypi /weewxd: wh23xx: packet: {'dateTime': 1612802415, 'usUnits': 17, 'windDir': 45, 'windSpeed': 0.0, 'windGust': 0.0, 'inHumidity': 51, 'outHumidity': 93, 'inTemp': 21.200000000000003, 'outTemp': 2.1000000000000014, 'pressure': 952.7, 'luminosity': 0.0, 'uv_raw': 0, 'UV': 0, 'rain': 0.0, 'radiation': 0.0}
Feb  8 17:40:14 raspberrypi weewx[623] INFO weewx.manager: Added record 2021-02-08 17:40:00 CET (1612802400) to database 'weewx.sdb'
Feb  8 17:40:14 raspberrypi weewx[623] INFO weewx.manager: Added record 2021-02-08 17:40:00 CET (1612802400) to daily summary in 'weewx.sdb'
Feb  8 17:40:15 raspberrypi weewx[623] DEBUG weewx.restx: StationRegistry: wait interval (3060 < 604800) has not passed for record 2021-02-08 17:40:00 CET (1612802400)
Feb  8 17:40:15 raspberrypi weewx[623] DEBUG weewx.reportengine: Running reports for latest time in the database.
Feb  8 17:40:15 raspberrypi /weewxd: wh23xx: read_record: write: 02 02 04 04 (len=4)
Feb  8 17:40:15 raspberrypi weewx[623] DEBUG weewx.reportengine: Running report 'SeasonsReport'
Feb  8 17:40:15 raspberrypi /weewxd: wh23xx: read_record: buf: 01 3b 04 4a 01 02 64 02 01 a5 03 01 9a 04 01 a5 05 01 a5 06 33 07 5d 08 25 37 09 26 fb 0a 00 2d 0b 00 00 0c 00 00 0e 00 00 00 00 10 00 00 00 2a 11 00 00 00 2a 12 00 00 01 14 13 00 00 (len=61)
Feb  8 17:40:15 raspberrypi /weewxd: wh23xx: read_record: record_size: 74
Feb  8 17:40:15 raspberrypi weewx[623] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'

I noticed that whenever get_current fails 5 times there's also no data on my indoor unit. Does that mean that there is a problem with the USB communication between weewx and the WH2315? I'm no programmer and don't have a clue what the lines in the syslog mean. I hope anyone of you out there can make sense of that.

Thanks!
Holger

Michael Waldor

unread,
Feb 9, 2021, 4:34:06 AM2/9/21
to weewx-user
In the meantime all my problems seem to be resolved - probabely due to recent software updates:

1. No longer any USB problem after upgrading to recent raspbian (buster 5.4.72-v7+).
Previously, I encountered USB problems after some weeks. To detect them I wrote a simple watchdog and rebooted my raspberry automatically. After reboot USB always did recover. Additionally I did a reboot once per day.
Now these problems are gone, and my raspberry  is up since 38 days (the day when I did the upgrade onto buster).

2. I've updated to weewx 4.x based with python 3.
Beware, to use python 3 you have to use ANOTHER repository (see the corresponding weewx documentation). If you don't switch the repository you will stay with python 2. AND you must use special releases of the wh23xx driver (NOT the official one, it's still at pyhton 2 as far as I know) and for forecast.

Concluding: After all these changes all my problems with that kind of weather station are gone. Maybe one exception: If there is very heavy rain, the base station will loose its contact with the sensor array despite the short distance (only some meters). But of course that's not a weewx problem.

I even use the same raspberry to run FHEM smart home and kodi multimedia.
Message has been deleted

Michael Waldor

unread,
Feb 17, 2021, 4:34:48 AM2/17/21
to weewx-user
My watchdog is a very simple minded one - it regularly (once per minute using cron) searches /var/log/messages for USB messages. If it detects some the raspi will be automatically rebooted.

Sadly currently I've no access to my scripts - drop me a note if you still need it. Then I'll look into that ...

To be honest I do not know why my USB problems were solved. But besides updating involved software versions, I also started new services (e.g. Kodi), added an USB diskdrive, and a USB rs232 interface. For that I changed the USB ports (to avoid cable cluttering:-). Maybe your problem is simply solved by using another USB port? Or improving contacts by unplug/plugging?


Regards, Michael
Reply all
Reply to author
Forward
0 new messages