November 8, 2014 at 2:26 am #34516
When manually starting ospi.py from the command line, I noticed that it wasn’t using the Wunderground personal weather station I had configured it to use. Instead, an error appeared (see below). Does 2.1.3 support using a personal weather station or should I configure it by zip code?
Starting timing loop
Monthly Adjust: Setting water level to 100%
Checking rain status…
Unhandled exception in thread started by <function weather_to_delay at 0xe52e70>
Traceback (most recent call last):
File “/home/pi/OSPi/plugins/weather_adj.py”, line 35, in weather_to_delay
weather = get_weather_data() if data[‘weather_provider’] == “yahoo” else get_wunderground_weather_data()
File “/home/pi/OSPi/plugins/weather_adj.py”, line 103, in get_wunderground_weather_data
lid = get_wunderground_lid()
File “/home/pi/OSPi/plugins/weather_adj.py”, line 72, in get_wunderground_lid
lid = “zmw:” + data[‘RESULTS’][‘zmw’]
KeyError: ‘zmw’November 8, 2014 at 9:52 am #34518
The error you are getting is due to a plugin not handling PWS correctly. For now, you may use a zipcode until the plugin has been updated or you may disable the plugin by changing the file permissions in the /plugin directory of OSPi for the weather_adj plugin.
I will see if I have a chance to take a look and fix the plugin since I authored the first version of it, not sure when I will get to this though.November 13, 2014 at 4:56 pm #34658
Thanks for your response. I will appreciate it whenever you do get a chance to fix the plugin.November 16, 2014 at 10:50 am #34693
I was looking into this and it turns out I do support personal weather stations in my plugin. Are you using the following syntax: pws:KTXSANAN80? The key being the pws: prefix to the ID.
Also, when using a personal weather station, make sure the plugin has an API key.November 16, 2014 at 10:59 pm #34719
No, I did not. I simply typed in the weather station code and clicked Lookup on the mobile app. The location correctly populated with the weather station’s information and turned green. So, I clicked Submit and thought everything was correctly configured. Are you saying that I need to type in pws: before the weather station code in the location box like your example for it to work? (Yes, I do have an API key for Wunderground.) Thanks for taking a look at the plugin.November 16, 2014 at 11:00 pm #34720
That’s correct, you need to prefix the station ID with: “pws:” (without the quotes).
- You must be logged in to reply to this topic.