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

Getting authentication error #72

Open
hansw1204 opened this issue Feb 10, 2023 · 49 comments
Open

Getting authentication error #72

hansw1204 opened this issue Feb 10, 2023 · 49 comments
Assignees
Labels

Comments

@hansw1204
Copy link

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
@skrollme
Copy link
Owner

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

@hansw1204
Copy link
Author

hansw1204 commented Feb 21, 2023 via email

@skrollme
Copy link
Owner

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

@hansw1204
Copy link
Author

hansw1204 commented Feb 22, 2023 via email

@hansw1204
Copy link
Author

hansw1204 commented Feb 22, 2023 via email

@mdisabato
Copy link

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"
}

@therealScarabeus
Copy link

therealScarabeus commented Mar 8, 2023

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.

@mdisabato
Copy link

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 ), this behavior will change to to be compliant with the recommendations of the RFC of the OAuth2 Authorization Framework (section 10.4) and improving the security of the data of our users.When refreshing tokens, Access Token and Refresh Token will be automatically renewed and former tokens invalidated.
What does it means for me ?If you were already updating the tokens provided when refreshing your tokens, this change will not impact you.If you do not update the refresh token when refreshing your Access Token, your users will be disconnected after 3 hours as the former tokens will become invalidated.To fix it, you need to update the tokens as soon as you get the newly generated ones.
Sincerely,Legrand - Netatmo - Bticino

@PvdGulik
Copy link

PvdGulik commented Mar 8, 2023

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!

@skrollme
Copy link
Owner

skrollme commented Mar 8, 2023

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.

@therealScarabeus
Copy link

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.

@PvdGulik
Copy link

PvdGulik commented Mar 8, 2023

Same problem here, even after update,

Homebridge v1.6.0
Eveatmo v1.1.0
NodeJs v18.15.0

@mdisabato
Copy link

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
Copy link

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.

@mdisabato
Copy link

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. :)

@mdisabato
Copy link

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.

@therealScarabeus
Copy link

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

@mdisabato
Copy link

@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.

@therealScarabeus
Copy link

@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.

@skrollme
Copy link
Owner

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?

@therealScarabeus
Copy link

@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?

@mdisabato
Copy link

I've just joined the "not working" group. No changes were made. It just stopped working.

@therealScarabeus
Copy link

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.

@hansw1204
Copy link
Author

hansw1204 commented Mar 21, 2023 via email

@mdisabato
Copy link

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.

@skrollme
Copy link
Owner

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

@therealScarabeus
Copy link

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

@skrollme
Copy link
Owner

I will try to prepare a debug-version version and let you know. Thanks for the offer, @therealScarabeus

@BradJMelb
Copy link

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?

@mak-cs
Copy link

mak-cs commented Mar 22, 2023

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.

@mdisabato
Copy link

smacks forehead Debug, of course. I'll do a capture today, time permitting.

Thank you for the suggestion. :)

@mdisabato
Copy link

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.

@skrollme
Copy link
Owner

I would suggest you update the docs and tell folks if one method fails, try the other.

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

@cladmonitor
Copy link

cladmonitor commented Apr 3, 2023

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 killed the homebridge service (along with all child procs)
  • edited the /var/lib/homebridge/netatmo-token.json file and manually added the access token issued when using the "token generator"
  • after restarting the homebridge service I still get an invalid grant error but it seems happy enough to continue along.

@PvdGulik
Copy link

I started all over. Logout from all Netatmo sites, plugins etc.
Created a new app on dev.netatmo.com, entered the credentials as given.
For a time it works and then suddenly (12:38) first authentication errors and at 12:56 is seems to want to sync with devices I don't have or selected. I don't even have a HealthyHomeCoach.
I only use and selected the "Read Station" for my smart weather station:

[10/04/2023, 09:47:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 09:47:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 09:56:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 09:56:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:05:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:05:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:14:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:14:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:23:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:23:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:32:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:32:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:41:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:41:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:50:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:50:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 10:59:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 10:59:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 11:08:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 11:08:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 11:17:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 11:17:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 11:26:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 11:26:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 11:35:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 11:35:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 11:44:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 11:44:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 11:53:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 11:53:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:02:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:02:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:11:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:11:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:20:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:20:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:29:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:29:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:38:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:38:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:38:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:41:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:44:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:47:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:47:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:47:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 12:47:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 12:47:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:50:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:53:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:56:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 12:56:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 12:56:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 12:56:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 12:56:26] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 12:59:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:02:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:05:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:05:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:05:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:05:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:05:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:08:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:11:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:14:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:14:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:14:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:14:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:14:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:17:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:20:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:23:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:23:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:23:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:23:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:23:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:26:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:29:27] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:32:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:32:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:32:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:32:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:32:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:35:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:38:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:41:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:41:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:41:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:41:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:41:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:44:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:47:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:50:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:50:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:50:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:50:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:50:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:53:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:56:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 13:59:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 13:59:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 13:59:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 13:59:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 13:59:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:02:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:05:28] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:08:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 14:08:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 14:08:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 14:08:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 14:08:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:11:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:14:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:17:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 14:17:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 14:17:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 14:17:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 14:17:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:20:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:23:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:26:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 14:26:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 14:26:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 14:26:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 14:26:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:29:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:32:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:35:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 14:35:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 14:35:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 14:35:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 14:35:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:38:29] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:41:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:44:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 14:44:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 14:44:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 14:44:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 14:44:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:47:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:50:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:53:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 14:53:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 14:53:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 14:53:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 14:53:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:56:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 14:59:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:02:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:02:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:02:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:02:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:02:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:05:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:08:30] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:11:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:11:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:11:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:11:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:11:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:14:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:17:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:20:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:20:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:20:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:20:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:20:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:23:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:26:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:29:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:29:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:29:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:29:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:29:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:32:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:34:33] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:35:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:38:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:38:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:38:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:38:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:38:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:41:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:44:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:47:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:47:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:47:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:47:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:47:31] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:49:18] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:50:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:53:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:56:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 15:56:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 15:56:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 15:56:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 15:56:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 15:59:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:02:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:05:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 16:05:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 16:05:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 16:05:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 16:05:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:08:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:11:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:14:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 16:14:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 16:14:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 16:14:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 16:14:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:17:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:20:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:23:25] [eveatmo platform] Loading new data from API for: airquality [10/04/2023, 16:23:25] [eveatmo platform] Loading new data from API for: weatherstation [10/04/2023, 16:23:25] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired [10/04/2023, 16:23:25] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired [10/04/2023, 16:23:32] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:26:33] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request [10/04/2023, 16:29:33] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request

Hope this helps solving the problem..

@palasinio
Copy link

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.

@PvdGulik
Copy link

I tried that, removed the netatmo-token.json, restarted homebride, but after a few hours the same issue..

@mdisabato
Copy link

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
[4/14/2023, 11:07:03 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:06 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:16 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:17 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:17 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:18 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:19 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:22 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:48 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:07:48 AM] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired
[4/14/2023, 11:09:46 AM] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:43 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:44 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:10:44 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:12:46 AM] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[4/14/2023, 11:14:31 AM] [eveatmo platform] Loading new data from API for: weatherstation
[4/14/2023, 11:14:31 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.

@PvdGulik
Copy link

PvdGulik commented Apr 17, 2023

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...
[17/04/2023, 07:22:50] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[17/04/2023, 07:22:50] [HB Supervisor] Started Homebridge v1.6.0 with PID: 10328
[17/04/2023, 07:22:53] Loaded config.json with 3 accessories and 8 platforms.
[17/04/2023, 07:22:53] Loaded 20 cached accessories from cachedAccessories.
[17/04/2023, 07:22:54] ---
[17/04/2023, 07:22:56] Loaded plugin: [email protected]
[17/04/2023, 07:22:56] Registering platform 'homebridge-eveatmo.eveatmo'
[17/04/2023, 07:22:56] ---
[17/04/2023, 07:23:15] Loading 8 platforms...
[17/04/2023, 07:23:15] [eveatmo platform] Initializing eveatmo platform...
[17/04/2023, 07:23:15] [eveatmo platform] Authenticating using 'password' grant
[17/04/2023, 07:23:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 07:23:22] [eveatmo platform] Loading new data from API for: airquality

[17/04/2023, 07:23:24] Initializing platform accessory 'Woning (Binnenmodule) Binnenmodule'...
[17/04/2023, 07:23:24] Initializing platform accessory 'Woning (Binnenmodule) Buitenmodule'...
[17/04/2023, 07:23:24] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge 8242) is running on port 51826.
[17/04/2023, 07:32:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 07:32:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 07:41:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 07:41:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 07:50:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 07:50:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 07:59:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 07:59:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 08:08:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 08:08:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 08:17:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 08:17:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 08:26:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 08:26:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 08:35:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 08:35:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 08:44:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 08:44:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 08:53:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 08:53:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:02:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:02:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:11:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:11:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:20:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:20:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:29:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:29:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:38:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:38:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:47:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:47:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 09:56:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 09:56:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 10:05:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 10:05:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 10:14:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 10:14:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 10:23:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 10:23:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 10:23:23] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[17/04/2023, 10:26:23] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[17/04/2023, 10:29:23] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[17/04/2023, 10:32:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 10:32:22] [eveatmo platform] Loading new data from API for: airquality
[17/04/2023, 10:32:22] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Access token expired
[17/04/2023, 10:32:22] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Access token expired
[17/04/2023, 10:32:24] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[17/04/2023, 10:35:24] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[17/04/2023, 10:38:24] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_request
[17/04/2023, 10:41:22] [eveatmo platform] Loading new data from API for: weatherstation
[17/04/2023, 10:41:22] [eveatmo platform] Loading new data from API for: airquality

@MLVC72
Copy link

MLVC72 commented Apr 23, 2023

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.

@northpolebass
Copy link

Exact same issue here. Using Node.js Version | v16.19.1 Does that make a difference?

Node.js Version v16.19.1

@PvdGulik
Copy link

PvdGulik commented Jun 26, 2023

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
homebridge-config-ui-x v4.50.4
homebridge-eveatmo v1.1.0
Node.js Versie | v18.16.0

Thanks!

@MLVC
Copy link

MLVC commented Jun 26, 2023

Not solved for me. Still not working.

@PvdGulik
Copy link

For the token I only use the weather station now. Before I also used the thermostat.

Maybe that solved it for me.

@MLVC72
Copy link

MLVC72 commented Jun 26, 2023 via email

@uratrtl
Copy link

uratrtl commented Jul 17, 2023

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.

@AyberkAltuntop
Copy link

Any news on that? I'm waiting for the good news.

@skrollme
Copy link
Owner

skrollme commented Apr 8, 2024

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.
Every now and then the Netatmo-API is down and no new data is fetched, but that is happening since ever with Netatmo.

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.

invalid_grant or invalid access token messages appear, when e.g. the access_token AND the refresh_token expired. This can happen if the API is down for too long end the refresh_token could not be refreshed before it expired. At least for me this did not happen in the last few years.

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.

@clorenz150
Copy link

Netatmo has changed the updating process of the refresh_token.
On the first request with a new refresh_token Netatmo returns another refresh_token!
So you need a new token on every restart of the plugin.
Best way would be to check on every request, if there is a request_token returned and save it in the plugin config for a restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests