-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[openweathermap] Add JSON channels #15580
Conversation
This adds a channel that allows access to the raw JSON response from the Open Weather Map One Call API. Signed-off-by: Florian Hotze <[email protected]>
This adds another channel to access the raw JSON response from the Open Weather Map Weather and Forecast API. Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
I can understand the use case. On the other hand isn't the http binding allready handling this case? Imho it also feels a bit uncomfortable have bindings that interface/model between external service and openHAB domain, and also expose a full raw json object from the remote service. |
I want to access that JSON and have some information in Items at the same time, so I would need to have both the Open Weather Map and the HTTP binding doing regular requests to the API. I would definitely consider JSON channels as advanced, and as long as nothing like openhab/openhab-core#3597 is available, they IMO are the only comfortable way to deal with large data sets. |
Yes, let’s close it. |
This adds string channels for both for the "Weather and Forecast" and the "One Call" APIs to allow access to the raw JSON responses.
This is especially useful from JS Scripting, where you can parse that JSON and then perform operations on it as on any other JS object, which is much more straighforward than reading the state of 1000 Items.