FineOffset WH1080 on Raspberry Pi reading problem

2,101 views
Skip to first unread message

Sten E Palmqvist

unread,
Jul 15, 2013, 3:36:39 PM7/15/13
to weewx...@googlegroups.com
Weewx works fine with the simulator but when I attach the FOUSB WH1080 the reading of the data fails. The weather unit is attached direct to Pi USB port and the Pi is connected to the network with ethernet cable. No other devices or programs on this Pi that runs in console mode only and I admin it via putty.
wee_config_usb info is okey and history shows records but when running "live" I get errors like these:

Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xff00, 2013-07-15T00:28:56
Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfef0, 2013-07-14T23:28:56
Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfee0, 2013-07-14T22:28:56
Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfed0, 2013-07-14T21:28:56
Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfec0, 2013-07-14T20:28:56
Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfeb0, 2013-07-14T19:28:56
Jul 15 21:27:54 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfea0, 2013-07-14T18:28:56
Jul 15 21:27:55 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfe90, 2013-07-14T17:28:56
Jul 15 21:27:55 bjorkaweather weewx[2259]: fousb: invalid data in get_records at 0xfe80, 2013-07-14T16:28:56
Jul 15 21:27:55 bjorkaweather weewx[2259]: fousb: found 0 archive records
Jul 15 21:27:55 bjorkaweather weewx[2259]: wxengine: Starting main packet loop.
Jul 15 21:27:55 bjorkaweather weewx[2259]: wxengine: Station does not support reading the time
Jul 15 21:27:55 bjorkaweather weewx[2259]: fousb: station status {'unknown': 0, 'lost_connection': 0, 'rain_overflow': 0} (0)
Jul 15 21:28:07 bjorkaweather weewx[2086]: fousb: get_observations failed: error sending control message: Device or resource busy
Jul 15 21:28:07 bjorkaweather kernel: [ 1063.220391] usb 1-1.2: usbfs: process 2086 (weewxd) did not claim interface 0 before use
Jul 15 21:28:12 bjorkaweather weewx[2086]: fousb: get_observations failed: error sending control message: Device or resource busy
Jul 15 21:28:12 bjorkaweather kernel: [ 1068.225986] usb 1-1.2: usbfs: process 2086 (weewxd) did not claim interface 0 before use
Jul 15 21:28:17 bjorkaweather weewx[2086]: fousb: get_observations failed: error sending control message: Device or resource busy
Jul 15 21:28:17 bjorkaweather kernel: [ 1073.231553] usb 1-1.2: usbfs: process 2086 (weewxd) did not claim interface 0 before use
Jul 15 21:28:22 bjorkaweather kernel: [ 1078.237123] usb 1-1.2: usbfs: process 2086 (weewxd) did not claim interface 0 before use
Jul 15 21:28:22 bjorkaweather weewx[2086]: fousb: get_observations failed: error sending control message: Device or resource busy
Jul 15 21:28:22 bjorkaweather weewx[2086]: wxengine: Shut down StdRESTful thread.
Jul 15 21:28:22 bjorkaweather weewx[2086]: wxengine: Caught WeeWxIOError: Max retries exceeded while fetching observations
Jul 15 21:28:22 bjorkaweather weewx[2086]:     ****  Waiting 60 seconds then retrying...

I hope someone has any ideas about this. The weewx program is awesome and the Pi is a little wonder so I really want it running.

mwall

unread,
Jul 15, 2013, 9:36:51 PM7/15/13
to weewx...@googlegroups.com
hi sten,

the 'invalid data in get_records' message happens when the 'delay' field is missing or corrupt. as a result, weewx cannot determine a timestamp for the record. typically this means that the records in the console are corrupt. the solution is to clear the console memory, either by using the wee_config_fousb utility or by power cycling the console.

there are a few possible causes for the 'Device or resource busy' message:

- the usb port is in use by a process other than weewxd

- weewxd is being run as a user who does not have sufficient permissions.  either run weewxd as root, or set the permissions on the usb port so that the weewx user can use it.

- the weather station console has locked up.  power cycle the console to reset it.

first try running weewxd as root - that might make all of these problems go away.  if that fails, power cycle the weather station console.

m

Andrew Milner

unread,
Jul 15, 2013, 10:01:00 PM7/15/13
to weewx...@googlegroups.com
For the Pi/1080 to work at its best I would recommend a Pi recommended 'Plugable 7 port powered hub' and plug the 1080 into that - you can power the pi from one of the hub ports so you still only need one power supply.  The ethernet use also affects the Pi usb bus - and even with my set up I have found that while monitoring the pi over the network I can actually induce usb read errors - funilly enough though if I use a local screen and keyboard on the pi I rarely seem to have a problem.  The 1080 is also HIGHLY susceptible to noise - so you need a good usb cable, together with ferrite core if possible - and ensure the 1080 is as far away as you can possibly get it from ANY form of interference.
I would suspect the corrupt reads are caused by USB/ethernet conflict or possible noise from electrical interference such as the Pi itself or power supplies or screens

Sten E Palmqvist

unread,
Jul 16, 2013, 3:16:44 AM7/16/13
to weewx...@googlegroups.com
Hi and thank you for your suggestions to solve this.

I already run as root 'sudo ./bin/weewx/weewxd ... etc'. Both console mode and as deamon give the same result.
Have also cleared the device with the use of wee_config_fousb and also by using the device touch screen. After that I removed the batteries and left it in that state over the night (didn't have any replacement batteries) and next day put new batteries in the outdoor transmitter and the device.

I will follow Andrews findings and attach a powered hub, better and shorter ethernet cable and position the gear as far from electrical noise as possible.

I'll let you know what happens.

Andrew Milner

unread,
Jul 16, 2013, 3:50:45 AM7/16/13
to weewx...@googlegroups.com
shorter ethernet cable may not help, better could do something i suppose - if the network is very busy - but the routing of cables especially the usb cable to the 1080 can be critical and the quality of the usb from pi to 1080 also will have significance as will physical location of the 1080 with respect to electrical and magnetic interference from other devices, power supplies and screens.  If the external transmitter batteries fail then you will get ---- on the 1080 display for external temp and humidity.  The 1080 will take its power from the usb connection if plugged in to the pi.




--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/BbmC5gwP4y4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sten E Palmqvist

unread,
Jul 16, 2013, 4:38:37 PM7/16/13
to weewx...@googlegroups.com
Now I have tried to use a powered usb hub and put the pi a long way from possible disturbing interference but no success. I have also run wee_config_fosub --check-usb and it has run for 2 hours and only 1 bad read. My conclusion is that I do not have a USB read problem.

I will install weewx under linux in a laptop and see what happens. Let you know later.

AdamHI

unread,
Jul 18, 2013, 12:44:20 PM7/18/13
to weewx...@googlegroups.com
If you have access to a Windows laptop, have you been able to communicate with your console using the Easy Weather program? That might then isolate the problem to software -vs- hardware.

My Pi and FO 2090 just seem to keep going fine. I'm using Adafruits Occidentalis 0.2 distro .  I also use the 7-port powered USB hub that got some good recs at Adafruit.com site - sold at several places including .Amazon.

--adam, wh6m

Sten E Palmqvist

unread,
Jul 19, 2013, 3:21:55 PM7/19/13
to weewx...@googlegroups.com
Easy Weather on Windows 8 works without any problem at all. No data loss or communication problem of any kind.

Sten E Palmqvist

unread,
Jul 19, 2013, 3:24:55 PM7/19/13
to weewx...@googlegroups.com
Tried running weewx on a LinuxMint laptop without success. Same reading problem.

AdamHI

unread,
Jul 19, 2013, 7:12:53 PM7/19/13
to weewx...@googlegroups.com
On the Pi or your Mint laptop, if you run lsusb, do you see the weather console?
--adam, wh6m

Sten E Palmqvist

unread,
Jul 20, 2013, 2:29:27 AM7/20/13
to weewx...@googlegroups.com
Yes I do.
- - -
Bus 004 Device 002: ID 049f:0086 Compaq Computer Corp. Bluetooth Device
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1941:8021 Dream Link WH1080 Weather Station / USB Missile Launcher
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- - -

Andrew Milner

unread,
Jul 20, 2013, 4:05:40 AM7/20/13
to weewx...@googlegroups.com
Can you refresh us as to what error messages you get from weewx AFTER:
1. resetting the console
2. rebooting the pi
3. making sure the console has the correct time and timezone - note that the time offset in the console is calculated in a slightly odd manner.
4.making sure the pi has the correct time and timezone
5.start weewx and let's see the log

I cannot remember what it was but I do recall that I once actually had a faulty station which took me ages to pin down to actually being a fault in the station itself ... doubt if that is the case here, but different sw handles the quirks of the 1080 in different ways, and the fact that easyweather does not lose anything does not actually mean that all is ok - it could just ignore some things!!  Likewise with Cumulus on a Pc which is very good at ignoring clearly erroneous data.  Weewx appears to try to make sense of things if it can, other software seems to just drop it.

Sten E Palmqvist

unread,
Jul 20, 2013, 5:30:33 AM7/20/13
to weewx...@googlegroups.com
Yes it seems like EasyWeather and Cumulus is generous when reading and presenting the data. I looked deeper into the EasyWeather .dat file and found some really odd rows with -- instead of data and suddenly 14.4 mm rainfall yesterday evening when there was no rainfall at all. Maybe there is some error in the station after all. But I ran the weewx_config_fousd --check-usb and that reported only 1 error in 3 hours so I thought there were no errors in the station after that. Hmm.... wonder what is the best way to verify the weather station itself?

Andrew Milner

unread,
Jul 20, 2013, 8:34:13 AM7/20/13
to weewx...@googlegroups.com
Do you think we can bring ourselves up to date with precisely what the problem is by clearing everything, resetting everything, rebooting, making sure clocks etc are all correct - setting debug even - and then seeing what happens and what is in the log - from a totally clean startup.  All the thread comments of tried this, tried that, did this,, did that all gets very confusing when the only bit of log is from a test done ages ago!!!!

So please, clear the console, set the clock and time zone, reboot the pi, make sure clock and timezone on the pi are updated and set correctly off the internet and then (and only then) start weewx and post the resulting log to the forum.  This way we know the precise starting conditions and the precise logged outcomes.  I am no longer sure exactly what errors you are experiencing!!

Andrew

Sten E Palmqvist

unread,
Jul 20, 2013, 2:32:08 PM7/20/13
to weewx...@googlegroups.com
The first post in this forum was just that. The console was cleared and time syncronized automatically by the weather station. In fact i also removed battieries and a day later I put in new batteries in both the console and the outside unit. I let the weather station run for a day and then I started the pi and checked everything using wee_config_fousb --info and --check-usb and found all okey. Then I started weewxd and found the problem and posted into the forum.

I am now trying to get it to work in my linux laptop and after reading the posts again I cleared the weather station memory using wee_config_fousb --clear-memory, not the lcd display option on the console that I used the first time, and now it seems running without problem. Could it be that simple that the weewx utility did a better job to clear the memory than the built in function?

I will let it go on for a day or two before I move over to pi again.

Andrew Milner

unread,
Jul 20, 2013, 2:37:31 PM7/20/13
to weewx...@googlegroups.com
Yes, I know the first post was just as requested - but since then you have changed cables, added powered hubs and so on .... hence a request to effectively repeat with the current setup.

Keep us posted as to how progress goes, but really a good picture can only be obtained from known conditions - and a lot had changed from the original posting!!

Andrew

Sten E Palmqvist

unread,
Jul 20, 2013, 2:55:08 PM7/20/13
to weewx...@googlegroups.com
I think I was to optimistic stating "running without problem" in my last post. The station reports 2539.7 mm (605 in) rainfall 20 minutes ago and my own visual observation says it was days ago we saw some rain ;) 5 minutes ago we was supposed to have wind gusts at 1124.7 km/h (815 mph). The same type of errors was found in the Windows setup with Easy Weather as I reported earlier.

Many thanks for helping me tracing the problem, it must be the weather station. Any suggestions of a more reliable one as close in price range as a WH1080 as possible?

Sten
 

Andrew Milner

unread,
Jul 20, 2013, 9:31:27 PM7/20/13
to weewx...@googlegroups.com
When you say 'the station reports' do you mean that you see these spurious values on the station console or console history or on the weewx/linux system?  If on the station then yes, it must be the station at fault.  If on the Linux box then what do the LOOP data, log, archive and stats databases give??  I experienced many occasions where the stats database (which provides the daily high/low info) had values in it which appeared to have no relationship to data in the archive database.  Such spurious highs and lows can be 'fixed' by merely deleting the stats database and letting weewx create the stats from the archived data.

My 1080 is doing fine now I understand more of its quirks and I am confiden weewx will evolve to get rid of the final niggles in the driver - just try and get yours exchanged.  Value for money it seems to do the job, and am afraid I've not found better.




Sten
 

--

michael.d...@gmail.com

unread,
Jul 27, 2013, 9:47:22 AM7/27/13
to weewx...@googlegroups.com
Hi AdamHi,

I like what you have done with your system.  FedEx is delivering my 2090 and Manhattan hub today.  Currently, my Pi is running Weewx in simulator mode.  Can you please give more details pertaining to the digital images of your setup that is linked from your Weewx weather page?  Specifically, the setup between the Pi, hub, Wifi antenna, etc?  I want to make sure I have the correct length USB cables.  What are you using as your USB WiFi that allows for a single antenna connection?

Thanks in advance,

Mike

AdamHI

unread,
Jul 28, 2013, 6:21:13 PM7/28/13
to weewx...@googlegroups.com
Attached are a few more photos some with annotations. They can also be found on Photobucket. (first time i'm posting attachments to Google Groups - hope it's ok).

For cables, the only one you see that wasn't included with either the USB hub, or the Wx station, is the short - 12 inch - USB cable that brings power from the hub to the Pi. The hub gets its power from a plug-in wall wart. The data going to/from the Pi goes through the flat, gray cable that is permanently attached to the hub. That way i only use one of the two USB ports on the Pi. The data from the Wx Station console goes to the hub. The USB WiFi is plugged directly into the hub.

I don't have any computer or display hooked to the Pi. I have it set up "headless". All my interactions with it are over ethernet using SSH from my any of my other computers, or even cell phone. This way i can keep the Pi and the hub somewhat hidden behind some books, and still have the console in a nice, visible location.

The USB WiFI i'm using is this one (from Adafruit)
  https://www.adafruit.com/products/1030

You will have to make some config file adjustments for the Pi for this N adapter, it wasn't just plug and play! Let me know if you have any troubles, and i'll try to recreate what i had to do.

Hope that helped.  --adam

BTW - Tropical Storm Flossie is heading toward the state of Hawaii, arriving at the Big Island Monday morning, and here on Oahu Monday night, local time (UTC -10). We are supposed to get 8 or more inches (20cm) of rain here in the Manoa valley over the course of the storm.

--adam, wh6m
Bookshelf.jpg
Console.jpg
Pi.jpg
Reply all
Reply to author
Forward
0 new messages