skrollme / homebridge-eveatmo

Homebridge plugin which adds a Netatmo weatherstation as HomeKit device and tries to act like Elgato Eve Room/Weather
Apache License 2.0
69 stars 7 forks source link

Plugin is taking long time to load and preventing Homebridge from starting log message #74

Open Tomhodgson opened 1 year ago

Tomhodgson commented 1 year ago

Hi,

I notice this entry in the logs for Homebridge a lot and as far as I can see everything is configured correctly. The message that shows is:

[10/05/2023, 10:31:37] [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info.

skrollme commented 1 year ago

Hello @Tomhodgson this mostly happens when the API servers of Netatmo are busy or in "a bad phase" as they are at the moment / last weeks. Did the problem persist over time?

TheodorCZ1 commented 1 year ago

The same thing happened to me today. Is it a fix on our side, or is it the netatmo servers lacking? I tried running a similar Netatmo Homebridge plugin, and the error is the same - “unauthorised_client”.

uratrtl commented 1 year ago

Im just setting this up for the first time and I registered all the scopes available to me when generating my refresh token, yet I'm still getting: " [netatmo platform] Loading new data from API for: weatherstation [7/16/2023, 11:56:11 AM] [netatmo platform] WARN - Netatmo: Error: Authenticate refresh error: invalid_grant [7/16/2023, 11:56:11 AM] [netatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info. "

I have a gen 2 inside station and one outdoor station. They both work fine in the app

polygon-eclipse commented 1 year ago

[8/2/2023, 10:46:35 AM] [eveatmo platform] Loading new data from API for: weatherstation [8/2/2023, 10:46:35 AM] [eveatmo platform] Loading new data from API for: airquality [8/2/2023, 10:46:35 AM] [eveatmo platform] WARN - Netatmo: Error: getHealthyHomeCoachData error: Application does not have the good scope rights [8/2/2023, 10:46:51 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. [8/2/2023, 10:47:11 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.

I updated the node version from 16.n.n to 18.15.0 and at the same time I updated the Homebridge version: 3.0.17 and after these changes, those problems occurred. The new configuration uses : grant_type : refresh_token Also tested the password, no effect.

When child bridge is in use, Homebridge restarts normally after starting (running) and all other plugins work except eveatmo. If child bridge is not used after restarting, Homebridge does not start, only the wheel remains spinning and all plugins do not work.

With the old configuration (before the update), node version 16.n.n and Plugin version 0.6.5, everything worked normally. Grant_type : password

ro10dev commented 1 year ago

Hi @skrollme, unfortunately I have the same "This plugin is taking long time to load and preventing Homebridge from starting." problem. At the moment there seams to be no way to get the plugin working and catching data from Netatmo. Neither password nor token access work. Are there f.e. any workarounds or special combinations of node/homebridge/plugin versions known at the moment to get it to work? Thx in advance

vincentbls commented 1 year ago

Same problem since a few weeks (username/password auth or refresh_token) : [homebridge-eveatmo] This plugin is taking long time to load and preventing Homebridge from starting. See https://homebridge.io/w/JtMGR for more info.

With password : _ERROR - Netatmo: Error: Authenticate error: unauthorizedclient With refresk token : WARN - Netatmo: Error: getStationsDataError error: Invalid access token

Homebridge v1.6.1 Container Manager DSM homebridge-eveatmo v1.1.0

mailkluge commented 1 year ago

I had exactly the same error and today I found time to look into the source code. I solved the issue by editing manually the file „netatmo-toke.json“ in the /var/lib/homebridge folder. In this file a wrong access toke was stored. Inserted both - access and refresh - token with new ones from dev.netatmo and the plug-in is up and running again.

hope this interim solution helps.

vincentbls commented 1 year ago

Thanks @mailkluge ! The information contained in the file netatmo-token.json was completely false! It was a very small problem... It works for me.

TheodorCZ1 commented 1 year ago

@vincentbls @mailkluge how do you edit the file? I'm running Homebridge in VirtualBox. When I mount the VDI, it's read only. And I cant edit the file.

vincentbls commented 1 year ago

@TheodorCZ1 Sorry, I don't know Homebrige with VirtualBox. I use Docker on a NAS. I think the VM must be turned off to edit.

novski commented 11 months ago

I had exactly the same error and today I found time to look into the source code. I solved the issue by editing manually the file „netatmo-toke.json“ in the /var/lib/homebridge folder. In this file a wrong access toke was stored. Inserted both - access and refresh - token with new ones from dev.netatmo and the plug-in is up and running again.

hope this interim solution helps.

Does this work after a reboot as well on your side? I wasn't able to fix it by replacing the refresh and access token. Tried everything. Disabling is the only solution to make my homebridge startup...

vincentbls commented 11 months ago

Does this work after a reboot as well on your side?

I wasn't able to fix it by replacing the refresh and access token. Tried everything. Disabling is the only solution to make my homebridge startup...

It works for me, try creating a child bridge for this plugin.

novski commented 10 months ago

I changed the plugin to a chlid created a nes token and applied that to the UI-Config and saved. Then deleted (sudo rm /var/lib/homebridge/netatmo-token.json) the token file and restarted the bridge. The file then gets recreated verry soon after a restart and the plugin started to work.