homebridge-eveatmo
homebridge-eveatmo copied to clipboard
Getting authentication error
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.
- homebridge version: 1.6.0
- node version: 18.12.1
- plugin version: 1.0.1
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). 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
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... [2/24/2023, 1:48:28 PM] Got SIGTERM, shutting down child bridge process... [2/24/2023, 1:48:33 PM] [eveatmo platform] Child bridge process ended [2/24/2023, 1:48:33 PM] [eveatmo platform] Process Ended. Code: 143, Signal: null [2/24/2023, 1:48:35 PM] [UPS] UPS Battery: Remaining Duration: get: return 0 seconds [2/24/2023, 1:48:40 PM] [eveatmo platform] Restarting Process... [2/24/2023, 1:48:41 PM] [eveatmo platform] Launched child bridge with PID 9763 [2/24/2023, 1:48:42 PM] Registering platform 'homebridge-eveatmo.eveatmo' [2/24/2023, 1:48:42 PM] [eveatmo platform] Loaded homebridge-eveatmo v1.0.1 child bridge successfully [2/24/2023, 1:48:42 PM] Loaded 0 cached accessories from cachedAccessories.0E974331E965. [2/24/2023, 1:48:44 PM] [eveatmo platform] Loading new data from API for: weatherstation [2/24/2023, 1:48:45 PM] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant [2/24/2023, 1:48:45 PM] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token
I have reset my keys and created a new refresh token.
System Info: OS Ubuntu Focal Fossa (20.04.5 LTS) Node.js Version v18.14.2 User root Storage Path /var/lib/homebridge Config Path /var/lib/homebridge/config.json Plugin Path /var/lib/homebridge/node_modules Docker Yes
JSON stuff "name": "eveatmo platform", "ttl": 540, "extra_co2_sensor": false, "weatherstation": true, "airquality": false, "co2_alert_threshold": 1000, "module_suffix": "Eveatmo", "log_info_msg": true, "auth": { "client_id": "secret id", "client_secret": "secret secret", "refresh_token": "token" }, "_bridge": { "username": "me", "port": 40337 }, "platform": "eveatmo" }
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.
Starting from the 17/04/2023 (April 17 for us non-Europeans
Hello, thanks for the update, but didn't solve the problem with authenticate token. I even did reset my client id and client secret. But still got this problem in the log no connection:
[08/03/2023, 20:22:33] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant [08/03/2023, 20:22:33] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Invalid access token [08/03/2023, 20:22:33] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [08/03/2023, 20:22:47] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:23:07] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:23:27] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:23:47] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:24:07] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:24:27] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:24:47] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. [08/03/2023, 20:25:07] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info.
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 Eveatmo v1.1.0 NodeJs v18.15.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 Homebridge 1.6.0 OS Ubuntu Focal Fossa (20.04.5 LTS) Docker version Node.js Version v18.14.2
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!!!
Lucky you. Do you use the plugin as a child process? I tried so as well, but get the same error message in both cases (child or not):
[10/03/2023, 12:48:03] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token
[10/03/2023, 12:48:03] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant
From my point of view: a limited victory so far. Had to disable the plugin for now. Anyway agree here: Thanks for your effort to maintain the plugin.
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: I assume you generated a new refresh token with the token generator at dev.netatmo.com. Which scope settings did you use?
Afterwards you copy/paste the new refresh token into the homebridge plugin, and that‘s it?
Thanks in advance.
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 Homebridge 1.6.0 OS Ubuntu Focal Fossa (20.04.5 LTS) Docker version Node.js Version v18.14.2
@therealScarabeus ,
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.
@mdisabato ,
I tried as instructed, and limited the scope as you did - but still no success. To be very precise: At "Choose scopes" means to select the first one "read_station" and only this one. Right? My HB uses "Node.js Version: v18.15.0", maybe I have to tweak here. Anyway: thanks for your advice.
@therealScarabeus ,
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.
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?
@skrollme,
yes, this was one of my attempts: added all scopes, and retrieved a new refresh token. A different check was to delete the secrets and create new ones, passed to HB, and…. all of these attempts resulted in „Invalid token“ and „Invalid grant“.
Just to mention again: My „Node.js Version: v18.15.0". Are there reliable infos, that this may cause the trouble?
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?
I've just joined the "not working" group. No changes were made. It just stopped working.
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.
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'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
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. I tried restarting Homebridge but this didn't help and I was unable to get home bridge to start. I went to dev.netatmo.com and signed in. In my existing application I selected "read_station" in the "Token generator" section and clicked "Generate Token". I was then asked for permission and clicked OK. The refresh token that showed on-screen was the same as what was already in my config.json. I then restarted Homebridge and it then started without error and is reading data from the service. I'll keep monitoring to see if it becomes a problem again but could it have been a case of Netatmo simply wanting me to authorise the application again after the terms of service changed last week?
Same problem on my Homebridge Installation. HomeAssistant connects to Netatmo without errors... I generated a new App and a new token at dev.netatmo.com. But no positive changes...
[3/22/2023, 10:38:23 AM] [Bridge Netatmo] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant
[3/22/2023, 10:38:23 AM] [Bridge Netatmo] WARN - Netatmo: Error: getStationsDataError error: Invalid access token
[3/22/2023, 10:38:23 AM] [Bridge Netatmo] WARN - Netatmo: Error: getHealthyHomeCoachData error: Invalid access token
[3/22/2023, 10:38:42 AM] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info.