04/21/2019 at 01:16 •
With the demise of the Wunderground API as a free service I have converted my program to use other services for the current and forecast rainfall. This functionality has been broken out into separate modules, so it should be fairly easy to replace these with services of your choice.
Another key improvement has been the addition of retry with back-off functionality to HTTP requests to deal with the un-reliability of HTTP requests and servers, this maximises the chance of getting valid readings.
Connecting to WiFi has also been a problem occasionally and this is now handled by retry functionality, with the device going into deep sleep between tries to conserve the battery.
The system has performed well over this summer with very few missing readings due to errors and should be even better next summer with WiFi retry in place.
04/06/2018 at 07:23 •
Currently the program has very simplistic error handling which makes sure the system is left in an 'on' state and goes back to sleep if any error occurs.
I am suspicious that the Wunderground API might be the source of some errors and have written a Python test program on my Raspberry Pi to call the API and record any errors that occur. Results from this can then be used to improve error handling, perhaps by querying an alternate PWS if the primary returns an error.