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] Add support for favorite stations #8020

Closed
Crazyphil opened this issue Jun 27, 2020 · 7 comments
Closed

[netatmo] Add support for favorite stations #8020

Crazyphil opened this issue Jun 27, 2020 · 7 comments
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@Crazyphil
Copy link

Since pull request #7912 updated the netatmo-swagger-decl reference a few days ago, it is now also possible to request a user's favorite weather stations in addition to their own. This is useful for example when a user doesn't own a Netatmo device, but they want to read outdoor temperatures and get weather data from their neighborhood.

The required change is simple: In class NetAtmoBridgeHandler, method getStationsDataBody(String), change the line

NAStationDataBody data = getStationApi().getstationsdata(equipmentId).getBody();

to

NAStationDataBody data = getStationApi().getstationsdata(equipmentId, true).getBody();

(i.e. set the parameter getFavorites of the method call to getstationsdata(String, Boolean) to true.

@Crazyphil Crazyphil added the enhancement An enhancement or new feature for an existing add-on label Jun 27, 2020
@lolodomo
Copy link
Contributor

lolodomo commented Jun 27, 2020

Interesting. Will you provide a PR ?

@lolodomo
Copy link
Contributor

lolodomo commented Jul 4, 2020

This silence probably means you will not.

I will try in this case.
This might be just a false to replace by a true in the code.

@lolodomo
Copy link
Contributor

lolodomo commented Jul 5, 2020

It works. We just have to find an appropriate naming for the discovered things (stations and modules) to avoid confusion between the local weather station and the favorite weather stations.

@Novanic
Copy link
Contributor

Novanic commented Jul 14, 2020

@lolodomo Are still working on it? Otherwise I would suggest that I add the station_name to the thing name and something like "(fav)" as you suggested. Would that be good enough to merge it to 2.5.7 or later?

It seems that the station name contains the city of the station when the user hasn't setup a station name, that could help some users to identify/differ the stations. I requested also that the street name should be available via the Netatmo forum but I don't know if and when it will be available... The street name seems to be the best / one and only criteria to differ the stations it is also used at the weathermap.

@lolodomo
Copy link
Contributor

I let you finish the enhancement, you were the first to propose a PR.
I let you propose the best solution you can find for the naming of the discovered stations and modules in the inbox. I can confirm that when I tried, the favorite station I selected has the name of the city in the API.
I disagree with you with the need of a configuration setting. On that point, I would like @clinique 's advice to converge to the best solution. In my opinion, I see no problem to have favorite stations being systematically discovered by the binding and put in the inbox. Then the user can ignore them. But maybe I am wrong.
This will be a small enhancement, so you can certainly expect a fast feedback from myslef and @clinique and very probably a fast merge.
I have no idea when 2.5.7 will be released.

@clinique
Copy link
Contributor

I join you @lolodomo , adding favorite stations on Netatmo website is already a deliberate action, so no need of a dedicated option FMPOV

@Novanic
Copy link
Contributor

Novanic commented Jul 15, 2020

The pull-request is now updated. The naming logic was extended and the dedicated option is removed again.

See #8112 (comment)

CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
Signed-off-by: CSchlipp <christian@schlipp.de>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this issue Aug 3, 2020
Closes openhab#8020
Closes openhab#8111

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
Signed-off-by: MPH80 <michael@hazelden.me>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
Closes openhab#8020 
Closes openhab#8111 

Signed-off-by: Sven Strohschein <sven.strohschein@gmail.com>
@clinique clinique linked a pull request Jun 11, 2021 that will close this issue
7 tasks
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

No branches or pull requests

4 participants