Using to integrate Personal Weather Stations

First of all Gene, thank you so much for all you’ve done. I really appreciate the efforts.

I’m not sure what I’ve done wrong, but…

When I use your with the URL params it works.

If I use the PHP on my site I get:
“ERROR: Not a vailid Station ID”

I’ve copied the params from the wufyi url to make sure I was using the same info.

Any help is appreciated.

1 Like

Error seems to indicate that your $pwsID variable was wrong, one difference between wufyi and hard coded variables is that wufyi uses a “sanitized” string, meaning that special characters where encoded to comply with URL standards, you may need to change your $pwsID declaration into something like this:

$pwsID = filter_var(“FexampleER”, FILTER_SANITIZE_STRING); // change contents, keep quotes

I’ve updated source code (link) just now, to include the fixes I’ve done since initial release. If you are interested in running it on your own, I recommend you download the updated code version.


1 Like

That did the trick.

Thanks again, Gene!!

1 Like

@laminack let me know if your server supports SQL, the fix I’m working on now would require it.

I’m also considering adding support for local .log file instead of the database (good if your server does not support many users), but that will take sometime to implement.

1 Like

I’ve just ordered a gen 2 and was mulling how to incorporate my Davis weatherstation’s data. It reports to Wunderground and also to Citizen Weather ( but this latter sometimes causes trouble - randomly causing the Weatherlink software to hang so I’ve taken to switching that feed off. Does the Rachio access CWOP (also= HamWeather) as well as PWS? I have a PWS account which hasn’t been used since I junked my Oregon Scientific weather station 7 years ago but I guess I could use the script to feed it. Trouble is I’m already accessing the Wunderground API to feed my VERA Z-Wave controller with a PLEG add-on and fear I may get into trouble with WU’s access limit if I run both. Maybe there could be a way for the Rachio to access the VERA weather data employing some sort of ITTT? Is there a step by step idiot’s guide on how to set up the script (looking at that code makes me feel queasy, I’m no good at that!)?

Looks like CWOP is supported, but you need to link it to NOAA in order for Rachio to see it:
See steps 8 through 11 here (link)

You have several options with API
0) Do nothing, use CWOP as outlined above.

  1. Check your API usage here (link), Weather Underground seems to track usage differently when data is accessed from one station only, you could be well under your 500 / day limit.
  2. Just create a second free API key using a different email.
  3. Check if Vera Z-Wave supports getting data from PWSweather instead of weather underground (in which case you can simply switch where API key is used).

Check here (link) for a better instructions on how to setup wufyi which has the script running already. You can start using the website without needing to host or reconfigure the script yourself.



Thanks very much Gene.

  • 'll try fine tuning my upload settings to aprs and see if I can get it stable. Clearly using the CWOP/NOAA data would be the easiest option provided I don’t need to be clucking over my weather software all the time.
  • I don’t see a pws add-in for VERA but a second API key would remove the “overactive anxiety” when doubling up the use of WU API - hadn’t occurred to me - simples!:grin:

Thank you so much @Gene ! My family gave me a Ambient Weather WiFi this year and I’ve had my eye on the Rachio Gen 2 ever since. Never for a moment considered Wunderground wouldn’t be included in the choices for PWS. I was pretty frustrated about it until I came across this.

I’m guessing the downside to doing it this way is that there is no historical data for the station I created? I only ask because my PWS has recorded 1.65" of rain in the past 7 days and 5.8" of rain in the past month. Guessing it assumes zero when setting up the ‘Flexible Daily’ schedule?

I would love to see direct integration with Rachio and WU. There are dozens of WU stations in my surrounding area, yet only a handful of stations available around me that I could pick from. I realize it’d be an extra cost for them, but there seems to be a big demand for it when looking through the community posts. I’ll definitely be checking back from time to time to see if they’ve added it. I’m sure there are good reasons they haven’t, but I hope they’re serious when they say they are working on it.

1 Like

@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…


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,

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, 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.


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:
Source Repo:

Thanks to everyone for the info in this thread!


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:


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.



I just installed a Acurite weather station, set up a Weather Underground and PWSweather accounts and followed the procedures on 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.


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 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.