WH1080 Weather Station Integration
Last October I purchased a WH1080 weather station (or google AKA Watson W8681) from flebay and for around £80 delivered to trial as a replacement of an aging Dallas one wire weather station that's now some 6yrs+ and showing it’s age as we all eventually do.
Today I did a little digging around on this weather station and I believe that it’s main display unit outputs data in an XML format at 19,200 baud, I’ll confirm if this is possible over the next day or so by taking a few XML code dumps and post them here.
So.... I was just wondering would the integration of this weather station in to the HAH livebox be of interest to others?
@ Brett / Derek what is the possibility of this unit being connected at 19,200 baud by the second USB port of the HAH Lvebox and is this possible?, if it is possible and if the interest is there could then could it be intergarted in to a future release?.
Steve
As Brett says, to get more serial ports you need to add a USB hub to the 'A' style port that is on the side of the Livebox. The second 'B' style USB port on the unit isn't implemented.
I've tested upto 4 USB/serial adaptors connected at the same time. Works fine.
Depending on the format of the XML output, you might be able to use xap-serial to get the payload onto a xAP message, from where some Lua script could parse it. I've only ever tried small 'one line' messages with xap-serial, so it might not be suitable.
Derek.
Steve, looks like a good resource pool, did you manage to make any progress on getting integrated?
Ian.
Hi Ian
Did you get anywhere with Steve/et al? I've got the same Weather Station and it'd be cool to get the data onto the HAHHub somehow!!!
Let me know how you get on!!!
EJ
There are some good C code files about for integrating into this device - Too hard to cross port from python and in anycase it still uses PyUSB/libusb underneath, so you might as well just use the C code and avoid all this extra software layering. LIBUSB isn't ported to the HAH so this would have to happen first as the weather station software builds upon this.
A couple of reference sites to add to the list so far.
- http://site.chowder.dons.net.au/~darius/hgwebdir.cgi/wh1080/file/e3d2b55...
- http://www.wviewweather.com/
Either way its not shaping up to be a simple excerise.
Brett
Steve,
All that needs to work is for "something/some device" to read the weather station data and push out an xAP packet. Remember xAP is a broadcast distributed protocol so the HAH can then just pick this up with pachube and feed away.
As for updating the livebox to 2.6.x this is a MAJOR undertaking, as it happens OPENWRT already support the livebox so its possible that I could just switch platforms altogether but again this is another MAJOR undertaking.
The fact that the kernel see's the device as a HID is good, this is what its suppose to do. LIBUSB simply allows you to unhook the device from the kernel and then rehook it again with your own driver. So if 2.4.17 can see the device AND libusb can be ported then its 100% posssible to support this device.
My problem is I have neither a livebox nor a weather station to develop with. Perhaps I can get Derek to buy a weather station and attach it to his livebox so I can do this remotely. I'm sure he is watching this feed and then looking on ebay for a compatible device. From what I have read MAPLINS also sell a weather station device that is also protocol compatible and there are other brands that use a similar encoding.
From what I've read the encoding is NOT XML is a proprietary binary stream. http://wiki.meteoplug.com/Hardware but I'm happy to be proved wrong. However the C/Python code that I read definately indicates this.
I'm keen to make this happen and support it natively on the HAH I just need some hardware to play with.
HMMM... Actually it migth be easier to get a BIFFER BOARD and just use this an a weather station to xAP adapter. The software has already been written to work with this unit - I just need to TWEAK it to spit out xAP. In fact I could port the whole DAMN HAH software suite to the biffer board.... these are only 35 quid and would make a nice SMALL turnkey HAH.
Brett
Or a Raspberry Pi micro format PC?
It'll be available 'real soon now'!
EJ
Woo check in /lib you will already find libusb is compiled up and ready to go on your HAH.
Damn I'm getting sloppy. OK we are really close now.
Brett
My jeenode receives "rouge data" and i have figured out where its coming from....yep pretty sure its my watson wx stn
so if we could decode this than no usb no display just pure rf data
I've compiled up this program AS IS http://code.google.com/p/fowsr/ without any changes, I do need to modify this so it will split out xAP packets but for now I just want to make sure that it loads and does (something) for those with wh1080 devices.
You can get and run the program on your HAH like this
# cd /root
# wget http://hah-beta.dbzoo.com/fowsr
# chmod a+x fowsr
# ./fowsr
When I run it this happens - but then again I don't have any USB device attached so this is normal.
# ./fowsr
100111EC | 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ | ....
usb_set_debug: Setting debugging level to 255 (on)
USB error: couldn't opendir(): No such file or directory
fowsr.c: 95: CUSB_Open: Assertion `dev' failed.
Aborted
#
Somebody try this and let me know what happens!
Use -? as a parameter to get some help. The log files that its talking about get written into /var (for now).
Wish I could do more but for now its a start.
Brett
Steve,
Something that I'm actually missing in the HAH configuration (CRAP). Is that I forgot to mount up the USBDEVFS so that libusb will work. Try this then running that program again.
# mount -t usbdevfs none /proc/bus/usb
Check the output in (*) and make sure your device appears in the list too.
# cat /proc/bus/usb/devices
Brett
Guys, this is great, I'm overwhelmed of the reaction.
Brett, u never cease to amaze me, even though you don't have the toy you still are keen to play - I wish the guys at work were so keen sometimes.
I've tried the suggested, and I concur with Steve, I get exactly the same output.
I figure the last thee lines on the USB list are the weather station.
Note I did have to power the weather station, seperately as it didn't seem to like using the bus power.
I'm running 301 btw
Yup this means the weather station is being noticed by the kernel but there isnt a driver for it, but that is ok as libusb will enumerate the usb bus and find the device and talk to it directly.
P: Vendor=1941 ProdID=8021 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl= 10ms
The next problem is this
USB error: could not get bound driver: No data available
usb_get_driver_np returned -61
But I was not expecting this one.... Steve had kind lent access to his weather unit remotely so I can pound away at trying to figure that one out.
I've made a change to /etc/rc.d/rc.sysinit to unconditionally mount the usbdevfs which fixes the 1st issue, 1 down > 1 to go.
Brett
Not in a position to check currently but I believe Sandaysoft's excellent (free) Cumulus weather software supports the WH1080 and includes xAP output. . And there's also the low cost Weather Display software with inbuilt xAP too. Both Windows only though...
K
Yes, it spits out xAP...a la
xap-header
{
v=12
hop=1
uid=FF437500
class=weather.report
source=sanday.cumulus.ASROCK
}
weather.report
{
UTC=23:37
DATE=20120116
WindM=0.0
WindK=0.0
WindGustsM=2.2
WindGustsK=3.6
WindDirD=360
WindDirC=N
TempC=0.7
TempF=33.3
DewC=-1.5
DewF=29.3
AirPressure=1017.8
}
So how do we get these into the HAHHub.....could these xAP items be referenced and posted to Pachube via the Pachube tab....something along the lines of
sanday.cumulus.ASROCK:TempC ............... for example....I'll have a go!
Will get back with results tomorrow....
EJ
On the Pachube page, add a new line, and in the columns
xAP Source would be sanday.cumulus.ASROCK
xAP Class would be weather.report
xAP Section would be weather.report
and key would be any of the keys in that section eg WindDtrC or TempC
Probaly all on a new feed(?) so create on Pachube
then add feed, id tag etc as required
add as many lines as you need, one for each item
HTH
Pretty Graphics on Cumulus, Weather Display has a pretty graphics add on but I think you have to pay for it. The WD program GUI is a bit challenging. Both on Windows. I seem to recall some problem (historicaly) with the xap message content of Cumulus, but cant remember what it was.
Be nice to be able to feed this directly into HAH, that would be a PC less then for me
kevint
Yup....that worked...thanks for the pointers...take a look at feed 5 on 34982 - its a cold night....
Also - yes, the graphics on Cumulus are v pretty...I'm running the remote W1080 screen via USB into a little ASROCK micro format PC that doubles as the media server in the kitchen so its on all the time!
Have you any experience with .png from Pachube - I'd really like to get two feeds onto the same graph so I can compare directly in real-time on a timely basis.... the neat graph that brett posted takes forever to load (Pachube forces it to download tons of history data, which takes time), however a two hour Pachube .png graph is down within 1/2 second or so....can you assist?
Thanks again...
EJ
No experience of that buy see the thread
http://community.pachube.com/node/182#comment-2284
and
http://apps.pachube.com/google_viz/preview_multi.php
HTH
kevint
There was a historic problem with Weather Display's xAP messages (it used CR as the delimiters) but that is fixed in the latest version. Cumulus is fine AFAIK however it doesn't include all the weather parameters it has available in the xAP message, mainly because they weren't defined in the xAP weather schema. They could be added easily if requested I'm sure. Can't remember specifically which are missing - maybe humidity ?
K
Brett put me onto this a couple of months ago and I've upgraded to the multiviz graph as well......however, they take an inordinate time to load (paticularly as I'm comparing data from three separate feeds, not just different IDs on the same feed!) and they only update every two hours or so (Pachube limitation for the amount of data requested - 30days).
On the other hand the standard .png graph that you can obtain from Pachube, you can set the amount of time you want for the y-axis (say two hours) and its an almost instantaneous download...which is what I'm after for speed...but it'll only show one Feed-ID!
So in a perfect world I'd be able to give a 'standard' .png a two hour timespan and three FeedIDs and I'd get a simple graph showing their relative curves for the past two hours.....simple? apparently not...Pachube have told me that they're working on something, but not to expect it any time soon.
I'm even doing the xAP Flash stuff on the Joggler in the hope that I can somehow download three separate .png graphs and overlay them one on top of the other in a text box (issues of transparency / opacity asside) with a refresh button or some form of timer automation so that I can get updated info in a timely manner!!!!
Anyway the Weather Staion xAP data is flowing onto the FeedID - although I did have a Pachube drop-out (as did many by the looks of it) and had to re-boot to restart the data loging....thanks again for that....
Ah well! Back to the day job.....
EJ
"My jeenode receives "rouge data" and i have figured out where its coming from....yep pretty sure its my watson wx stn
so if we could decode this than no usb no display just pure rf data"
A cautionary tale...
I have the "Watson Weather Station W8681" connected to "Weather Display" on a Windows PC. I originally bought this from Maplin. Some time ago I bought another display unit from ebay thinking I could have both displays/USB interfaces working from the same RF sensor set.
Unforthunately when I compared the two display units I found that the original one worked on 868.3hz and the ebay one worked on 433.9Mhz.
As I understand it both produce the same data from the USB port, and the ebay one was originaly from Maplin as it has the code N96GY on the back
If someone already has one of these 433Mhz systems and would like to experiment with running two display heads and report back, I would be happy to pass the unit on for the cost of post and packing
kevint
Did anybody get any further with the integration......I'm now the proud owner of a HAH compatible 4-port USB hub and I'm keen to move the WeatherStation onto the main HAHHub?
If it's been covered can you point me to the 'beginer's guide' please.....ta!
EJ
I've been hectically busy with work and other personal issues that need sorting out. Not to mentioned I managed to poison myself accidently which layed me flat for 1/2 day in bed. The last thing I did with this was establish that the HAH could SEE the USB device but I was having problem getting anything to talk to it using libusb. It would locate the device, open it and then return a string of garbage from the unit that wasn't being decoded correctly.
For the moment one can use the windows softwar to generate xAP traffic and pick this up with the HAH for pachube feeding. That is about where we are at.
Brett
Hi Brett
Sorry to hear your tale of woes...hope you're fully recovered? If not, then here's wishing you a speedy recovery...
I'm using the Cumulus Windows S/W to generate the xAP traffic, as advised - but a fully integrated HAHHub with WeatherStation is the ultimate goal......
Cheers...
;-) EJ
I've got one of these units on backorder from Maplin. Once it turns up, it will be easier to see what is going on.
Derek.
cover every part with some sort of anti weather proofing.
vaseline etc, also the temp sensor and battery holder should be shaded and the rain sensor should be fixed to a much better mount.
all above just makes it more resiliant and accurate.
stock its ok (as long as you wx proof it)
Dean
Thanks for the tip.
A bit of a worry if a weather station doesn't come 'pre weatherproofed'! The high winds around my place might blow that rain sensor away.
Anyway, it's really been bought to allow some HAH integratino experiments. Here in the west of scotland, a weather station isn't really needed - just a poster on the wall stating "rainy, cold and windy".
Mine has been running for about 3 years at the end of my garden - http://twitpic.com/jtkwv
It has needed occasional maintenance and debugging http://twitpic.com/jtl23 and http://twitpic.com/jtld2
It is also occasionaly prone to outside interference http://twitpic.com/1xwrov and the wind
and rain sensors do not perform well in extreme conditions http://twitpic.com/3bv7v5
I can see that a bit of TLC might be advantageous, but my station never got any
kevint
(Please see also captions of the photos on twitpic)
PS I changed the two AA duracells on the sensor poll, last week, they gave up in the cold. They lasted 862 days according to twitpic, not bad!
I still have an 11 year old wm-918 that works faultlessly (serial connection) and i put this down to weather proofing all the screws electonics etc every time i moved house (3 times in 11 years)
of the crew that bought a job lot of these only 2 remain (out of 10).
when i spend money on stuff i like it to last.
the watson i got in august as a birthday present (they did not know i had another wxstn)
Dean
Hi Kevin
Nice tidy looking set-up.....it's made me look at my lash up with a slightly critical eye and I've decided to bite the bullet and install the thing properly, taking into account all the suggestions about vasaline and silicone sealants.
I've been playing about with the datastreams, but please have a gander at Pachube 34982.
Cheers, and thanks for the RF stuff as well....
EJ
There is a thread on the automatedhome xAP forums discussing a revised weather.report schema.
Please have a look and contribute if you have any experience of weather stations and the data they produce
http://www.automatedhome.co.uk/vbulletin/showthread.php?p=15920
kevint (kev_t)
Not sure where WH1080 is on the Livebox feature roadmap, but at the moment (feb 2012) Clas Ohlson have this on special at £59.00, in store only purchase and when I was in there in passing this week they were running a £10 off coupon for purchases over £50
http://www.clasohlson.co.uk/Product/Product.aspx?id=167399209
kevint
.. anybody willing to make an extra purchase at clas ohlson and forward me .. ;) abroad? Compensation via Paypal eg.
BR, Aivo
Hi Steve,
was just looking at the HAH and WH1080 integration and found your node RF code, would like to give this a go to save messing around with USB and decoding the packets
did you make any further progress?
thanks
Andrew
Hi Steve,
Excellent, will have to get myself one to play with and test your code
can i ask, is anything missing that you can only get using the pc software with xAP output?
also, does your code render a basenode no longer functional for general roomnode use?
thanks
Andrew
I think combining the OOK and FSK would be possible on the proviso that you aren't using a PIR where it needs to wait for a ACK response from the base uni as this would require the reciever to sit in FSK until its received.
If you are just sending FSK data out ie for the temp, humidity, light and battery then whilst you are idle you can be in OOK receive mode waiting for the WH1080 data to come in. Its so crazy it might just work.
Brett
Hi Steve,
thanks for the information - sounds a great solution especially using the BMP085 - do you find it gives the exact same readings as the built in WH1080?
if you dont mind could you upload a picture of the finished product? im interested to see if using a nano and retro fitting the RFM12 is a better option over a jeenode where the RFM12 is soldered directly to the board
p.s regarding FSK mode after the OOK cap mod, have you tested this will work? i noticed its not in Jeenodes scope of testing
p.p.s i wonder if the same could be done with the Current Cost units - theres a thought
thanks
Andrew
Hi Steve,
thanks for the jpgs, size wise it doesnt look too much bigger than a Jeenode (not that size is an issue really) - i think i will order up a few bits including the sht11 and give it a go - any reason why i couldnt use a basenode rather than a nano? looking at the cost of the Nano + RFM12B its around HAH Basenode price - http://www.homeautomationhub.com/content/hah-basenode-kit
Thats interesting regarding the other RX in debug mode - i do indeed pickup a lot of info running in 433mhz mode and the CC units are indeed 433mhz so that could explain that one
EDIT - Ignore the above, i have been informed this isnt possible as the RFM12B is hardcoded to 868Mhz and not actually running in 433mhz mode
p.s the Open Energy Monitor project looks interesting
Andrew
Hi Steve,
thanks for the info - just looked up the DHT22 sensor board - a fraction of the price very interested and good luck with your testing
Im looking at ordering one of the B grade stocks of the Black unit from Maplins - http://www.maplin.co.uk/b-grade-usb-touchscreen-wireless-weather-forecas... (im hoping this indeed is a Watson WH1080 fineoffset clone - a few comments suggest it is so should be ok)
Andrew
Steve, this is most definately possible.
An xap-wh1080 daemon would be very similar in construction to the xap-currentcost daemon, just plug in a USB hub to your HAH and you can attach as many usb serial devices as the HAH supports ,which is arbitarily set a 8 - /dev/ttyUSB0 to /dev/ttyUSB7 - I can increase this if people need more.
If the XML isn't overly complicated I could possibly knock up a daemon for it if there is enough interest. However as I don't have the hardware to hand I'd have to code it purely from the XML that you can provide and get you to test it.
There is a xap schema to use too http://www.xapautomation.org/index.php?title=xAP_Weather_Schema
Brett