Skip to content
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

[netatmo] Requesting favorite stations only when needed #12769

Closed
lolodomo opened this issue May 20, 2022 · 4 comments · Fixed by #12777
Closed

[netatmo] Requesting favorite stations only when needed #12769

lolodomo opened this issue May 20, 2022 · 4 comments · Fixed by #12777
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@lolodomo
Copy link
Contributor

lolodomo commented May 20, 2022

I have not enabled favorite stations:
image

But the binding requests favorite data anyway:

15:04:30.993 [TRACE] [tmo.internal.handler.ApiBridgeHandler] - executeUri GET  https://api.netatmo.com/api/getstationsdata?device_id=xxx&get_favorites=true

This is probably triggered at this line with the second parameter set to true:
/~https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/WeatherApi.java#L66

It could (should) be optimized to use false when getStationData is called for your local weather station.

@clinique : WDYT ?

@lolodomo lolodomo added the bug An unexpected problem or unintended behavior of an add-on label May 20, 2022
@lolodomo
Copy link
Contributor Author

I think I know how to enhance that, I will submit a PR after testing.

@lolodomo lolodomo added enhancement An enhancement or new feature for an existing add-on and removed bug An unexpected problem or unintended behavior of an add-on labels May 21, 2022
@lolodomo lolodomo changed the title [netatmo] Requesting favorite stations even when not needed [netatmo] Requesting favorite stations only when needed May 21, 2022
@clinique
Copy link
Contributor

You're welcome, I've got many plates on the fire :)

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue May 21, 2022
Fix openhab#12769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@jlaur
Copy link
Contributor

jlaur commented May 21, 2022

@lolodomo - can you remind me how to access binding configuration from MainUI when installed as JAR?

@lolodomo
Copy link
Contributor Author

lolodomo commented May 21, 2022

You click "+" to add new thing and then in the "Choose binding" you have a special icon on "Netatmo Binding" to access its configuration.

PS: look at my other issue, any change is taken into acocunt only after a restart.

jlaur pushed a commit that referenced this issue May 22, 2022
* [netatmo] Avoid requesting favorite stations when not needed
* Add new method getFavoriteAndGuestStationsData
* Enhanced description for method getOwnedStationData
* getFavoriteAndGuestStationsData returns a collection of NAMain

Fix #12769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
…#12777)

* [netatmo] Avoid requesting favorite stations when not needed
* Add new method getFavoriteAndGuestStationsData
* Enhanced description for method getOwnedStationData
* getFavoriteAndGuestStationsData returns a collection of NAMain

Fix openhab#12769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 12, 2022
…#12777)

* [netatmo] Avoid requesting favorite stations when not needed
* Add new method getFavoriteAndGuestStationsData
* Enhanced description for method getOwnedStationData
* getFavoriteAndGuestStationsData returns a collection of NAMain

Fix openhab#12769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
…#12777)

* [netatmo] Avoid requesting favorite stations when not needed
* Add new method getFavoriteAndGuestStationsData
* Enhanced description for method getOwnedStationData
* getFavoriteAndGuestStationsData returns a collection of NAMain

Fix openhab#12769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants