[weewx-user] Re: FO USB

2016-09-18 Thread Macha

Hi,

Thanks for replying.

I've had this station for about 3 years and this behaviour has been there 
from day 1.

I think I've pretty much exhausted all possibilities actually. In the early 
days I tried a powered USB hub - no joy.

I've now got this RPi in a stack with two others - fed with a bomb-proof 5V 
supply. I've looked at the supply line with both a digital VM and a 'scope 
for each RPi. Volts are dead on 5-and-a-bit after the polyfuse and ripple 
is very low.

So, I guess it's down to "life's rich tapestry" and a quirk of this 
particular station. In fact it's not too troublesome, booting a couple of 
times a week is no big deal, esp. as I store the root filesystem for this 
Rpi on my NFS, so it doesn't even stress the SD card too much 

A final thought. I would tend to suspect the RPi as the culprit and not the 
console as the problem goes away (for a while) after a reboot. I've 
sometimes wondered if it's something to do with some weird interaction 
between USB and Ethernet on the RPi as they share the same hardware and 
both are pretty busy (however, it also happened before I migrated to an NFS 
file system, so maybe not).

Cheers,

On Sunday, September 18, 2016 at 2:26:28 PM UTC+2, mwall wrote:
>
> On Sunday, September 18, 2016 at 5:24:47 AM UTC-4, Macha wrote:
>>
>> I have a W1080-type station (actually marked "WEA22") connected to a RPi 
>> V2. The station console is connected directly to the RPi's USB, together 
>> with 2 webcams.
>>
>
> this is probably your problem.
>
> use a powered usb hub for the station and see if that makes your failures 
> go away.
>
> the fine offset stations are *very* sensitive to usb power, and the rpi is 
> not very good at providing stable usb power.
>
> m 
>

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


Re: [weewx-user] FO USB

2016-09-18 Thread mwall
first of all, this is not a case of fine offset usb lockup.  the station is 
responding, but its memory is corrupt.

the first stack trace is happening after weewx has been reading data for 
awhile.  a pointer of 0x is bogus - there is no usable data at that 
address in the station memory.  then there appears to be usb communication 
failure, so the driver raises a WeeWxIO exception.

the second stack trace is happening when weewx is starting up.  the bad 
magic number shows that the firmware has not initialized itself properly.  
the series of unstable reads shows that the firmware is having problems 
communicating over usb.  the actual failure is that the driver cannot read 
the archive interval from the station.  weewx *should* raise an exception 
when reading the archive interval fails, but for some reason it is getting 
a value for None.  this is the behavior that is a bug, and it has been 
fixed at commit c641804.

i've seen this behavior occasionally - maybe once per year, if that.  i saw 
it more often on a ws2080 just before its pressure sensor failed and the 
entire console became unusable.

if it is happening often, then this weather station may be broken or 
defective.  you really should return it to the manufacturer for a 
replacement.

m


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


[weewx-user] FO USB

2016-09-18 Thread Macha
Hello,

It's me again 

I don't know if this helps in understanding FO USB lockups (just ignore if 
not ... )

I have a W1080-type station (actually marked "WEA22") connected to a RPi 
V2. The station console is connected directly to the RPi's USB, together 
with 2 webcams.

>From time to time (twice a week about) I get what could be described as a 
"lockout" where weewx can't get data from the console. It always starts 
with syslog showing ...

Sep 18 10:57:53 meteopi weewx[13587]: fousb: get_observations failed: bad 
pointer: 0x
Sep 18 10:57:53 meteopi weewx[13587]: engine: Shutting down StdReport thread
Sep 18 10:57:53 meteopi weewx[13587]: engine: Caught WeeWxIOError: Max 
retries exceeded while fetching observations
Sep 18 10:57:53 meteopi weewx[13587]:   Waiting 60 seconds then 
retrying...

I then get ...

Sep 18 10:58:53 meteopi weewx[13587]: engine: retrying...
Sep 18 10:58:53 meteopi weewx[13587]: engine: Using configuration file 
/home/weewx-3.5.0/weewx.conf
Sep 18 10:58:53 meteopi weewx[13587]: engine: Loading station type 
FineOffsetUSB (weewx.drivers.fousb)
Sep 18 10:58:53 meteopi weewx[13587]: fousb: driver version is 1.8
Sep 18 10:58:53 meteopi weewx[13587]: fousb: polling mode is PERIODIC
Sep 18 10:58:53 meteopi weewx[13587]: fousb: polling interval is 60
Sep 18 10:58:53 meteopi weewx[13587]: fousb: found station on USB bus=001 
device=006
Sep 18 10:58:53 meteopi weewx[13587]: engine: StdConvert target unit is 0x1
Sep 18 10:58:53 meteopi weewx[13587]: 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,maxSolarRad=prefer_hardware,humidex=prefer_hardware,pressure=prefer_hardware,inDewpoint=prefer_hardware,ET=prefer_hardware,altimeter=prefer_hardware,cloudbase=prefer_hardware
Sep 18 10:58:53 meteopi weewx[13587]: wxcalculate: The following algorithms 
will be used for calculations: altimeter=aaNOAA,maxSolarRad=RS
Sep 18 10:58:53 meteopi weewx[13587]: engine: Archive will use data binding 
wx_binding
Sep 18 10:58:53 meteopi weewx[13587]: engine: Record generation will be 
attempted in 'software'
Sep 18 10:58:53 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0x00
Sep 18 10:58:53 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0x20
Sep 18 10:58:53 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0x40
Sep 18 10:58:54 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0x60
Sep 18 10:58:54 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0x80
Sep 18 10:58:54 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0xa0
Sep 18 10:58:54 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0xc0
Sep 18 10:58:54 meteopi weewx[13587]: fousb: unstable read: blocks differ 
for ptr 0xe0
Sep 18 10:58:54 meteopi weewx[13587]: fousb: unrecognised magic number 
Sep 18 10:58:54 meteopi weewx[13587]: engine: Caught unrecoverable 
exception in engine:
Sep 18 10:58:54 meteopi weewx[13587]:   unsupported operand type(s) 
for *: 'NoneType' and 'int'
Sep 18 10:58:54 meteopi weewx[13587]:   Traceback (most recent call 
last):
Sep 18 10:58:54 meteopi weewx[13587]: File 
"/home/weewx-3.5.0/bin/weewx/engine.py", line 853, in main
Sep 18 10:58:54 meteopi weewx[13587]:   engine = 
EngineClass(config_dict)
Sep 18 10:58:54 meteopi weewx[13587]: File 
"/home/weewx-3.5.0/bin/weewx/engine.py", line 75, in __init__
Sep 18 10:58:54 meteopi weewx[13587]:  
 self.loadServices(config_dict)
Sep 18 10:58:54 meteopi weewx[13587]: File 
"/home/weewx-3.5.0/bin/weewx/engine.py", line 136, in loadServices
Sep 18 10:58:54 meteopi weewx[13587]:  
 self.service_obj.append(weeutil.weeutil._get_object(svc)(self, 
config_dict))
Sep 18 10:58:54 meteopi weewx[13587]: File 
"/home/weewx-3.5.0/bin/weewx/engine.py", line 484, in __init__
Sep 18 10:58:54 meteopi weewx[13587]:   if software_interval != 
self.engine.console.archive_interval:
Sep 18 10:58:54 meteopi weewx[13587]: File 
"/home/weewx-3.5.0/bin/weewx/drivers/fousb.py", line 993, in 
archive_interval
Sep 18 10:58:54 meteopi weewx[13587]:   return 
self._archive_interval_minutes() * 60
Sep 18 10:58:54 meteopi weewx[13587]:   TypeError: unsupported 
operand type(s) for *: 'NoneType' and 'int'
Sep 18 10:58:54 meteopi weewx[13587]:   Exiting

In a way this is fortunate, in the sense that I run a cron job to check if 
weewx is running, if not I reboot and the problem goes away until the next 
time.

I don't get the "lockup" in the way where I have to "restart" the console 
(batteries out, etc.), but I haven't found any way to get USB going again 
other than a reboot.

Not really looking for a fix, just