Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[weather] Fix OpenWeather API key failure by removing FORECAST #5838

Closed
wants to merge 3 commits into from

Conversation

ptrooms
Copy link

@ptrooms ptrooms commented Mar 21, 2019

Yahoo stopped the functionality for openHAB, we switched to OpenWeather which generated an other issue.
Why:

  • OpenWeather discontinued the 5-day FORECAST included in their Free Plan which now generate an API-key error message in the openhab.log as the Weather bundle, unconditionally calls for FORECAST in succession to the default (actual) Weatherstatus.

For OpenWeather information reasons, pulling FORECAST from FreePlan, read thread 17136552

This change addresses the need by:

Fixes #5837

Why:
* OpenWeather discontinued the FreePlan for FORECAST which now generates an API-key error as forecast is implicitly part of binding.
This Fix will remove the FORECAST call and option by simply returning nulll for the FORECASY url.

This change addresses the need by:
* return null in the FORECAST call

Signed-off-by: PtrO <[email protected]>
Copy link
Contributor

@9037568 9037568 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine.

Please also update the README to reflect this change. Specifically, the section on Forecasts.

@9037568 9037568 changed the title [weather] Fix #5837 OpenWeather API key failure by removing FORECAST [weather] Fix OpenWeather API key failure by removing FORECAST Mar 22, 2019
… paid key) is only queried if using apikey2 in weather.config.

Note: apikey2 is also forcily made "absent" when specified als apikey2=null (exact string).
This as solely removing the apikey2 from the weather.cfg file will not remove the value from cached settings.

To summarize:
if one has obtained a Forecast validated key from OpenWeather, specify this key in config apikey2=<key-value>
Incase one has only the Freeplan, do not specify apikey2 or code it als apikey2=null, to skip forecasts.

Signed-off-by: PtrO <[email protected]>
@ptrooms
Copy link
Author

ptrooms commented Mar 23, 2019

Please help/assist

Hi, I'm a bit lost and overwhelmed in the system of all GIT procedures to follow......
my "git"-branch is now updated on file READ.md and code-wise I've improved my solution-proposal that allows FORECAST for OpenWeatherMAP, if one specify "apikey2" in the weather.cfg.
This will solve by default the API key failure and continu to allow for FORECAST queries in case persons have a paid plan (and then thus would have to specify apikey2).

What's the next step to do, if any ? ....... I've update my sources, push them to my remote-fork in branch 5837 ....... now what ? Let me know if I've missed something.

TIA
Peter

Base automatically changed from master to main January 18, 2021 20:08
@kaikreuzer kaikreuzer closed this May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[weather] OpenWeatherMap API key failure due to discontinuation of FORECAST on the free plan
3 participants