OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPI version 2.1.3 using Wunderground Personal Weather Station error
- This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by Samer.
-
AuthorPosts
-
November 8, 2014 at 2:26 am #34516
bobby2ParticipantWhen 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?
Thanks.
plugins loaded:
mobile_app
monthly_adj
relay
weather_adj
weather_level_adj
Starting timing loophttp://0.0.0.0:8080/
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’][0][‘zmw’]
KeyError: ‘zmw’November 8, 2014 at 9:52 am #34518
SamerKeymasterThe 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
bobby2ParticipantThanks 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
SamerKeymasterI 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
bobby2ParticipantNo, 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
SamerKeymasterThat’s correct, you need to prefix the station ID with: “pws:” (without the quotes).
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPI version 2.1.3 using Wunderground Personal Weather Station error