planetk / homebridge-netatmo

This is a homebridge plugin for several netatmo devices
Apache License 2.0
108 stars 24 forks source link

Authentication errors with Netatmo API #61

Open patricks opened 7 years ago

patricks commented 7 years ago

Since a fews days I get the following error, if I start my homebridge server:

[8/10/2017, 7:01:38 PM] [Netatmo Weather] ERROR - Netatmo: Error: Authenticate error: Status code503

Are there any known problems?

skrollme commented 7 years ago

Same here. Netatmo-Support says they have some problems with their servers

c0mm0n commented 7 years ago

Same here.

Any tips on how to handle this ? This issue "kills" my homebridge server, have to remove netatmo to have it working again.

bayindir-mustafa commented 7 years ago

I think only removing the netatmo platform from the config will help until servers come back.

Krocko commented 7 years ago

But then you have to rename and sort all the sensors again.

dlichtenegger commented 7 years ago

I have the same problem with a 403 error:

WARN - Netatmo: Error: getStationsDataError error: Status code403

Credentials are correct and also netatmo app status does not indicate any ban or limit which got hit.

Biggest problem actually is, that this kills my whole homebridge as nothing is working anymore when this error occurs. Would be nice if the error handling could be improved at least (if this is related to netatmo server problems as mentioned above).

tilledminds commented 7 years ago

Has anyone been able to resolve this?

bayindir-mustafa commented 7 years ago

Problem was caused by netatmo servers. I have checked it is working for now.

tilledminds commented 7 years ago

How did you get it to work? I just tried and I'm getting the same error:

[8/20/2017, 5:22:40 PM] [weather] ERROR - Netatmo: Error: Authenticate error: invalid_client

fafoulon commented 7 years ago

Same for me, since two days : WARN - Netatmo: Error: getStationsDataError error: Status code403

QBAWTF commented 7 years ago

Same here, integration is not working at all and crashing homebridge.

However, when I'm developing some of my own scripts for Netatmo API probably I recognized a reason. When you make too much requests in short time, then Netatmo API generates empty response but when you wait a few seconds between requests then it is okay. Maybe should you make some delays in API calls?

rswift commented 6 years ago

I got the same thing, having logged on to my developer account the "APP STATUS" row wasn't immediately obvious - oddly, clicking 'deactivate' clearly sent a message to https://dev.netatmo.com/api/deactivateapp passing my application identifier, but homebridge then ran as I'd expect. Clicking 'activate' (https://dev.netatmo.com/api/activateapp) also allowed it to work, so unless there was a strange timing thing, I was definitely able to control behaviour, but it definitely brought my homebridge back online...

HTH - Robert...

yelef77 commented 6 years ago

I ve got the same problem. Started yesterday. Has anyone been able to resolve this? I ve tried rswift's solution but did not work.

0ldF0x commented 6 years ago

Any workarounds on this? Today I couldn't open my f*****g garage doors because whole homebridge was dead because of Netatmo 403 errors :(

[7/27/2018, 9:58:02 PM] [netatmo platform] WARN - Netatmo: Error: getStationsDataError error: Status code403
[7/27/2018, 9:58:02 PM] [netatmo platform] WARN - Netatmo: Error: getHomeData error: Status code403
[7/27/2018, 9:58:02 PM] [netatmo platform] WARN - Netatmo: Error: getThermostatsDataError error: Status code403
[7/27/2018, 9:58:03 PM] [netatmo platform] WARN - Netatmo: Error: getStationsDataError error: Status code403
patricks commented 6 years ago

I got the same error again, I fixed it by reseting the keys. I got a new client_id and client_secret. Changed this in my config.json and everything works fine again. Looks like this has to be done once a year.

0ldF0x commented 6 years ago

I received response about error 403 from Netatmo. Here is what they said:

HomeBridge is a third party application and is not handled directly by Netatmo.

From your logs, I suspect that you reached the API usage. In this case, you receive an error like this : 403 Forbidden { "error": { "code": 26, "message": "User usage reached" } }

Check the code or contact the developer plugin to confirm this is the case.

You can find rate limits here: https://dev.netatmo.com/resources/technical/guides/ratelimits

patricks commented 6 years ago

You can tweak the refresh times with the refresh_check parameter. Maybe this helps.

0ldF0x commented 6 years ago

I see. Thanks for the suggestion.

refresh_check Time in milliseconds, how often the api will be automatically polled to check for changes. Defaults to 900000 which is 15 Minutes. Do not take values much lower, or you risk, that you put to much traffic to the netatmo API. In worst case netatmo might temporarilly exclude your app from the api.

chimcen commented 6 years ago

Same error here - any news about this problem?

patricks commented 6 years ago

Maybe your client_id and client_secret is also expired?

chimcen commented 6 years ago

I‘ve done the setup and creation of „my app“ in Netatmo Dev acc 30Min before for the first time and also activated it - the status of the app says „not banned“ and the webhook log says „status=ok“...

EvolvingParty commented 5 years ago

I am having this issue today, If its the Netamo server I'm okay with that but the home bridge log keeps filling up. I tried "refresh_run": 300000 in the home bridge config.json file as it defaults to 20 seconds (20000) I changed it to five minutes 300000 as per this guide homebridge-netatmo