Author Topic: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?  (Read 38812 times)

0 Members and 1 Guest are viewing this topic.

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #25 on: January 05, 2016, 07:58:53 AM »

A-ha!! Found it :) here's what is in the access log :

192.168.0.14 - - [04/Jan/2016:21:02:36 +0000] "GET /weatherstation/up
dateweatherstation.php?ID=IENGLAND1112&PASSWORD=PLAINTEXTPASSWORD&tempf=43.3&h
umidity=98&dewptf=42.8&windchillf=43.3&winddir=129&windspeedmph=0.00&
windgustmph=0.00&rainin=0.00&dailyrainin=0.04&weeklyrainin=0.04&month
lyrainin=0.91&yearlyrainin=0.91&solarradiation=0.00&UV=0&indoortempf=
76.5&indoorhumidity=49&baromin=29.05&lowbatt=0&dateutc=2016-1-4%2021:
2:35&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime
=1&rtfreq=5 HTTP/1.0" 404 237 "-" "-"

Interesting to see that the password for the station is sent as plain text across a http link. And the ObserverIP is passing all values in inches/Fahrenheit even though I display them as MM/Celsius. So there's no need for any listener to perform conversions or be able to handle multiple formats!


Now I'm very jealous! I just tried messing with the telnet options again to see if maybe it takes the ObserverIP a few minutes to realize I told it a new hostname, but nothing has come through to my server yet - everything is still going to wunderground. Ambient Weather must have it hard coded in the firmware :(

Offline redvers

  • Member
  • *
  • Posts: 25
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #26 on: January 05, 2016, 11:18:12 AM »


A-ha!! Found it :) here's what is in the access log :

192.168.0.14 - - [04/Jan/2016:21:02:36 +0000] "GET /weatherstation/up
dateweatherstation.php?ID=IENGLAND1112&PASSWORD=PLAINTEXTPASSWORD&tempf=43.3&h
umidity=98&dewptf=42.8&windchillf=43.3&winddir=129&windspeedmph=0.00&
windgustmph=0.00&rainin=0.00&dailyrainin=0.04&weeklyrainin=0.04&month
lyrainin=0.91&yearlyrainin=0.91&solarradiation=0.00&UV=0&indoortempf=
76.5&indoorhumidity=49&baromin=29.05&lowbatt=0&dateutc=2016-1-4%2021:
2:35&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime
=1&rtfreq=5 HTTP/1.0" 404 237 "-" "-"

Interesting to see that the password for the station is sent as plain text across a http link. And the ObserverIP is passing all values in inches/Fahrenheit even though I display them as MM/Celsius. So there's no need for any listener to perform conversions or be able to handle multiple formats!


Now I'm very jealous! I just tried messing with the telnet options again to see if maybe it takes the ObserverIP a few minutes to realize I told it a new hostname, but nothing has come through to my server yet - everything is still going to wunderground. Ambient Weather must have it hard coded in the firmware :(

