homebridge-weather-plus: OpenWeatherMap always shows 'Invalid API key'
Just installed Homebridge on a new Raspberry Pi 4 B. Everything is up2date. I installed and configured homebridge-weather-plus as described in the doc. But I cannot get a connection to OpenWeatherMap (Free). I tried a lot different configurations but none worked for me. Here is my example now (very dumped down, disabled all there is to disable, hidden everything there is to hide).
{
"units": "si",
"interval": 60,
"stations": [
{
"nameNow": "Dahoam",
"service": "openweathermap",
"key": "MyApiKey", // also tried adding a new one, didn't work
"locationCity": "Munich", // also tried "Munich, DE", also tried long/lat
"language": "de",
"compatibility": "home", // also tried Apple Home /w Eve
"conditionCategory": "simple",
"now": false,
"extraHumidity": false,
"hidden": [
"Air Pressure",
"Cloud Cover",
"Condition",
"Condition Category",
"Dew Point",
"Forecast Day",
"Humidity",
"Observation Station",
"Observation Time",
"Ozone",
"Rain",
"Rain 1h",
"Rain Day",
"Rain Chance",
"Snow",
"Solar Radiation",
"Sunrise Time",
"Sunset Time",
"Temperature Min",
"Temperature Apparent",
"UV Index",
"Visibility",
"Wind Direction",
"Wind Speed",
"Wind Speed Max"
]
}
],
"platform": "WeatherPlus"
}
Also used the example config: https://github.com/naofireblade/homebridge-weather-plus#example (with OWM)
Did I miss something?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22 (4 by maintainers)
I would say, in conclusion: Dark Sky is closed, Weather Underground only for those lucky enough to maintain their own weather station, and OpenWeather no longer works due to API snafu. For all intents and purposes this wonderful Weather Plus plugin for Homebridge does not work anymore đŚ
Unless anyone has any other explanation or solution, which Iâm really hoping for. I do not care to subscribe to the new One Call API 3.0, even though itâs supposedly free, it still requires payment information.
Think I got this working by editing the api file for openweathermap. On my pi this file is located at
/var/lib/homebridge/node_modules/homebridge-weather-plus/apis/openweathermap.js
yours may differ depending on your homebridge set up/system.
I edited line 70 (may differ depending on platform) and swapped the 2.5 to 3.0 and my API key then worked. Since iOS16 the data doesnât show very well so best to configure this as an eve accessory and add it there for any automations etc so you can get the full data out of the accessory that is added. Hope this helps!
The first 1000 calls per day are free: https://openweathermap.org/price
Which imho perfectly covers personal usage like for this plugin: You can query the API every 5 minutes and would only get 288 calls per day (60/5*24)
Fixed in v3.2.7
You are absolutely right - thank you! This fix has resolved the issue and now the plugin is working again. Itâs a shame that Apple broke displaying this type of data in iOS16, but the sensors are there and automation can be set up.
By the way, the lines are different in the Synology HB version, but just look for â2.5â (without quotes).