-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Problem with the connection to Netatmo API since 2023-12-04 #77
Comments
I think we are facing another API issue. Contacted Netatmo support and still waiting for feedback. |
I have the same. The workaround here does not work on my side. |
anyone using api in two places at once like me? homebridge-eveatmo + node-red-contrib-netatmo-dashboard? |
I reset keys, deleted netatmo-token.json, generated a new access token with full r/w/a rights for all device types, put new client id, secret and refresh token into plugin settings and everything works again. |
Yes, I am also using both: node-red and homebridge-eveatmo. :) |
Have you tested a restart of the bridge? Is it solved permanently after creating the new tokens? @skrollme I think there are adjustments required on the plugin if Netatmo changed their Auth method again... :( |
after full HB restart i have a problem again ((( |
Yep, Is expected... :( |
Info from Netatmo DEV Support:
|
By the way i make additional "application" in dev.netatmo for NR.. Waiting for fix. |
Unless the 2 systems don't share the same json file with the tokens |
they're two different systems. |
yes, but there are many ways to share a file between 2 different systems (provided they are using the same Netatmo account) |
It won't work. |
You need to save the file at each request, and to keep the json file synchronized between the 2 systems |
What's the point? I added a second app and have a couple of tokens that i can use at the frequency i need. |
Good, no point. But you said before you said that "one token will not work in two systems " and that's not true. Ok. |
you are right, maybe it will work only in one case - when systems are unity and request data with the same frequency, but I have homebridge for homekit and node-red for export to influx then grafana. |
Additional info from Netatmo:
|
On my Netatmo app on my iPhone, I need to re-connect each time i use the app (I guess after the famous 3 hours) |
I'm guessing it's not Netatmo's idea, but the very important Jedi Legrand engineers. :-) |
I don't recognize this till now...... Maybe later..... |
Yeah you're probably right :-D |
Another update from Netatmo.
I requested detailed information when the next change will take place. |
Well, it doesn't work for me |
same problem... |
Please try the following:
This should actually work. |
I just created a new refresh token on dev.netatmo.com, and copied/pasted in Homebridge Eveatmo plugin in the settings, and voila, working again 😉
[07/12/2023, 18:29:53] [eveatmo platform] Initializing eveatmo platform...
[07/12/2023, 18:29:53] [eveatmo platform] Authenticating using 'refresh_token' grant
[07/12/2023, 18:29:57] [eveatmo platform] Loading new data from API for: weatherstation
[07/12/2023, 18:29:57] Loading 3 accessories...
…________________________________
Van: Johannes Strasser ***@***.***>
Verzonden: donderdag 7 december 2023 18:21
Aan: skrollme/homebridge-eveatmo ***@***.***>
CC: Tebogo ***@***.***>; Comment ***@***.***>
Onderwerp: Re: [skrollme/homebridge-eveatmo] Problem with the connection to Netatmo API since 2023-12-04 (Issue #77)
@Mindphazer73<https://github.com/Mindphazer73> & @Pajonk100<https://github.com/Pajonk100>
Please try the following:
1. Create a new Access and Refresh token with Postman
2. Manually enter both tokens into the netatmo-token.json file
3. Enter the same Refresh token into the config.json of Homebridge
4. Restart Homebridge service
This should actually work.
—
Reply to this email directly, view it on GitHub<#77 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACH4FIROVQOQZEQHRT562LDYIH3K7AVCNFSM6AAAAABAGOL7BOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBVG43TENBTGI>.
You are receiving this because you commented.Message ID: ***@***.***>
|
problem was in netatmo-token.json - old tokens before my testing what was wrong... Now its working :) thx :D |
all Hombridge or plugin Bridge only? |
In my case it was always enough to delete netatmo-token.json and put a new refresh token in plugin config |
Thanks |
Only for the eveatmo plugin and a restart of the Homebridge service.
Should also work if the plugin is able to create it again. I ran into an issue in the past, that's the reason why I suggested to replace the keys. ;) I hope @skrollme can create a fix until Netatmo redo the change on their platform. |
A couple of days ago it stopped working after a full restart of homebridge. Since I'm already tired of generating tokens, I'm not touching or restarting anything yet. |
Yes, I had the same behavior after a Homebridge restart. If the bridge is not restarted, everything should continue to run, also if Netatmo will redo the change. The sticking point was the creation of new keys when the bridge restarts I think. So the goal should be to make it persistent again. |
Is this still an open case, @jostrasser ? |
Hey @skrollme , They have planned to enable the new auth method again (May 29th 2024) but I don't know if the current implantation is working afterwards. I hope so ;) General: If the API is inaccessible the plugin won't start / is hanging at "Starting". It would be cool if you can add a timeout with a following retry (every 5mins) until the API comes back online. This would keep Homebridge up and running even if the API is not working correctly. Thanks! ADD: INFOMAIL FROM NETATMO Today, when you refresh an Access Token using the associated endpoint https://api.netatmo.com/oauth2/token, the Netatmo servers respond with a pair of tokens: an Access Token and a Refresh Token. If the previous Access Token is still valid, the newly returned access token is identical but has an expiration time extended by 3 hours. The Refresh Token is not renewed. Starting May 29, 2024, this behavior will change to comply with the OAuth2 Authorization Framework RFC recommendations (section 10.4) and improve the security of our users' data. When refreshing the tokens, the Access Token and Refresh Token will be different from the previous ones and the old tokens will be invalidated. What does this mean for you? If you already store the tokens returned by the API when refreshing your tokens, this change will not affect you. If you do not update the tokens when refreshing them, your users will be logged out because the old tokens will be invalidated. If for a given user, you have stored the same token in different places (for example: an application and its widget), you must have a way to synchronize them because the new token will be applied for the entire application. |
Correct, I think this is the main problem here.
I'm not sure if the plugin's overall architecture supports this kind of approach. This would also be tricky to stage this environment/situation for testing purposes 🤔 |
Understood. If there is no way to workaround a hanging startup of Homebridge if the API is down we only can disable the plugin until the API is back to get Homebridge back online (or we have to wait for the API). For me it's okay because I am backing up my HomeKit telemetry and can easily restore it even I loose the room assignments of the sensors. (can be done with the "Controller for HomeKit" app) If you are planning to overwork the plugin: please keep this in mind as a feature request please 😉 Thank you! |
Describe the bug
Homebridge unable to start, plugin is preventing start because there are API issues with the Netatmo API.
Version you use
To Reproduce
Restart homebridge service
The text was updated successfully, but these errors were encountered: