Using WUnderground.com to integrate Personal Weather Stations

@ffittsiv Hiya Frank.

The way Flexible Daily schedule works now, amount of moisture each zone can hold is pretty limited (due to soil type, sun exposure and vegetation needs). It means that even the heaviest rain has a relatively short effect on irrigation so Rachio doesnā€™t need to be aware of events more than a few days in the past.

Worst case scenario: you may use a few extra dollars worth of water the first time Rachio irrigates your zones.

As an alternative you can initially max out moisture levels (via an app) to avoid and delay your initial irrigation and ensure that you are saving every penny, you plants will probably be ok in the long run.

I recommend you donā€™t wait for native weather underground support, wufyi is pretty easy and free solution and water savings that Rachio can provide are well worth it.
Iā€™m actually disappointed with my Accurite (along with numerous other weather stations such as your Ambient Weather pws) which donā€™t support more alternative provides such as pwsweather. Seems it would be free of charge for them to do soā€¦

Cheers,
Gene

1 Like

Gene - this is awesome! I just found this as I was trying to get my PWS setup at home to work with my Gen2. This worked in less than 10 minutes. Thanks so much for posting this!

1 Like

Gene, thanks for your work on this!

One thing I am still trying to figure out: with this approach, is whatā€™s being pulled from WU and pushed to PWS just current/past weather? Or also includes forecasts? In reading FAQs about forecasts and personal weather stations, it sounded like if I set up a personal weather station at the house and connected it, just the measured weather would be uploaded to PWS service and Rachio would utilize other weather sources to get forecasts. Wondering what the answer is for ā€œvirtual PWSā€.

If this interface is not addressing forecasts, any idea if it can? I get that with a home PWS thereā€™s no forecast data available and Rachio still needs to interpolate from NWS or other sources based on my location. However, I know the WU API supports forecast data, just not sure if this approach is using it.

One reason I am particularly interested in this is that Iā€™m researching the feasibility of using the Dark Sky API as an alternative source. I use the app on my phone and have found it to be incredibly accurate in terms of both the microclimate forecast for our neighborhood as well as its reporting on current weather and history. Before I bother, want to make sure syncing forecast data to PWS is even feasible.

I assume I could get my answer reviewing the code - and plan to do that eventually anyway - but thought an answer to this question here might help others besides just me.

Clear skies,
Nathan

Hi Nathan,

You are right that this approach moves real-time data from WU to PWSweather, it does not include WU forecasts. Instead PWSweather shares the data with their partner service www.aerisweather.com, from which Rachio actually pulls all of the data it uses. Aeris Weather is where the data is interpreted to generate their own forecasts and you can compare forecast generated by their service (as seen via Rachio interface) to WU or Dark Sky.

At this time there is no option to specify alternative source of forecast data for Rachio, this may or may not (probably not) change for V3 of Rachio software. Overall empirical measurements (what wufyi is designed to provide) are far more important than forecast data if you are using a local (and accurate) station.

Cheers,
Gene

For anyone who is interested, I created a Docker Image that implements similar functionality to the solutions created by @Gene and @johnny2678.

I built this to deploy in Container Station running on my QNAP NAS, but it should run in any Docker-enabled environment. The footprint is small enough you could probably even get it running on the AWS free-tier.

Docker Hub: https://hub.docker.com/r/boatmeme/wunderground2pws/
Source Repo: https://github.com/boatmeme/wunderground2pws-docker

Thanks to everyone for the info in this thread!
Jonathan

4 Likes

Welcome fellow developer :slight_smile: Nice work youā€™ve done there :+1:

Took a quick look through your code, good work on filtering out old data. Be careful about negative values, like these (link) more on known WU issues (here).

Keep us informed if you make any updates, always nice to have another pair of eyes / brains on issues with WU data.

Cheers, :cheers:
Gene

2 Likes

Thanks for the warm welcome @Gene, and for all of the work youā€™ve done so far toward solving this problem. I wouldnā€™t have had the first clue how to call the PWSWeather endpoint without your source code.

Also, I took your advice and updated my code to filter negative (or otherwise bad) values from the updates. Iā€™m sure it doesnā€™t cover everything. So far Iā€™ve only seen happy-path data from the stations Iā€™m querying.

Hoping to contribute more in the future.

-jg

3 Likes

I just installed a Acurite weather station, set up a Weather Underground and PWSweather accounts and followed the procedures on wufyi.com. My temp and wind data transfers over to PWS, but the barometric pressure is stuck. What should I do? Both weather stations are titled KTXWYLIE41. Thanks for any help you might give.

Thank you Rick, while I would not call it ā€œstuckā€, as it does show fluctuations, I did notice that it doesnā€™t fully match your WU readings. Iā€™ll investigate and let you know what I find.

I did notice that it was static (stuck) for the first few hours, but has since started showing changes.

Gene

Thanks Gene, I appreciate your help.

By the way @NateEaton, I took a closer look into Dark Sky, and if you do end up integrating Dark Sky API into some sort of working solution, I guess you best bet would be to simply set a rain delay (not ideal I know) with Rachio API if a probability of sufficient rain (AKA a predetermined amount) exceeds a predetermined threshold.

Have you actually done studies on accuracy of Dark Sky predictions? Aeris forecasts left me unimpressed lately.

Gene

Gene youā€™re the best. I followed your instructions, took about 10 minutes to do the whole thing. (I already had my PWS on Wunderground.)
Once done, it took about 2 minutes for my data to show up on PWSweather, and about 10 minutes for my PWSweather station to show up as a choice on the Rachio site.
Awesome!

2 Likes

Gene,

Thanks for your work on this, and I apologize in advance for bothering you. I wanted to setup the script on my own shared hosted web site, but am getting a wuID error message ā€œour Weather Underground Station ID (wuID) appears to be invalidā€.

To research I used apigee.com and I was able to get my historic data using the wuID and my API key. However I can see from the statistics page of my wu API that there was a failure recorded with a offline lead to the message. I am assuming that the wuID is the one I can find on the WU map that corresponds to my weather station (netatmo ) . That station appears to be automatically put out there by Netatmo. I got an API key but it is not linked to the specific weather station, I am assuming that the key can be used to query any published wu station, correct?

For the pwsweather setup, there is a userID, a userPassword and a StationID. I believe I put the stationID in the script, and the password is the userID password? That seems odd, but I did not find any other place to set a pwsStation password, did I miss something?

Thanks!

Ross

Gene,

As is typical, a few minutes after I post an issue I figure it out.

At least on my shared hosted php 7.1 system, the quotes for $wuID, etc need to be single (ā€™)rather than double ("). I changed them all to single quotes and it is now working! The script on GitHub had double as default.

And I think I confirmed that the $wuID can be any weather station, the API key is not specific, the pwsID is the WeatherStationID and the $psw is apparently the password of the user that registered the WeatherStationID.

Thanks,

Ross

1 Like

Thanks Ross, Iā€™ll be sure to update it to single quotes for PHP 7.1 compatibility. Never though it would be a problem, great troubleshooting skills!

Cheers,
Gene

Iā€™m wondering what project info people have specified when applying for the WU APIā€¦ I donā€™t want to put anything in the application form that will jeopardize the wufyi.com link. Will they be upset if I tell them I am sending weather data to another weather network? Is this information checked?

Thanks @jkb, Iā€™ve seen no indication that this is ever checked, at least not for the kind of traffic your private API key is expected to generate.

1 Like

New user here! Just gotta say THANKS to Gene for all your work and explanations! I have a Rachio Gen 2 on order to replace our soon-to-be-obsolete Hydropoint WeatherTrak. Have had a WS-1001-WiFi up and running on WU since January 2017. Per the wufyi.com instructions, I signed up for a PWSweather station ID and a WU API. Loaded the customized script into cron-job and Bingo! our weather data is already transferring to PWSweather. Looking forward to installing the Rachio later this week and receiving regular localized weather updates. Great stuff! Thanks again!!

2 Likes

@Gene, thanks for wufyi.com! I have set up a nearby WU station to report on PWS, and now have better weather data for my Rachio than I had before. I am considering getting my own PWS.

2 Likes

Gene and all,
Having set up your solution, Iā€™m now having a problem getting my Rachio controller to ā€œstayā€ with my pws. The controller keeps reverting to another local weather station instead. Rachio says this could be due to my pws not responding or having null data.
Hereā€™s my pws link:
https://www.pwsweather.com/obs/KSCMOUNT85.html
It does have some data. But it also says in red letters "there is no data for the period you requested."
Any clues whatā€™s going on here?