New Parser for Australia
Pinned FeaturedHi,
I have written a parser for Australia based on the feed from willyweather.com.au.
Instructions and code can be found here: https://github.com/safepay/rainmachine
Willy Weather is a commercial API that uses the Bureau of Meteorology data and wraps it in a modern Json API framework that is easy for developers to consume. The first 5000 calls are free, then the cost varies based on data requested, but is less than $0.05 per 1000 calls.
This parser detects your location based on your lat/long settings and suggests the closest station ID's. You then enter and save the station ID of your choice and the parser does the rest.
I hope that this can assist anyone else looking for a local Australian weather source.
Cheers.
-
All, I have added a major update to the code, now including the percentage probability of rain. This should make forecasting based on the data more accurate.
I have also added support for weather icons, in case this is the only parser you use.
All users should update their installations.
Cheers!
-
Yes, its not working since the last firmware update.
Lots of errors in the logs, but the parser reports as successful.
I think they have introduced a bug...
Looks like the log contains the correct values from the parser but is now unable to import them. The logs show that the values from the parser are being incorrectly rejected as being ABOVE the limits of the system when they are clearly lower.
Values for precipitation and the icons are working, but temp, min/max temp and wind are not being imported.
This needs to be corrected by the Rainmachine developers.
2019-06-22 09:25:59,507 - ERROR - rmLimits:47 - TEMPERATURE value 12.7 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,343 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,345 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,349 - ERROR - rmLimits:47 - TEMPERATURE value 14.1 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,351 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,354 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,357 - ERROR - rmLimits:47 - TEMPERATURE value 14.9 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,359 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,361 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,365 - ERROR - rmLimits:47 - TEMPERATURE value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,367 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,369 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,373 - ERROR - rmLimits:47 - TEMPERATURE value 14.5 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,375 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,377 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,381 - ERROR - rmLimits:47 - TEMPERATURE value 13.3 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,383 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,385 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,389 - ERROR - rmLimits:47 - TEMPERATURE value 12.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,391 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,393 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,397 - ERROR - rmLimits:47 - TEMPERATURE value 10.9 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,399 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,401 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,405 - ERROR - rmLimits:47 - TEMPERATURE value 10.3 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,407 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,410 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,413 - ERROR - rmLimits:47 - TEMPERATURE value 10.2 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,415 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,417 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,421 - ERROR - rmLimits:47 - TEMPERATURE value 10.2 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,424 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,426 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,430 - ERROR - rmLimits:47 - TEMPERATURE value 10.2 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,435 - ERROR - rmLimits:47 - MINTEMP value 6.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,438 - ERROR - rmLimits:47 - MAXTEMP value 15.0 more than limits maximum of 60, invalidated 2019-06-22 09:26:00,441 - ERROR - rmLimits:47 - WIND value 4.4 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,445 - ERROR - rmLimits:47 - WIND value 4.5 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,449 - ERROR - rmLimits:47 - WIND value 4.5 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,452 - ERROR - rmLimits:47 - WIND value 4.4 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,456 - ERROR - rmLimits:47 - WIND value 4.3 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,459 - ERROR - rmLimits:47 - WIND value 4.3 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,463 - ERROR - rmLimits:47 - WIND value 4.4 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,467 - ERROR - rmLimits:47 - WIND value 4.4 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,470 - ERROR - rmLimits:47 - WIND value 4.5 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,474 - ERROR - rmLimits:47 - WIND value 4.6 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,477 - ERROR - rmLimits:47 - WIND value 4.9 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,481 - ERROR - rmLimits:47 - WIND value 5.2 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,484 - ERROR - rmLimits:47 - WIND value 5.7 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,488 - ERROR - rmLimits:47 - WIND value 5.9 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,491 - ERROR - rmLimits:47 - WIND value 5.8 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,495 - ERROR - rmLimits:47 - WIND value 5.4 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,499 - ERROR - rmLimits:47 - WIND value 5.0 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,502 - ERROR - rmLimits:47 - WIND value 4.6 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,506 - ERROR - rmLimits:47 - WIND value 4.5 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,509 - ERROR - rmLimits:47 - WIND value 4.4 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,513 - ERROR - rmLimits:47 - WIND value 4.5 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,516 - ERROR - rmLimits:47 - WIND value 4.6 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,520 - ERROR - rmLimits:47 - WIND value 4.9 more than limits maximum of 55.55, invalidated 2019-06-22 09:26:00,524 - ERROR - rmLimits:47 - WIND value 5.1 more than limits maximum of 55.55, invalidated
-
I have reported this issue in the "Issues Reporting" section:
-
Hi Richard,
I am trying to use your parser but the Station ID doesn't seem to want to store in the device. Once save is clicked the station ID is cleared.
I note that someone else had a similar problem here:
https://github.com/safepay/rainmachine-willyweather/issues/1?_pjax=%23js-repo-pjax-container
Trying to save the station ID through the app didn't work for me. Any idea of what might be wrong and how to fix it?
Thanks,
Ed
-
Yes it can be a problem. Its not the parser, its the querky RM system. I have no control over how RM saves variable data.
My solution is to use the Defaults option which prepopulates data. Once there is data, you can usually override it with the correct settings.
You may need to do this a few times but it will get there in the end.The other day I was fiddling with the system and accidentally removed my api key and it took me a few goes to gey it back in.
-
Hi Richard,
Thank you for all the hard work you have done, this is really amazing. I just thought I would mention a little hiccup that caught me out that might be worth incorporating into the docs. RainMachine limit request to one every 5min. If you try to refresh more often than this (by clicking "refresh now", you don't see anything in the interface but you do get this message in the logs;
DEBUG - rmParserManager:138 - * Ignored because retry delay 300 (sec) was not reached
This bit me because the first time I ran it, I forgot to tick the "stationLookUp" option so the script ran without a stationID and kept failing with the message;
ERROR - rmParser:133 - HTTP Error 400: Bad Request
For the next 5min it was unable to retrieve the station list due to the silent timeout. I ended up just retrieving the stationID by hand;
https://api.willyweather.com.au/v2/{api-key}/search.json?lat=-35.28&lng=149.13&units=distance:km
Anyway, thanks again,
-
Yes.
The change has made no observable difference to the weather prediction.
But this might help with the observational component which only captures rainfall.
It's hard to test because it just won't rain....
For any RainMachine developers.... I set the timestamp to be the start of the day and keep sending the same time and the total rain for the day. This should mean that the last timestamp for the day should contain the rainfall total for the day.
If there is a better way to do this let me know because,as I stated above, this is hard to test.
-
Hi, I'm trying to run Richard's parser for Willyweather on a Mini 8 with firmware 4.0.999 but I can't get the .py file to load into the Mini 8. I get a message download failed for willyweather.py and the log file says this
<type 'int'=""><type 'str'="">2020-04-08 12:19:07,430 - ERROR - rmParserManager:419 - * Error installing/loading parser user-willyweather.py from file '/rainmachine-app/RMParserFramework/parsers/user-willyweather.py' 2020-04-08 12:19:07,470 - ERROR - rmParserManager:420 - invalid syntax (user-willyweather.py, line 7) Traceback (most recent call last): File "./RMParserFramework/rmParserManager.py", line 382, in installParser File "/rainmachine-app/RMParserFramework/parsers/user-willyweather.py", line 7
I don't know anything about Python so can anyone help please? Has anyone got this to work on a Mini 8? I'm trying to install it using Unbuntu 19.1 Desktop and Firefox -
Hi Richard, I'm confused about the raw format comment. I right clicked on the link and saved as willyweather.py as I would normally do for and download. If I left click, the file "opens" in a new window and I can see a raw button which if I click it opens the .py file in Firefox. I can save it from there as a .py file, but is that correct??
-
So working from your response that Line 7 is a comment line, I opened willyweather.py in Notepad+ then removed all the comment lines at the top and saved it as a txt file out of curiosity. Also booting in and out of Linux is a bit tedious. I was surprised when RM loaded the .txt file in win10 and I was then able to configure the rest of the parser as per your help file. RM says success and there is a graph of Precipitation Forecast in RM from the parser. Tomorrow, I'll edit the .py file and remove the comments and see if it loads in Ubuntu. I'll let you know the result, maybe there is something different either about the firmware or the Mini 8.
-
I rebooted into Ubuntu and successfully loaded your parser as a.py but with all the comment lines at the beginning removed and it works perfectly. Many thanks for your patience and help and I guess we'll just add this to our knowledge base for future reference and put it down to another of life's mysteries. 😊
Regards Collin
-
Paul, yes I have same issue and logged it with Willy weather support a year ago.... still not working for me. I have reached out to their support again. If you manage to figure it out, let me know!
Edit: WillyWeather support got back to me and fixed the problem over a phone call. Hope you got it sorted also.
-
I just signed up here, to just to send a COVID-safe "THANK YOU" to the OP [R.M.] for this parser.
I received my RainMachine Touch HD-12 last week, and then after sourcing a 24VAC 1A power-supply, I set it all up and it was quite easy (I have an I.T. background).
I updated my HD-12 to the latest firmware - v4.0.1134
I am yet to connect any solenoid valves and slowly getting all the necessary irrigation equipment for a small piecemeal garden.
I was disappointed at first, when I saw that my HD-12 could not interpret any weather services, but I remembered the Youtube video review of using RainMachines in Australia.
So, I followed the straight-forward steps at https://github.com/safepay/rainmachine-willyweather , ie.
- getting an API key from WillyWeather,
- uploading the Python file [ willyweather.py ] via the web-interface (accessible by pointing the PC browser to IP address of my HD-12 )
- adding the API key and Station ID, and refreshing.
then, after 5-minutes, I could see immediately the weather data on the screen of my HD-12.
Success.
It was a smooth set up and I think it will work well, as proceed with the multi-zone set up in the next few weeks.
It's my summer project.
___________________________________________________________________________________
I just want to suggest the following point,
since firmware v4.0.1122 (12 JUN 2019, for the HD-12/16,
we can upload the weather parser file [*.py] to the RainMachine, from a Windows OS without any issues.
I just uploaded from a Win10 x64 machine just now, and I've had no issues.
This 'bug' was fixed in firmware v4.0.1122
--> https://support.rainmachine.com/hc/en-us/articles/230344008-Device-Firmware-2nd-gen-2015-and-up-
so, the "Note for Windows Users" at https://github.com/safepay/rainmachine-willyweather/blob/master/README.md can be completely removed now :-)
-
Yes, I can see the Readme.md has been updated. :thumbsup:
Uploads from Windows OS only works, if the RainMachine has been updated to the firmware released on 12 JUN 2019.
If someone tries to upload the .py parser file, before their RainMachine update, then they will learn the hard way !
-
G'dat Richard,
For the last week I've been getting an error when my rainmachine tries to fetch the weather data.
The error in the log is (I've removed my API keys details);
2023-01-15 10:21:00,044 - ERROR - rmParser:138 - *** Error in parser 'Australia WillyWeather' while downloading data from https://api.willyweather.com.au/v2/APIKEYREMOVED/locations/91/weather.json?observational=true&forecasts=weather%2Ctemperature%2Crainfall%2Cwind&days=7&units=speed%3Am%2Fs, error: <urlopen error [Errno 7] No address associated with hostname>
If I copy/past that url in the error log into a browser (with my API key included) it pulls data. Maybe the format has changed?
I've checked my Willy account and the account is still active, credit card details still valid etc.
I haven't changed anything on my side, I just noticed the setup light flashing on the rainmachine.
Thanks
Please sign in to leave a comment.
Comments
33 comments