Thanks Susan
I will have a go at this later today. I am a newbie at Python so it will be a 
step forward on my learning curve!
Regret Bob’s driver didn’t do the trick but I’m grateful to him for the help.
Graham

Sent from my iPad

> On 3 Apr 2018, at 04:49, vk3...@gmail.com wrote:
> 
> 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 weewx-user+unsubscr...@googlegroups.com.
> 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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to