:( the only one you should need to change is the dstsrvhost (I think, from memory) so if that still reports as your IP but sends to wunderground, you'd need to play around with iptables on your router

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #27 on: January 05, 2016, 12:00:48 PM »
:( the only one you should need to change is the dstsrvhost (I think, from memory) so if that still reports as your IP but sends to wunderground, you'd need to play around with iptables on your router

Yeah I tried playing with iptables and dnsmasq for custom dns entries and it wasn't working quite like how I wanted it to.

I made a quick and dirty update to my my weewx driver and it hasn't crashed yet. Sadly, I think this might be the best way for me to go about getting the weather data (screen scraping).
« Last Edit: January 05, 2016, 12:03:39 PM by drsprite »

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #28 on: January 08, 2016, 02:21:44 PM »
I was just reading the user manual for the WeatherSleuth, and I don't think it'll work for me. Your system looks like it uses 433mhz, and mine uses 915mhz. So I am thinking that the firmware will only work on the 433mhz band.  :-(

My guess is that the wireless part is entirely self-contained on a swappable hardware module and that all the device sees is a serial port stream which will look the same to the observerIP regardless of which frequency is used.

Graham

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #29 on: January 08, 2016, 02:41:36 PM »
Well, looks like maybe there's the server option in telnet. Not sure I want to change it quite yet - still having a look around. And best I know, Weather Underground doesn't use port 5000 either.

and I wonder what the difference is between server mode and client mode on this thing?

I wasn't too impressed with this thing when I scanned it and found a telnet listener which let me log in using my very first guess! (admin/admin) (or that the web interface is passwordless).

The ObserverIP appears to be an off-the-shelf serial port to ethernet gateway, with the 2 external serial ports replaced by transceivers to the outdoor and indoor sensor devices.  If I'm right, the system isn't extensible by adding more radio devices but it may be possible to add more sensors to the two existing devices.

This appears to be the underlying hardware: http://www.sensormetrix.co.uk/download.php?id=235&cmd=view

Some of the extra commands listed don't work in our box but some do. I haven't tried them all yet.

There's a debug mode and perhaps it may be possible to telnet in to the device and see the serial data using debug mode?

Since this is my wife's system and her interest is more in feeding data to Wunderground, I'm not going to do anything to it that might break it, but the hardware hacker in me definitely sees some potential for playing around with this.  It might not be too hard to sniff the serial data stream by using an SDR (SDR, because I seem to have every variety of serial radio module here *except* 915 MHz!)  I suspect that the box does very little other than forward the serial data to Wunderground.  Has anyone tcpdumped the connection yet?  If you're continuously feeding wunderground it may be easier to tap into the stream at the TCP/IP level than to build an arduino+transceiver to sniff at the radio level.

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #30 on: January 08, 2016, 03:35:46 PM »
I wasn't too impressed with this thing when I scanned it and found a telnet listener which let me log in using my very first guess! (admin/admin) (or that the web interface is passwordless).

The ObserverIP appears to be an off-the-shelf serial port to ethernet gateway, with the 2 external serial ports replaced by transceivers to the outdoor and indoor sensor devices.  If I'm right, the system isn't extensible by adding more radio devices but it may be possible to add more sensors to the two existing devices.

This appears to be the underlying hardware: http://www.sensormetrix.co.uk/download.php?id=235&cmd=view

Some of the extra commands listed don't work in our box but some do. I haven't tried them all yet.

There's a debug mode and perhaps it may be possible to telnet in to the device and see the serial data using debug mode?

Since this is my wife's system and her interest is more in feeding data to Wunderground, I'm not going to do anything to it that might break it, but the hardware hacker in me definitely sees some potential for playing around with this.  It might not be too hard to sniff the serial data stream by using an SDR (SDR, because I seem to have every variety of serial radio module here *except* 915 MHz!)  I suspect that the box does very little other than forward the serial data to Wunderground.  Has anyone tcpdumped the connection yet?  If you're continuously feeding wunderground it may be easier to tap into the stream at the TCP/IP level than to build an arduino+transceiver to sniff at the radio level.

You might find more information on this thing from Fine Offset. I think they're the company that converts them into the 433/915mhz models that resellers use to resell it.

I haven't tcpdump'd the packets yet, but to be honest I gave up on my thoughts of using a Moteino transceiver to intercept the 915mhz packets and try to decode it. I could be talked back into that idea though (the Moteino is only $25 with the 915mhz radio and USB serial board).

If you have the Ambient Weather model, you'll find that most of the telnet commands are useless. A lot of the wunderground stuff is hard coded into the firmware directly.

As it stands right now, using my weewx driver to screen scrape the livedata.htm on the ObserverIP is working with pretty good success (albeit because there's no error handling :grin: other than a sleep timer to just try again later. something on my to-do list is to clean that up a little)

I still am curious about the ObserverIP client/server mode - but I haven't played with that option quite yet.
« Last Edit: January 08, 2016, 03:37:49 PM by drsprite »

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #31 on: January 08, 2016, 04:33:04 PM »
You might find more information on this thing from Fine Offset. I think they're the company that converts them into the 433/915mhz models that resellers use to resell it.

Good catch.  Here are the links I've found so far:

http://www.foshk.com/Weather_Professional/WH2600.htm
http://foshk.en.alibaba.com/product/60013359795-215547304/Solar_weather_station_with_observer_IP_address.html
http://foshk.en.alibaba.com/product/1903727067-213048872/Internet_protocol_Weather_Station_Gateway_Weather_Station.html

I found these manuals:
http://www.produktinfo.conrad.com/datenblaetter/1200000-1299999/001267654-an-01-en-INTERNET_WETTERSTATION.pdf
(and a slightly different version in French)
http://www.produktinfo.conrad.com/datenblaetter/1200000-1299999/001267654-an-01-fr-RENKFORCE_WH2600.pdf
although at first glance there doesn't appear to be anything here that's not in the Ambient manual.


Back to the subject of logging data from the sensors: does anyone know how the ObserverIP distinguishes between multiple sensors?  There was no 'pairing' step in the setup.  It either connects to the first two devices it finds, or they're somehow tied together at the factory?  Note that this product:  http://foshk.en.alibaba.com/product/60422938427-200225334/Wireless_weather_station_with_dual_thermo_hygro_sensors_Internet_weather_station.html
 is basically the ObserverIP with two identical pressure sensors.  Confirming, I suspect, that it can only access two wireless devices, and that perhaps it just picks up the first two it finds?

Graham

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #32 on: January 08, 2016, 08:27:58 PM »
Back to the subject of logging data from the sensors: does anyone know how the ObserverIP distinguishes between multiple sensors?  There was no 'pairing' step in the setup.  It either connects to the first two devices it finds, or they're somehow tied together at the factory?  Note that this product:  http://foshk.en.alibaba.com/product/60422938427-200225334/Wireless_weather_station_with_dual_thermo_hygro_sensors_Internet_weather_station.html
 is basically the ObserverIP with two identical pressure sensors.  Confirming, I suspect, that it can only access two wireless devices, and that perhaps it just picks up the first two it finds?

I can't confirm this, but I know that "915mhz" is a generic term for 900-920mhz, I think. So my hunch is that this station communicates on one specific frequency in between - so step 1 to "pairing" them is to be on the right frequency.

Step two could be a unique bit code in the packet data that the ObserverIP recognizes as something it can decode. Probably in the first few bits of the packet?

Again, I can't confirm, but based on some other research I've done on Google, that's what it is sort of looking like. It may also be encrypted data, and the ObserverIP knows how to decrypt it, which also aids in the pairing.

These two links aren't Ambient Weather's data packet, but it might be some good insight on what you might find if you wanted to sniff the 915mhz band (or 433mhz in EU)

http://fredboboss.free.fr/articles/tx29.php

http://madscientistlabs.blogspot.com/2014/02/build-your-own-davis-weather-station_17.html

So, I'm really thinking that with the $25 Moteino (Which is an Arduino clone), you might be able to find the packets these things are sending out. Decoding them is another step.

Some other hacks I've read say that the indoor module is mostly useless if you're trying to intercept packets. The only real value with that indoor sensor is the barometer and that you're better off to put a barometer on your Arduino-type sniffer/data packet capture device.
« Last Edit: January 08, 2016, 08:30:51 PM by drsprite »

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #33 on: January 09, 2016, 12:07:42 PM »
Wow, your firmware looks different than mine! That's exactly what I would need! I could put together a PHP page pretty quickly that would take the data in and see what the data is and then formulate something that way.

Even if the hardware doesn't let us change the target URL, since all it is doing is a GET to pass the readings on to wunderground  ( http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol ), it should be trivially easy to spoof rtupdate.wunderground.com either via a local DNS server, or by intercepting the IP with iptables, to MITM the connection and filter off the data.

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #34 on: January 09, 2016, 12:25:01 PM »
These two links aren't Ambient Weather's data packet, but it might be some good insight on what you might find if you wanted to sniff the 915mhz band (or 433mhz in EU)

http://fredboboss.free.fr/articles/tx29.php

http://madscientistlabs.blogspot.com/2014/02/build-your-own-davis-weather-station_17.html

So, I'm really thinking that with the $25 Moteino (Which is an Arduino clone), you might be able to find the packets these things are sending out. Decoding them is another step.

Some other hacks I've read say that the indoor module is mostly useless if you're trying to intercept packets. The only real value with that indoor sensor is the barometer and that you're better off to put a barometer on your Arduino-type sniffer/data packet capture device.

It would really help to know which transceiver they're using.  If it's a CC11xx like the Davis unit, there's a bunch of stuff out there on how to hack them starting with https://bitbucket.org/atlas0fd00m/rfcat (remember the "IM ME" toy?)  (Would also be quite amusing to add real time outdoor temperature to my Chronos watch :-) )  But I'm hoping it's something much simpler.  Normally I'ld open up the box and just look but as I mentioned this is my wife's project and I don't want to hijack her hardware.  (However sniffing it off air is quite another story ;-) )  Anyway I was wondering if anyone has had a look inside the ObserverIP yet?  Close-up photos especially welcomed!

Graham

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #35 on: January 09, 2016, 01:19:12 PM »
I can't confirm this, but I know that "915mhz" is a generic term for 900-920mhz, I think. So my hunch is that this station communicates on one specific frequency in between - so step 1 to "pairing" them is to be on the right frequency.

I'm looking at the spectrum with SDR# ...

There are simultaneous spikes from 914.85 and 914.97 at irregular intervals which I'm pretty sure is an enquiry from the Observer IP directed at both devices, and occasional spikes on 914.920 a few seconds later which are lower in strength and presumably from one of the two wireless sensor devices.  Traffic is not frequent or regular.  Unless I'm looking in the wrong place, my guess is that they're doing some optimisation for power management.  It'll be hard to debug capturing data that only takes a fraction of a second to transmit and only transmits once every few minutes! (unless there's a way to trick the sensors into continually transmitting? eg by rapidly changing the wind speed or rainfall rate?)

It would look like the ObserverIP uses two separate fixed-frequency transceivers rather than dynamically tuning from one frequency to another or talking to both devices on the same frequency.  Interesting choice of a higher-cost but higher-reliability design.

If my guess is correct there is no pairing of devices needed by the user (as we observe) - the pairing is effectively done by the factory selling sensor modules that use the appropriate two frequencies to match the receiver.  Whether everyone gets the same frequency for the same device remains to be seen.  The easy way would be that all outdoor units have one frequency and all the indoor units have the other, and only two frequencies are ever used, but that doesn't jibe with unit I found which came with two identical-looking barometer sensors?

Graham
« Last Edit: January 09, 2016, 01:20:44 PM by gtoal »

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #36 on: January 09, 2016, 03:04:50 PM »
It occurred to me that all the info one might need should be online at the FCC (or this copy of the FCC data which includes all the attachments which appear to be missing at the real FCC site!)

https://fccid.io/S2S

There are several of their products here but not the ones we're looking for - maybe they were registered with the FCC using a different company?  Anyway if it's sold legally in the US then it will be findable :-)

UPDATE: here are Fine Offset Electronics' registrations: https://fccid.io/WA5 and https://fccid.io/UCM

G
« Last Edit: January 09, 2016, 03:14:29 PM by gtoal »

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #37 on: January 09, 2016, 05:13:01 PM »
Even if the hardware doesn't let us change the target URL, since all it is doing is a GET to pass the readings on to wunderground  ( http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol ), it should be trivially easy to spoof rtupdate.wunderground.com either via a local DNS server, or by intercepting the IP with iptables, to MITM the connection and filter off the data.

I had that same idea too. I setup dnsmasq to act as my local dns server, and the darn thing never did a lookup against it. Even after rebooting it. It must have it cached, and I wasn't near the reset button. It's not a bad idea though you may have to reset the device for it release its dns cache.

Anyway I was wondering if anyone has had a look inside the ObserverIP yet?  Close-up photos especially welcomed!

I think right now it's just the two of us interested in doing packet sniffing.

I'm looking at the spectrum with SDR# ...

There are simultaneous spikes from 914.85 and 914.97 at irregular intervals which I'm pretty sure is an enquiry from the Observer IP directed at both devices, and occasional spikes on 914.920 a few seconds later which are lower in strength and presumably from one of the two wireless sensor devices.  Traffic is not frequent or regular.  Unless I'm looking in the wrong place, my guess is that they're doing some optimisation for power management.  It'll be hard to debug capturing data that only takes a fraction of a second to transmit and only transmits once every few minutes! (unless there's a way to trick the sensors into continually transmitting? eg by rapidly changing the wind speed or rainfall rate?)


I, too, was using my rtlsdr and SDR# to have a look. From what I've read online the outside unit sends its data, then sleeps for 16 seconds. It wakes up and transmits again. I believe the ObserverIP is a receive only device, and does not wake up the outdoor unit.

It would look like the ObserverIP uses two separate fixed-frequency transceivers rather than dynamically tuning from one frequency to another or talking to both devices on the same frequency.  Interesting choice of a higher-cost but higher-reliability design.
Yes, this makes sense and is why I mentioned most people bail on trying to sniff the indoor unit. The only real quality it's providing is the barometer, which you can add onto something like the Moteino very easily. Then use the Moteino to intercept the packet on 915mhz, add in barometer reading, then the Moteino transmits to wherever you want it to.

That's my plan - however I'm yet to purchase a Moteino because I have no idea how to decode a packet if I were to actually get one! For $25 though, it's worth tinkering.

It occurred to me that all the info one might need should be online at the FCC (or this copy of the FCC data which includes all the attachments which appear to be missing at the real FCC site!)

https://fccid.io/S2S

There are several of their products here but not the ones we're looking for - maybe they were registered with the FCC using a different company?  Anyway if it's sold legally in the US then it will be findable :-)

UPDATE: here are Fine Offset Electronics' registrations: https://fccid.io/WA5 and https://fccid.io/UCM

G

Good catch on the FCC lookup. Have you found it yet? I'll take a stab at trying to locate it too.
« Last Edit: January 09, 2016, 05:14:45 PM by drsprite »

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #38 on: January 09, 2016, 05:19:26 PM »
I have the Ambient Weather WS-1200-IP model, which comes with a screen.

This Fine Offset FCC file looks like it's my display unit. Might be some initial clues here?

https://fccid.io/WA5HP2002

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #39 on: January 09, 2016, 05:27:14 PM »
Found it. There's stickers right on the units with the FCC ID

Outdoor unit: https://fccid.io/WA5WH24B

Indoor unit: https://fccid.io/WA5WH25B

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #40 on: January 09, 2016, 05:48:36 PM »
Found it. There's stickers right on the units with the FCC ID
Outdoor unit: https://fccid.io/WA5WH24B

This is the closest match to the wireless add-on board I've found so far:

https://www.chip45.com/products/rfm22b-module_868mhz_ism_fsk_transceiver_spi_interface.php

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #41 on: January 09, 2016, 05:52:30 PM »
Found it. There's stickers right on the units with the FCC ID
Outdoor unit: https://fccid.io/WA5WH24B

This is the closest match to the wireless add-on board I've found so far:

https://www.chip45.com/products/rfm22b-module_868mhz_ism_fsk_transceiver_spi_interface.php

If I'm reading the FCC test report correctly, I was right that the outdoor unit is TX only. And it also looks like it is on 915.00mhz exactly.

There is no FCC sticker on the ObserverIP, which tells me it might be RX only and not need an FCC cert

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #42 on: January 09, 2016, 06:01:45 PM »
Found it. There's stickers right on the units with the FCC ID
Outdoor unit: https://fccid.io/WA5WH24B

This is the closest match to the wireless add-on board I've found so far:

https://www.chip45.com/products/rfm22b-module_868mhz_ism_fsk_transceiver_spi_interface.php

If I'm reading the FCC test report correctly, I was right that the outdoor unit is TX only. And it also looks like it is on 915.00mhz exactly.

There is no FCC sticker on the ObserverIP, which tells me it might be RX only and not need an FCC cert

One of these: https://www.sparkfun.com/products/12030 would be much easier to interface with than that low power arduino clone you mentioned.  Also - not often you ever see anything at a discount on Sparkfun :-) ... unfortunate that both the breakout ( https://www.sparkfun.com/products/10154 ) and the shield ( https://www.sparkfun.com/products/11018 ) seem to be preconfigured for the 434MHz option.

I agree with your conclusion that the wireless must be one-way.  Explains everything except why I was seeing simultaneous transmissions on two frequencies.  That could just be user error.  Some other RF source I wasn't aware of.

PS Note availability of code!: http://www.sparkfun.com/datasheets/BreakoutBoards/RFM22-Example-Code.zip
« Last Edit: January 09, 2016, 06:04:25 PM by gtoal »

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #43 on: January 09, 2016, 06:05:01 PM »
One of these: https://www.sparkfun.com/products/12030 would be much easier to interface with than that low power arduino clone you mentioned.  Also - not often you ever see anything at a discount on Sparkfun :-) ... unfortunate that both the breakout ( https://www.sparkfun.com/products/10154 ) and the shield ( https://www.sparkfun.com/products/11018 ) seem to be preconfigured for the 434MHz option.

II agree with your conclusion that the wireless must be one-way.  Explains everything except why I was seeing simultaneous transmissions on two frequencies.  That could just be user error.  Some other RF source I wasn't aware of.

You're right, that shield would be easier if it was configured for 915mhz....

I'm going to see if I can crack open the ObserverIP to get some photos. I don't see any screws. Hopefully its not those super-sensitive plastic clips holding it together. The antenna that's inside that unit might have more clues on the right hardware to buy

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #44 on: January 09, 2016, 07:08:20 PM »
I took 12 photos. The first few were with my iPhone, then when I saw how small the printing was so I broke out the DSLR and the 100mm macro.

I wanted to attach the highest resolution possible, but I exceeded the limit, so I've uploaded all 12 photos here: http://imgur.com/a/10ZwL

The hardest thing to see was the underside of the antenna module. The only thing I could see was "RFM31B REV 1.0". The rest of the text was tucked underneath. Looks like it was just which frequency it was set to, and we know it's 915mhz.

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #45 on: January 09, 2016, 08:25:01 PM »
The hardest thing to see was the underside of the antenna module. The only thing I could see was "RFM31B REV 1.0". The rest of the text was tucked underneath. Looks like it was just which frequency it was set to, and we know it's 915mhz.

Yep - very similar to the RFM22B - http://www.hoperf.com/upload/rf/RFM31B.pdf

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #46 on: January 09, 2016, 09:42:00 PM »
The hardest thing to see was the underside of the antenna module. The only thing I could see was "RFM31B REV 1.0". The rest of the text was tucked underneath. Looks like it was just which frequency it was set to, and we know it's 915mhz.

Yep - very similar to the RFM22B - http://www.hoperf.com/upload/rf/RFM31B.pdf

Some good info here, even the structure of the packet

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #47 on: January 10, 2016, 04:25:51 PM »
The hardest thing to see was the underside of the antenna module. The only thing I could see was "RFM31B REV 1.0". The rest of the text was tucked underneath. Looks like it was just which frequency it was set to, and we know it's 915mhz.

Yep - very similar to the RFM22B - http://www.hoperf.com/upload/rf/RFM31B.pdf

Some good info here, even the structure of the packet

Maybe we don't need to worry too much about which specific RFM module to use to receive these transmissions.

It looks like Kevin Sangeelee has worked out most of the details:

   http://www.susa.net/wordpress/2012/08/raspberry-pi-reading-wh1081-weather-sensors-using-an-rfm01-and-rfm12b/

     (more here: https://www.raspberrypi.org/forums/viewtopic.php?t=14777 )

I don't know how much of this is directly usable for our device - the 1080 is slightly different - but he sure has done a huge amount of groundwork that I hope we can build on!

See also
 https://web.archive.org/web/20150302182607/http://www.sevenwatt.com/main/wh1080-protocol-v2-fsk/
 http://jeelabs.net/boards/6/topics/1203
 http://sandaysoft.com/forum/viewtopic.php?f=13&t=4507&start=30

These guys have hardware for the Raspberry Pi that could be adapted to 915MHz with a bit of desoldering: http://shop.openenergymonitor.com/rfm69pi-433mhz-raspberry-pi-base-station-receiver-board/

Offline gtoal

  • Member
  • *
  • Posts: 24
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #48 on: January 10, 2016, 05:27:48 PM »
Explains everything except why I was seeing simultaneous transmissions on two frequencies.  That could just be user error.  Some other RF source I wasn't aware of.

It appears I have a Landis & Gyr electricity meter that reports my power consumption over a mesh network transmitting in the 915MHz band!

These SDR sticks are fun, aren't they :-)

G

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: How to directly log data from the Ambient Weather WS-1200-IP / ObserverIP?
« Reply #49 on: January 15, 2016, 08:25:08 PM »
I have to admit that I've sort-of moved on from the idea of intercepting the packet data. I've found another (somewhat easier) work around.

To anyone who's curious; here's what I did.

I had a spare WiFi router with dd-wrt flashed on it. So I plugged the ObserverIP into the router, and then the router into my primary router. On the dd-wrt router, I turned off wifi (don't need the extra interference). I also have it set in router mode (as opposed to gateway mode which is the default mode), but gateway mode will work fine too. Leaving it in gateway mode means you won't be able to access the ObserverIP unless you have a PC plugged into the dd-wrt router. Placing it into router mode, and adding static routes will make it available to the multiple subnets on the lan, but is more advanced.

Side note: I used a Linksys WRT54GL, it's a bit bulky. A TP-LINK MR3020 is smaller and would accomplish the same thing using OpenWRT

Here's a rough picture of the setup:
Code: [Select]
---------------     ---------         --------------
| ObserverIP | ---> | dd-wrt | ---> | Primary WiFi |
---------------     ---------         --------------

I setup DHCP reservation for the ObserverIP on the dd-wrt, so that everytime it reboots, the dd-wrt will give it the same IP. (I could have done static IP too, but chose for the reservation. This way I'm "hands off" of the ObserverIP).

Then on the dd-wrt, I added these firewall rules by going to Administration > Commands > paste the below, and click "Save Firewall". Change the x.x.x.x to your web server's IP.
Code: [Select]
iptables -t nat -A PREROUTING -s 192.168.1.55 -p tcp --dport 80 -j DNAT --to-destination x.x.x.x:80
iptables -t nat -A POSTROUTING -j MASQUERADE

The first line says anything coming from the 192.168.0.55 (which is the ObserverIP) and going TO anything on port 80 (we know wunderground rtupdate uses port 80), redirect those packets to my webserver's port 80 (x.x.x.x:80) instead. The 2nd line says to masquerade the traffic.

The result? Wunderground destined data instantly started going to my web server! It is awesome!

To prevent it from erroring, and to keep updating wunderground automatically, you have to match the incoming data. Which means creating a subdirectory on your webserver called weatherstation and a PHP file within called updateweatherstation.php.

Inside the updateweatherstation.php file I have automatically and instantly relay the raw data to wunderground without delay. That way I don't take away any functionality of the ObserverIP, and wunderground is always getting the data straight away. As soon as my server sees it, it sends it to wunderground. No delay.

Code: [Select]
<?php
$wunderground 
file_get_contents("http://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?" $_SERVER['QUERY_STRING']);
echo 
$wunderground;
?>


Note: you need to echo the results, otherwise the "Server" LED on the ObserverIP won't light up :)
Note: This quick PHP file also doesn't do any kind of spoof checking (that is, a random bot finding out you have this setup and sending false data and messing up your metrics)

After that, the data is yours!

Back in that same updateweatherstation.php PHP file, I have it write the data to a couple of JSON files that I use for live updates on my website. I also have another section in updateweatherstation.php that is sending the weather data to a localhost socket so that weewx can pick it up and archive it.

Here's how I'm saving the data to a JSON file:
Code: [Select]
<?php
date_default_timezone_set
('America/New_York');
$data = array(
"updated" => date("F d, Y g:i:s A"),
"outTemp" => $_GET['tempf'],
"outHumidity" => $_GET['humidity'],
"dewpoint" => $_GET['dewptf'],
"windchill" => $_GET['windchillf'],
"windDir" => $_GET['winddir'],
"windSpeed" => $_GET['windspeedmph'],
"windGust" => $_GET['windgustmph'],
"rain" => $_GET['rainin'],
"radiation" => $_GET['solarradiation'],
"UV" => $_GET['UV'],
"inTemp" => $_GET['indoortempf'],
"inHumidity" => $_GET['indoorhumidity'],
"barometer" => $_GET['baromin'],
"txBatteryStatus" => $_GET['lowbatt']
);
$json json_encode($data);
$file 'current.json';
file_put_contents($file$json);
?>

This would make current.json available in the same web directory, which is /weatherstation. So for example http://myserver/weatherstation/current.json

The contents of the JSON look like this, which is the exact same data wunderground received milliseconds ago!  8-)
Code: [Select]
{"updated":"January 15, 2016 8:23:27 PM","outTemp":"35.4","outHumidity":"63","dewpoint":"24.1","windchill":"35.4","windDir":"113","windSpeed":"0.00","windGust":"0.00","rain":"0.00","radiation":"0.00","UV":"0","inTemp":"68.9","inHumidity":"49","barometer":"29.57","txBatteryStatus":"0"}

Could I have used one of the readily available pieces of hardware & software (that run on a TP-LINK MR3020) to do this for me? Sure, but my solution is (mostly) free! (I already own the web server, and I already owned the Linksys WRT54GL).

A bit time consuming, but a lot easier than trying to intercept and decode packets over 915mhz!

I can write up a proper blog post with more details, if anyone is interested.
« Last Edit: January 15, 2016, 08:32:53 PM by drsprite »

 

anything