Author Topic: Getting the data snapshot directly from the station  (Read 8023 times)

0 Members and 1 Guest are viewing this topic.

Offline codetonic

  • Member
  • *
  • Posts: 3
Getting the data snapshot directly from the station
« on: December 27, 2014, 02:25:54 PM »
I'm looking for the API information that would allow me to get the raw data from my AmbientWeather WS1400. The livedata.htm call already has the data in an html format. I don't mind parsing the data out but it seems like re-homogenizing milk. Is there a document that lists the calls available in the ObserverIP receiver? I can also get the data from api.wunderground but again it's not the direct raw feed. Something like:

192.xxx.x.xxx/cgi-bin/getRawData.cgi


Offline Josiah

  • Add-InWx Software Author
  • Forecaster
  • *****
  • Posts: 449
    • Add-InWx
Re: Getting the data snapshot directly from the station
« Reply #1 on: January 01, 2015, 06:58:51 PM »
Quick question, Are you trying to get the data on a webpage, or a PC?
Either way you may want to try looking at the upload Documentation for Wunderground. You can find it here: http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol
I know it's the upload protocol for WUnderground but i'm thinking that if the station uses the same protocol to upload elsewhere it may be useful.

Also, If you haven't already, I would try emailing Ambient.

I'm looking at adding support for the AmbientWeather Stations to my program, Add-InWx. So if you find anything, let me know.

Offline codetonic

  • Member
  • *
  • Posts: 3
Re: Getting the data snapshot directly from the station
« Reply #2 on: January 01, 2015, 07:53:36 PM »
Josiah, my AmbientWeather WS1400 is already a registered station with Wunderground. You can see my station at:
http://www.wunderground.com/personal-weather-station/dashboard?ID=KCOFORTC98
Uploading is not the subject here.

I have written a cgi that extracts the data from the XML provided by api.wunderground.com:
bananastrings.com/cgi-bin/wx/wxOne.cgi

What I want to do is get XML directly from my weather station. It is part of my home network. Instead of going out to the internet.
However, I have examined the firmware in the WS1400 and the API calls are not there. The solution for now will have to be
deconstructing the HTML provided by livedata.htm from the WS1400 firmware.


Offline Josiah

  • Add-InWx Software Author
  • Forecaster
  • *****
  • Posts: 449
    • Add-InWx
Re: Getting the data snapshot directly from the station
« Reply #3 on: January 01, 2015, 08:50:30 PM »
sorry, I should have phrased my question better..  :oops:

I have a couple of ideas to get the live station data, and that's why i was wondering where you are trying to get the data onto (ie. a personal website or a program running on a local PC).
From what you said I'm assuming you want to use the Station data on a local PC. Is this correct?

Offline codetonic

  • Member
  • *
  • Posts: 3
Re: Getting the data snapshot directly from the station
« Reply #4 on: January 01, 2015, 11:36:14 PM »
Right. It's for a home PC, android to be more specific. The WS1400 doesn't come with a local display unit. The cgi mentioned has been designed to be displayed on a 7" android tablet. I'll mount the tablet in the kitchen for continuous display of the weather station info. There is really no problem with accessing the internet other than the display needs to be refreshed at intervals. So I'd rather keep that traffic in house and not burden the world with my continuous data grabs from wunderground.

Since Ambient did not include API's to make a clean data grab, I'll reverse the HTML and get the data that way.
What is curious though is the data transfer from the WS1400 to wunderground; is it already packaged as XML or is wunderground building an XML file.

What is your idea?

Offline Josiah

  • Add-InWx Software Author
  • Forecaster
  • *****
  • Posts: 449
    • Add-InWx
Re: Getting the data snapshot directly from the station
« Reply #5 on: January 02, 2015, 10:40:25 AM »
Wunderground is receiving the data as a text string via an HHTP GET request. The Wunderground upload protocol doc page i linked is the format that the station uses.
I believe the reason why there are no docs for an API is because the station is designed to connect to a server somewhere and not have client connections to it (Other than a Web browser for configuration).

So my idea is to (for now) redirect where the station uploads to. The idea being to have the station send the data to your tablet in the same format it would otherwise use to send it to WUnderground.
This way you would be receiving the data as a text string, Which might be easier to parse than an XML file.

I was looking into it earlier for their WiFi version, so to get a better idea of the angle I'm coming at it from Look at this thread: http://www.wxforum.net/index.php?topic=22605.225
You'll need to scroll about halfway down the page to where I start responding to NETO's question.

Offline peter334

  • Member
  • *
  • Posts: 5
Re: Getting the data snapshot directly from the station
« Reply #6 on: October 29, 2015, 05:01:26 PM »
Where did you two land on this topic? I just purchased a ws_1400_ip and I have been tinkering with trying to get the data stored on my PC, and displayed on my android would be nice too. I have Blue Iris running multiple cameras and I currently display the my Wunderground station as an overlay on one of my cameras. The only problem is I cannot get internal temp/humidity unless I can grab the text data from the station. Apparently if you have an iPad you can get the internal temp/humidity.

Offline Josiah

  • Add-InWx Software Author
  • Forecaster
  • *****
  • Posts: 449
    • Add-InWx
Re: Getting the data snapshot directly from the station
« Reply #7 on: October 31, 2015, 08:03:00 PM »
I got distracted by a rewrite of AddinWX. I haven't had a chance to look into it any further since my last post in this thread. I do hope to look into it again though.

Offline drsprite

  • Senior Member
  • **
  • Posts: 86
Re: Getting the data snapshot directly from the station
« Reply #8 on: December 27, 2015, 08:14:05 PM »
I received an Ambient WS-1200-IP for Christmas, and have been nerding on it since. The ObserverIP unit answers to telnet, but only config options exist. The web config mentions port 5000 for server IP, but port 5000 isn't answering with any tcp methods.. Perhaps there's something here with some UDP packets to get raw wx data?

This Python script for a weewx driver claims to work with the ObserverIP module, however I haven't been able to have luck with it yet. https://github.com/dkmcode/weewx-observerip/blob/master/bin/user/observerip.py

Edit: I read this Python script a little more, and it looks like it might just be doing some screen scraping. You can see a reference to when weewx goes to get data (using data = self.obshardware.data() ), it ultimately just grabs the livedata.htm web page.
Code: [Select]
def data(self):
        return self.page_to_dict('http://%s/livedata.htm' % self.ipaddr())

Here's another example of how to screen scrape the data using Python. This looks a lot easier and isn't tied into the WeeWX platform: http://obrienlabs.net/code/ambient-weather-observerip-python-script/

I guess screen scraping is the way to go, but I wanted to check in to see if someone's been able to figure out another way to extract the data off the ObserverIP unit?

Edit: Screen scraping is not the way to go. Full write up here: http://obrienlabs.net/redirecting-weather-station-data-from-observerip/
« Last Edit: June 25, 2016, 10:21:09 PM by drsprite »

Offline juanpa

  • Member
  • *
  • Posts: 10
Re: Getting the data snapshot directly from the station
« Reply #9 on: May 31, 2016, 04:58:33 PM »
The new myPWS by sonotrigger software app version has a automatic replay booton, each 1' the date is rewrite in a iphone or andorid device. You can use a old tablet for make a home display.

 

anything