Unable to change parameter names in custom parser
Hi,
I am developing a parser for the Australian weather service www.willyweather.com.au.
I have the parser working quite well in Pycharm and need to get it working better on RainMachine.
The problem I have is that as I upload new versions to RainMachine, the internal params are not being reflected in the UI and I get errors for missing variables.
Specifically:
params = {
"apiKey": None,
"stationID": None,
"_nearbyStationsIDList": []
}
But the UI says locationID instead of stationID (I could not get any data to save for locationID so I tried changing the name).
Now I cannot get the UI to remove locationID and replace it with stationID when I upload the latest version so I can't test if this change works or not. I have tried disabling/enabling, rebooting, deleting and re-adding but to no avail.
Funnily, apiKey worked fine from the start, so I cannot explain why locationID failed.
Cheers
(P.S. I also have the problem where my parser is "deleted" following a reboot of the HD-12)
-
The params are saved into DB, if you run directly on RainMachine the easiest way to fix would be to press DEFAULTS in web ui to remove them (you'll probably need a defaultParams = {} defined in your parser under your params = {} )
As for the disappearing after reboot, I'm not sure why. I checked and the parsers that I uploaded seems fine. If you give me a URL to your code I can take a look.
-
I think something got stuck in the DB and Defaults doesn't work. One way to deal with this would be to rename parser file name and also the class name. Another option would be to edit the /rainmachine-app/DB/Default/rainmachine-parser.sqlite and remove the parser from it or use Reset To Defaults (and restore from backup afterwards).
Please sign in to leave a comment.
Comments
7 comments