-
-
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
Getting authentication error #72
Comments
Sorry for the late response, @hansw1204 . Did you find a solution for your problem? If not, can you paste the part of your homebridge-eveatmo plugin - except the secrets of course :D |
Hello,
I have not been able to get it to work again. It just stopped working one day. I recreated new IDs and tokens on the Netatmo dev site but to no avail.
Here are the settings
{
"name": "eveatmo platform",
"ttl": 450,
"extra_co2_sensor": false,
"weatherstation": true,
"airquality": false,
"co2_alert_threshold": 1000,
"module_suffix": "WS",
"log_info_msg": true,
"auth": {
"client_id": "XXXXXXXXXXXX",
"client_secret": "XXXXXXX",
"refresh_token": "04ea3114927dcad7d4f941e83af884a6"
},
"_bridge": {
"username": "0E:EF:B4:D4:8C:E3",
"port": 56182
},
"platform": "eveatmo"
}
Many thanks for any help.
Hans
From: Sebastian K ***@***.***>
Reply-To: skrollme/homebridge-eveatmo ***@***.***>
Date: Tuesday, February 21, 2023 at 14:47
To: skrollme/homebridge-eveatmo ***@***.***>
Cc: Hans Winkler ***@***.***>, Mention ***@***.***>
Subject: Re: [skrollme/homebridge-eveatmo] Getting authentication error (Issue #72)
Sorry for the late response, @hansw1204 . Did you find a solution for your problem? If not, can you paste the part of your homebridge-eveatmo plugin - except the secrets of course :D
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
If the credentials were valid when you tried to connect, the error makes no sense to me. My only advice left would be to delete the app your created at dev.netatmo.com and create a new one (with all possible permissions). |
Thanks, I’ll try that
From: Sebastian K ***@***.***>
Reply-To: skrollme/homebridge-eveatmo ***@***.***>
Date: Wednesday, February 22, 2023 at 09:55
To: skrollme/homebridge-eveatmo ***@***.***>
Cc: Hans Winkler ***@***.***>, Mention ***@***.***>
Subject: Re: [skrollme/homebridge-eveatmo] Getting authentication error (Issue #72)
If the credentials were valid when you tried to connect, the error makes no sense to me. My only advice left would be to delete the app your created at dev.netatmo.com and create a new one (with all possible permissions).
Then use the new client_id and client_secret, generate a new refresh_token in the app-panel at dev.netatmo.com and use these three values in your homebridge config
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I created a new app with new credentials but still get the same issue. I can access through Netatmo web, the Netatmo iOS app and via Home Assistant. Just the HomeBridge plugin does not work anymore.
From: Sebastian K ***@***.***>
Reply-To: skrollme/homebridge-eveatmo ***@***.***>
Date: Wednesday, February 22, 2023 at 09:55
To: skrollme/homebridge-eveatmo ***@***.***>
Cc: Hans Winkler ***@***.***>, Mention ***@***.***>
Subject: Re: [skrollme/homebridge-eveatmo] Getting authentication error (Issue #72)
If the credentials were valid when you tried to connect, the error makes no sense to me. My only advice left would be to delete the app your created at dev.netatmo.com and create a new one (with all possible permissions).
Then use the new client_id and client_secret, generate a new refresh_token in the app-panel at dev.netatmo.com and use these three values in your homebridge config
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I am seeing the same thing: [2/24/2023, 1:48:28 PM] [eveatmo platform] Restarting child bridge... I have reset my keys and created a new refresh token. System Info: JSON stuff |
Same here. I‘m confused by the „invalid grant“. I selected all scopes available for the token generator at https://dev.netatmo.com/. The error stays the same. |
I received this yesterday. The pain is just beginning. ;) Any changes that need to be made should include whatever it is they're talking about. I'm no coder (at least not "modern" languages. Got COBOL??), or I'd take a swipe at it. Dear Netatmo developer,As of today, when you refresh an Access Token using the associated endpoint https://api.netatmo.com/oauth2/token, Netatmo servers respond with a couple 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 its expiration time is extended for 3 hours.In any case, the refresh token is not renewed. |
Hello, thanks for the update, but didn't solve the problem with authenticate token. [08/03/2023, 20:22:33] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant What could be wrong? Thanks! |
I just released an updated which refreshes the token a little bit earlier (5more mins earlier, before they expire). Although it does not seem to be connected to your problem, it might may be worth a try. |
Thank for the update, but unfortunately there is no change. I retrieved a new Refresh Token, updated the HB plugin settings, and got the very same error. |
Same problem here, even after update, Homebridge v1.6.0 |
I did the update about 18 hours ago. I had to reset it as a child process. It's been doing a measurement get around every 9-10 minutes with no failures. Data is current with the Netamo app. I will be cautiously optimistic and declare "victory"! Thank you for your efforts!!! Eveatmo 1.1.0 |
Lucky you. Do you use the plugin as a child process?
From my point of view: a limited victory so far. Had to disable the plugin for now. |
I noticed some reporting issues have Node.js as Version 18.15.x Mine is Version v18.14.2. The instructions call for updating the entire image.I use Watchtower, and it waits until the new container appears on the Docker hub. Not a bad thing all the time, but it might be significant. Again, not a coder. Just a vintage IT guy experienced in change management. :) |
Also, this retrieval method is working in Node-Red. That's all JSON, but I think the platform is Node.js. I don't know what version. My engine is the Home Assistant add-on. |
Hi @mdisabato, referring to your success: Afterwards you copy/paste the new refresh token into the homebridge plugin, and that‘s it? Thanks in advance.
|
Yes. That is exactly what I did. I limited the scope to reading the weather station. I do not have any extra modules other than the rain gauge and anemometer. This also worked for the Node-Red Netamo modules and in Home Assistant. At least it did as of yesterday (17 March). I will check over the weekend to see if the changes spelled out in the Netatmo email altered the behavior any. |
I tried as instructed, and limited the scope as you did - but still no success.
|
Have you tried creating an app at dev.netatmo.com with all(!) scopes? I know, this shouldn't be necessary, but maybe try this just for testing purposes and delete the app afterwards if this doesn't do the trick? |
yes, this was one of my attempts: added all scopes, and retrieved a new refresh token. Just to mention again: My „Node.js Version: v18.15.0". Are there reliable infos, that this may cause the trouble?
|
I've just joined the "not working" group. No changes were made. It just stopped working. |
It‘s a pity…
Just to mention: |
I have the exact same experience. Works fine in HA but not HomeBridge
From: Bernd Peeters ***@***.***>
Reply-To: skrollme/homebridge-eveatmo ***@***.***>
Date: Tuesday, March 21, 2023 at 09:07
To: skrollme/homebridge-eveatmo ***@***.***>
Cc: Hans Winkler ***@***.***>, Mention ***@***.***>
Subject: Re: [skrollme/homebridge-eveatmo] Getting authentication error (Issue #72)
It‘s a pity…
I've just joined the "not working" group. No changes were made. It just stopped working.
Just to mention:
I set up a Home Assistant server for checking it out. There is a service included to retrieve data from Netatmo. This works based on a wizard: log in to Netatmo, grant access, confirm and done. No idea about the underlying implementation, but for sure it is token based.
This way works fine: The HA dashboard shows the correct data of all of my Netatmo devices in a correct and regularly updated way.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
That is also what I did. There are no issues collecting data through Home Assistant. Also, I tried the Node-Red Netamo plugin, and that works. |
I'm sorry to hear all your reports. Unfortunately I'm a little bit helpless here since I cannot reproduce this issue. I already tried different node-versions (14, 18) but it is just working for me. I also tried to create a new app a dev.netatmo.com with a smaller permission-scope, also no problems in my setup, which is by the way this: raspberry Pi 2, self-build Docker image run in a docker-compose setup |
Hi @skrollme, sorry to bother you and great to hear about your attempts. Can you imagine to add some logging code, which would dump out the response data in our setups to get closer to the issue? At least, I would offer to run a debug version of your plugin in my setup, and return the output to you for checking.
|
I will try to prepare a debug-version version and let you know. Thanks for the offer, @therealScarabeus |
I found today that I also had the same errors. |
Same problem on my Homebridge Installation. HomeAssistant connects to Netatmo without errors...
|
smacks forehead Debug, of course. I'll do a capture today, time permitting. Thank you for the suggestion. :) |
I tried again after updating the RPi4 OS with no success. Then I removed the refresh token and went with id/password. That is working after about 45 mins. It's done several successful "timed refreshes". Rather than try to find a non-reproducible problem, I would suggest you update the docs and tell folks if one method fails, try the other. Thank you all for your help. |
Good point, @mdisabato I updated the readme from "does not work anymore" to "recommended not to use anymore". Although the old mechanism is still usable but there is no guarantee that Netatmo will keep up the support here. https://github.com/skrollme/homebridge-eveatmo/blob/master/README.md#rotating_light-warning |
I was having this issue as well, it struck me as odd that were not storing the bearer token so I don't know if your mechanism to obtain it is not working, but it seems there is a bearer and refresh misalignment. A temp fix for me:
|
I started all over. Logout from all Netatmo sites, plugins etc.
Hope this helps solving the problem.. |
I had this right now. I generated a new token and discovered, the "netatmo-token.json" is not updated and the keys in it were the old ones. I deleted the "netatmo-token.json" and after a restart everything is fine again. |
I tried that, removed the netatmo-token.json, restarted homebride, but after a few hours the same issue.. |
More fun and games... I started from scratch and made sure there were no left-over artifacts from removing the plugin. The refresh token does not work for me from the start. Password authentication works. However, there are random times when I get authentication errors: [4/14/2023, 11:06:59 AM] [eveatmo platform] Loading new data from API for: weatherstation Note that one of them included an expired token. Then it starts up and works normally. I have a theory: I am also accessing the API from Home Assistant, Node-RED, the Netatmo app, and the Myatmo app. The errors might be occurring if all that hits the API within the time limit set by Netatmo. I've set Eveatmo TTL to 555 just to get off the 9 minute cycle. The others are fixed. Like I said, theory. |
I do found out that after a restart of Homebridge the Evatmo Plugin works perfectly for exactly three hours and 1 second: [17/04/2023, 07:22:50] [HB Supervisor] Restarting Homebridge... |
Having the exact same issue. Plugin stopped working all of a sudden and can't get it back up either. See above for the same error codes. |
Exact same issue here. Using Node.js Version | v16.19.1 Does that make a difference? Node.js Version v16.19.1 |
Solved! After removing totally this plugin, restart homebride, recreate the token at dev.netatmo.com, reinstall this plugin-in in homebridge, configure the plugin with the settings and tokens. Restart Homebridge! Homebridge 1.6.1 Thanks! |
Not solved for me. Still not working. |
For the token I only use the weather station now. Before I also used the thermostat. Maybe that solved it for me. |
I only use the weather station, don’t have a thermostat. But it still prevents Homebridge from starting.
… On Jun 26, 2023, at 20:02, Tebogo ***@***.***> wrote:
For the token I only use the weather station now. Before I also used the thermostat.
Maybe that solved it for me.
—
Reply to this email directly, view it on GitHub <#72 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A7MG4KSP4R2JLNN225YNCCTXNHFDBANCNFSM6AAAAAAUYB4ZDU>.
You are receiving this because you commented.
|
I am also getting this error, if I disable literally every component of it from the settings in starts without warning but that would be expected. |
Any news on that? I'm waiting for the good news. |
I'm not sure what to investigate here, to be honest. I do not have frequent authentication-errors in my setup. But even then, my instance (homebridge 1.7.0 running with node v20.9.0 on Synology DSM) does not crash, freeze or anything else. There are several month between restarts of my homebridge and even these are mostly because of other plugins.
It is also possible that there was a problem with writing/storing the tokens to the netatmo-token.json , so always ensure, that the file is writable. |
Netatmo has changed the updating process of the refresh_token. |
You are my hero! After hours of searching and trying, this was the solution. I just added the new token to the “netatmo-token.json” file, saved it and it has been working again for two days. |
Eveatmo is not starting. I have recreated refresh token but no luck. Still getting this error in the HB log:
[2/10/2023, 12:35:29 PM] Registering platform 'homebridge-eveatmo.eveatmo'
[2/10/2023, 12:35:29 PM] [eveatmo platform] Loaded homebridge-eveatmo v1.0.1 child bridge successfully
[2/10/2023, 12:35:29 PM] Loaded 0 cached accessories from cachedAccessories.0EEFB4D48CE3.
[2/10/2023, 12:35:31 PM] [eveatmo platform] Loading new data from API for: weatherstation
[2/10/2023, 12:35:31 PM] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant
[2/10/2023, 12:35:31 PM] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token
[2/10/2023, 12:35:49 PM] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info.
The text was updated successfully, but these errors were encountered: