Author Topic: AERCUS Weathersleuth / Ambient Weather 1400IP Creating Local Weather Display  (Read 4789 times)

0 Members and 1 Guest are viewing this topic.

Offline OlsBean

  • Member
  • *
  • Posts: 16
Hello, my first post here so please be gentle with me.

I've owned and used a Watson W-8681 for around 6 years and during that time I was never really interested in ever doing anything with the Data other than view it on the Display, last year though it started playing up, despite my best efforts with regularly servicing it, I think the weather here finally got the better of it. So I went for an even simpler approach and purchased a Netatmo and to cut a long story short after having to return the Outside Unit twice in 8 months, I got my money back and last week bought the Aercus WeatherSleuth, which I believe is a rebadged Ambient 1400IP?

So this as most know is a WS without a Display, reports directly to an online weather service, by default this is Wunderground. The WS was simple to setup and is up and running just fine, the problem is like so many others I believe, from what I've now read online, is that I am finding the data displayed by Wunderground a tad lacking, namely the lack of indoor temp/hum and the fact there is not a way to have UK type units (mixed metric/imperial), I've personally don't own an iPad so I can't use the WunderStation app, which incidentally I have tried and seen and would be perfect for my needs, but it does not look like they are planning on making any other versions anytime soon, if at all.

So I've started looking at gleaning the WS Data locally to use to perhaps create a local HTML Weather Display. I've have had no issues getting the Data off the WS and saving it a JSON file before retransmitting it to Wunderground and the Live Data variables I have to work with are;

Code: [Select]
"ID":"xxxxxxx",
"PASSWORD":"xxxxxx"
"tempf":"57.4"
"humidity":"68"
"dewptf":"46.9"
"windchillf":"57.4"
"winddir":"296"
"windspeedmph":"4.47"
"windgustmph":"7.38"
"rainin":"0.00"
"dailyrainin":"0.05"
"weeklyrainin":"0.21"
"monthlyrainin":"0.21"
"yearlyrainin":"0.21"
"solarradiation":"361.92"
"UV":"3"
"indoortempf":"66.6"
"indoorhumidity":"68"
"baromin":"29.82"
"lowbatt":"0"
"dateutc":"2016-7-30 12:17:29"
"softwaretype":"Weather logger V2.1.9"
"action":"updateraw"
"realtime":"1"
"rtfreq":"5"

So I've been looking at weatherist34's Template to see if that would be suitable and was wondering if anyone else had already done this, whether there was already a compatible version out there somewhere that would work? The template version I have appears to process much more data as I am guessing the WS it supports (WS1001?) has historical data as well as live data?

At the end of the day I just want to create a clean looking page that I could perhaps point an old Android Tablet at or my PC browser to see my current Weather Data, perhaps a forecast and a little history.

Any thoughts or advice would be welcomed.

Thank you.

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
The WS1001 does keep historical data local on the console.  The template has some cron jobs that keep trending data.   The 1400 is basically the same sensor array as the 1001, and the ObserverIP module.  What exactly are you looking to do?  I have the same exact setup (with Ambient Weather branding), and a Meteobridge to send the data other places.

If you could give me an idea on what you think you are missing, I'll be more than happy to help.

For the record, my set up is:
WS1001(WH24) Sensor array, Indoor TH sensor (WH25) WS1001 Console (that appears to not be talking WiFi to WU), ObserverIP that grabs the data, sends it to the WS1001 template and via that to WU, a Meteobridge (D-Link DIR505, and the software) that grabs the ObserverIP data and sends it to a bunch of other networks.

All the URL's in my signature are driven off this data.



Offline OlsBean

  • Member
  • *
  • Posts: 16
Thank you :)

I'm not looking to send the data anywhere else, apart from Wunderground which I am able to do. I just basically want to recreate a nice looking console in a Webpage that I can then access locally only, on my LAN with a browser, I don't need external/remote access. I am capturing the Livedata just fine in a JSON file by using similar methods described at http://obrienlabs.net/redirecting-weather-station-data-from-observerip/ , and then passing it Wunderground, this works fine for me and the JSON file contains the data listed in my first post.

I guess I want to show the live weather data in the Template and some Historical + Forcasts pulled every a couple of times a day back from Wunderground? Or would it be better to archive the live data locally? I started playing with the Template and as able to show live Data like Temp and Wind, but the Barometer and Rain were a little more confusing as they have additional variables which I assume are available from WS1001's data. Which is what lead me to ask if anyone else had already done this. I only have the above Live Data available to me.

Thanks again.

Offline OlsBean

  • Member
  • *
  • Posts: 16

All the URL's in my signature are driven off this data.

So basically I am looking to reproduce http://weather.lerctr.org/ with the live Data I have (as per my list above) and Data available under my PWS at Wunderground.

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather

All the URL's in my signature are driven off this data.

So basically I am looking to reproduce http://weather.lerctr.org/ with the live Data I have (as per my list above) and Data available under my PWS at Wunderground.

That is all done by the template, and the cronjobs that I've posted on GitHub.

Did you set up the crons?  Did you get a WU (Free) API KEY?

What my ObserverIP sends is:
Code: [Select]
weather=# select * from raw_query order by date_sub desc limit 1;
        date_sub        |                                                                                                                                                                                                         data
------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 2016-07-30 10:58:55-05 | ID=xxxxxx&PASSWORD=xxxxxx&tempf=86.9&humidity=62&dewptf=72.3&windchillf=86.9&winddir=224&windspeedmph=0.00&windgustmph=0.00&rainin=0.00&dailyrainin=0.00&weeklyrainin=0.85&monthlyrainin=0.96&yearlyrainin=1.29&solarradiation=733.47&UV=5&indoortempf=81.9&indoorhumidity=45&baromin=30.03&lowbatt=0&dateutc=2016-7-30%2015:58:47&softwaretype=Weather%20logger%20V2.1.9&action=updateraw&realtime=1&rtfreq=5
(1 row)

weather=#

You should be seeing similar.  (the above is captured via the PostgresDB version of updateweather).

That data is coming from the ObserverIP.

Offline OlsBean

  • Member
  • *
  • Posts: 16
I've manually recreated them Cron jobs for now whilst I am testing. Yes I have the API/Station ID , I'll go do a clean install now and see what I get and report back.

Thanks Again.

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
I've manually recreated them Cron jobs for now whilst I am testing. Yes I have the API/Station ID , I'll go do a clean install now and see what I get and report back.

Thanks Again.

NOTE: The API key is SEPARATE from the StationID......

Offline OlsBean

  • Member
  • *
  • Posts: 16
I've manually recreated them Cron jobs for now whilst I am testing. Yes I have the API/Station ID , I'll go do a clean install now and see what I get and report back.

Thanks Again.

NOTE: The API key is SEPARATE from the StationID......

Yes I know that, I don't think the issue is with getting Data from Wunderground, the issue is with the live Data because variable names are different in WS1001.json and in the raw data JSON file I am creating. For example "outsideTemp" v "tempf"

WS1001.json
Code: [Select]
{"timestamp":1468832926,"updated":"12:08:46","outsideTemp":"78.6","outsideHumidity":"55","humiditytrend":"55","dewpoint":"61.2","dewpointtrend":"61.2","windchill":"78.6","heatindex":80,"realfeel":78.7,"windDir":"33","windSpeed":"1.1","windGust":"2.5","rainrate":"0.00","raintoday":"0.00","rainweek":"0.00","rainmonth":"0.70","rainyear":"18.32","radiation":"745.20","UV":"7","UVtrend":"7","indoorTemp":"80.8","indoorfeel":81.2,"indoorHumidity":"56","barometer":"29.87","absbarometer":"29.61","indoortrendTemp":"80.8","indoortrendHumidity":"56","trendTemp":"78.6","windtrend":"1.1","windgusttrend":"2.5","trendbarometer":"29.87","solartrend":"745.20","softwaretype":"ISTANBUL161 V2.2.5","month":"July","year":"2016","day":"Monday","realtime":"1","rtfreq":"5","status":"updateraw","timeutc":"2016-7-18 9:8:45","power":true}
LiveData from WeatherSleuth intercept.
Code: [Select]
{"ID":"xxxxxxx","PASSWORD":"xxxxxx","tempf":"59.7","humidity":"67","dewptf":"48.7","windchillf":"59.7","winddir":"350","windspeedmph":"2.01","windgustmph":"4.92","rainin":"0.00","dailyrainin":"0.05","weeklyrainin":"0.21","monthlyrainin":"0.21","yearlyrainin":"0.21","solarradiation":"322.47","UV":"3","indoortempf":"66.7","indoorhumidity":"68","baromin":"29.82","lowbatt":"0","dateutc":"2016-7-30 13:5:40","softwaretype":"Weather logger V2.1.9","action":"updateraw","realtime":"1","rtfreq":"5"}
Does this make sense. So I started to work through and change the variables in livedata.php and this is where I started to struggle as I don't have things like absbarometer in my Live Data.



Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
Ok, the ws1001.json file is written by the weatherstation/updateweatherstation.php script that's called via the intercept.

It does all the translation.

the livedata.php file picks up that json file via the path in settings.php.

do watch permissions and location.

does that help?


Offline OlsBean

  • Member
  • *
  • Posts: 16
I don't see an updateweatherstation.php in the download

I created a simple one which works;
Code: [Select]
    $data = json_encode($_GET);
    $file = 'ws1001.json';
    file_put_contents($file, $data);

But it does no conversion, it just saves the Data as I have posted above with the original querystring names. The permissions are fine, all the JSON files are created even the ones created with data pulled via Wunderground. I don't have any problems with any of that, it all works as it should. The problem is the variable names are different and some don't even exist like "absbarometer".


Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
I don't see an updateweatherstation.php in the download

I created a simple one which works;
Code: [Select]
    $data = json_encode($_GET);
    $file = 'ws1001.json';
    file_put_contents($file, $data);

But it does no conversion, it just saves the Data as I have posted above with the original querystring names. The permissions are fine, all the JSON files are created even the ones created with data pulled via Wunderground. I don't have any problems with any of that, it all works as it should. The problem is the variable names are different and some don't even exist like "absbarometer".

it's in the weatherdata folder above the template versions.

Please do read the setup.rtf.


Offline OlsBean

  • Member
  • *
  • Posts: 16
What a complete Numpty  #-o Thank you, I've read the RTF but I must be missing this, I'll go play after dinner and report back, thank you once again for all your help.

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
What a complete Numpty  #-o Thank you, I've read the RTF but I must be missing this, I'll go play after dinner and report back, thank you once again for all your help.

basically, redirect the ObserverIP to YOUR site, and on your site have the weatherstation directory in the root of your site so that
http://your.site.uk/weatherstation/updateweatherstation.php is a valid URL.

let me know if you need more help :)

What is a Numpty? (must be UK Slang)

Offline OlsBean

  • Member
  • *
  • Posts: 16
Thank you! Most of it is working apart from the charts and the barometer gauge, do they need to any server extensions or any other configuration do you know?

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
Thank you! Most of it is working apart from the charts and the barometer gauge, do they need to any server extensions or any other configuration do you know?

Should just work(tm). 

Do you have all the cron jobs running?

What does it look like?

Offline OlsBean

  • Member
  • *
  • Posts: 16
I've not had chance to look at it this evening, I'll check it in the morning, I have a few ideas what it might be, I am guessing it's probably a PHP setting. I'll update tomorrow, thanks again for all your help with this.

Offline OlsBean

  • Member
  • *
  • Posts: 16
The Barometer was not being drawn because the trend.json and temptrend.json were not being updated with data, just a null value, this is because stationcron.php and chartcron.php were not loading the livedata file as they were looking for it in the same directory and not the parent directory, not sure if this is just due to my setup but I'll put it on Github for you to check.

I don't have the history charts working yet.

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
The Barometer was not being drawn because the trend.json and temptrend.json were not being updated with data, just a null value, this is because stationcron.php and chartcron.php were not loading the livedata file as they were looking for it in the same directory and not the parent directory, not sure if this is just due to my setup but I'll put it on Github for you to check.

I don't have the history charts working yet.
I think I know what it is.  The settings.php has the ws1001.json file without any pathing.  I wound up dropping Symbolic Links in a bunch of places on my site.   I really need to look at it, and make sure everything uses settings.php, and uses a full path.

Code: [Select]
thebighonker.lerctr.org /home/wview/pws $ find . -name ws1001.json -exec ls -l {} \;
-rw-r--r--  1 www  wview  842 Jul 31 18:43 ./weatherstation/ws1001.json
lrwxr-xr-x  1 wview  wview  26 Jul 22 17:19 ./ws1001.json -> weatherstation/ws1001.json
lrwxr-xr-x  1 wview  wview  29 Apr 29 08:30 ./cronfiles/ws1001.json -> ../weatherstation/ws1001.json
thebighonker.lerctr.org /home/wview/pws $


Offline OlsBean

  • Member
  • *
  • Posts: 16
I had everything working on my Desktop (IIS), I've moved everything to an old NAS (always on) I have on my LAN and with some tweaking, everything appeared to work fine but I can't get any of the JSON files to update, neither the live data or via the cron jobs, despite them running correctly and live data definately reaching the NAS then Wunderground. After much head scratching I've discovered that date_timestamp_get function is the problem, I only have PHP 5.2.3 and this is not supported  #-o . I'm not sure if there is any way around this for me, I don't think I can update PHP easily on this NAS sadly.


Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
What flavor NAS?

Offline OlsBean

  • Member
  • *
  • Posts: 16
It's a  Buffalo  LS-CHL V2 with a custom firmware on it. I've moved the GUI to port 8080 and am running lightppd 1.4.32 with PHP 5.2.3, it's flying to be honest but just that one function is not available.

Offline OlsBean

  • Member
  • *
  • Posts: 16
I've not been able to update PHP so as workaround for now I've changed the date_timestamp_get function to format('U'), not sure what the longterm implications of this are but I am able to view live data currently from my PWS and so far everything appears to be working as expected.

Thank you again Irosenman

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather

What is a Numpty? (must be UK Slang)

OT:  Up here in Canada we call the morons on the ski hills and trails "numpties" to draw attention to their usual moronic behaviours such as traversing across bowls filled with powder, stopping below the crest of a hill or jump area, etc.
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline lrosenman

  • Contributor
  • ***
  • Posts: 148
    • Siena Weather
I've not been able to update PHP so as workaround for now I've changed the date_timestamp_get function to format('U'), not sure what the longterm implications of this are but I am able to view live data currently from my PWS and so far everything appears to be working as expected.

Thank you again Irosenman
My absolute pleasure.  I enjoy helping.