OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OSPI version 2.1.3 using Wunderground Personal Weather Station error

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #34516

    bobby2
    Participant

    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?

    Thanks.

    plugins loaded:
    mobile_app
    monthly_adj
    relay
    weather_adj
    weather_level_adj
    Starting timing loop

    http://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’

    #34518

    Samer
    Keymaster

    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.

    #34658

    bobby2
    Participant

    Thanks for your response.  I will appreciate it whenever you do get a chance to fix the plugin.

    #34693

    Samer
    Keymaster

    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.

    #34719

    bobby2
    Participant

    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.

    #34720

    Samer
    Keymaster

    That’s correct, you need to prefix the station ID with: “pws:” (without the quotes).

Viewing 6 posts - 1 through 6 (of 6 total)
  • 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