Hi Susan I updated the hp1000 file as requested – copy attached. I then ran weewx which was fine until 17:39 when it stopped with the last reading being:
LOOP: 2018-04-03 17:39:07 BST (1522773547) altimeter: 29.1707530717, appTemp: 47.1549180258, barometer: 29.8636759983, cloudbase: 2403.71906385, dateTime: 1522773547, dewPoint: 6.30000019073, dewpoint: 43.297915016, heatindex: 53.6, humidex: 53.6, inDewpoint: 48.7200784102, inHumidity: 48, inTemp: 69.2600013733, maxSolarRad: None, outHumidity: 68, outTemp: 53.6, pressure: 29.1136153972, radiation: 451.04699707, rain: 0.0, rainRate: 0, usUnits: 1, UV: 1, windchill: 53.6, windChill: 12.0, windDir: 167, windGust: 9.81768936544, windSpeed: 8.69921832006 Syslog does not show the failure at all - see below: Apr 3 17:39:06 raspberrypi dhcpcd[311]: wlan0: Router Advertisement from fe80::52c7:bfff:fe17:64d6 Apr 3 17:39:06 raspberrypi dhcpcd[311]: wlan0: soliciting a DHCPv6 lease Apr 3 17:39:16 raspberrypi dhcpcd[311]: wlan0: Router Advertisement from fe80::52c7:bfff:fe17:64d6 Apr 3 17:39:16 raspberrypi dhcpcd[311]: wlan0: soliciting a DHCPv6 lease I suspect I messed up editing HP1000 but I am at a bit of a loss to know how. Any suggestions gratefully received. Graham. From: [email protected] <[email protected]> On Behalf Of [email protected] Sent: 03 April 2018 04:50 To: weewx-user <[email protected]> Subject: Re: [weewx-user] Re: weewx crashes with error: unpack requires a string of len 104 First off, my apologies to all - given the subject line I completely missed that this question was related to my HP1000 driver. Given the line number, you are using the latest version of the driver (I note that the driver that Bob provides above is based on the earlier version). Is it possible to edit the HP1000.py file and change line 524 from interp_data = struct.unpack("8s8s16s8shbb14fbbh", rxData) to try: interp_data = struct.unpack("8s8s16s8shbb14fbbh", rxData) except: loginf('Bad data: length = {0}', len(rxData)) loginf('Bad data: "{0}"', rxData) continue (Note the indenting of 4 spaces - Pythin is very sensitive to the indenting of the code.) That should dump out to the system log file the bad data so that we can look at it and see what is wrong. When I wrote the driver I only had my own weather station as a guide so if other firmware creates different sized (or formatted) records then there will be problems. It is hard to know the level of 'error protection' that is needed when yo don't know the sources of the possible errors (at least that is my excuse!). Susan -- 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] <mailto:[email protected]> . For more options, visit https://groups.google.com/d/optout. -- 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]. For more options, visit https://groups.google.com/d/optout.
HP1000-gs.py
Description: Binary data
