HomeAutomationForGeeks / openhab-controlpanel

Simple dashboard using the OpenHAB REST services
MIT License
46 stars 10 forks source link

Weather not working #1

Closed MACscr closed 9 years ago

MACscr commented 9 years ago

I have a valid api key, ive tried your test Station ID and my own station ID, but i still only get back the following responses:

{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "conditions": 1
  }
        ,
    "error": {
        "type": "querynotfound"
        ,"description": "No cities match your search query"
    }
    }
}
);```

from either of the json api files
HomeAutomationForGeeks commented 9 years ago

Depending on what you're querying on Weather Underground you need a different prefix. For example if you're querying a weather station, the prefix is "pws".

Try this URL where you only replace "APIKEY":

http://api.wunderground.com/api/APIKEY/conditions/q/pws:KNYNEWYO118.json

MACscr commented 9 years ago

The weather station id didn't work, i ended up having to use: http://api.wunderground.com/api/XXXXXXXXX/conditions/q/zmw:61601.1.99999.json

HomeAutomationForGeeks commented 9 years ago

Odd. Maybe some stations aren't directly available via public API? I added some explanation to the readme about the pws prefix.

I'll close this issue now as it seems to be a Weather Underground peculiarity rather than an issue with the dashboard.