Re: Netatmo authentication changes Oct 2022
Posted: Monday 24 March 2025 12:07
You can follow my post above to check your access_token and access to the Netatmo server.
Open source Home Automation System
https://forum.domoticz.com/
You have another error than most of us here have. We have:
No time to wait.chrominator wrote: ↑Monday 24 March 2025 16:36 Log with new PR #6281:
... Waiting for 45 mn.... Keep you posted.
I know your module netatmo_manage_tokens.php works. But I had to create a new App on dev.netmatmo website. With my historical App, used by Domoticz for a while, I'm unable to refresh the token with netatmo_manage_tokens.php (even when Netmatmo plugin is disabled in Domoticz).
in HTTPClient::POSTBinary and HTTPClient::GETBinary methods,curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
With this Error You are having a issue with your ClientID or ClientSecret, maybe you have a space in front or in back.jcb2 wrote: ↑Monday 24 March 2025 12:01 Hello,
One new PR is available into new beta about issue of Netatmo.
For me this is always not good. I have wait 20 minutes but always one other error : "No access granted, forcing login again (Refresh tokens): invalid_client"
I have check and check again, make a new app but nothing ...
As a user off Domoticz myself I invested time in the New-API from Netatmojpaul wrote: ↑Monday 24 March 2025 19:32 Hi dev team,
Could it be an issue with the HTTPClient lib ?
I added debug in httpclient/HTTPClient.cpp , this linein HTTPClient::POSTBinary and HTTPClient::GETBinary methods,curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
and it seems the headers are not exactly the same between Domotiz and netatmo_manage_tokens.php
If you enable Debug on Domoticz then you can see the httpUrl and httpData without any changeschrominator wrote: ↑Monday 24 March 2025 16:56No time to wait.chrominator wrote: ↑Monday 24 March 2025 16:36 Log with new PR #6281:
... Waiting for 45 mn.... Keep you posted.
Added some debug lines to the source:
Capture d'écran 2025-03-24 164811.png
compile and restart:
Got a good reply from the Netatmo server then, it worked directly, no relation with my changes in the source.
Capture d'écran 2025-03-24 164029.png
Still working randomly, I'm saved probably until the next restart.
Code: Select all
Debug(DEBUG_HARDWARE, "Netatmo URL %s with %s", httpUrl.c_str(), httpData.c_str());
Code: Select all
ExecStart=/domoticz/domoticz -www 8080 -sslwww 443 -log "/var/log/domoticz-1.log" -loglevel all -debuglevel normal,hardware
# ExecStart=/domoticz/domoticz -www 8080 -sslwww 443 -log "/var/log/domoticz-1.log" -loglevel all
For answering this you need to enable debug to see which devices are received?jcb2 wrote: ↑Tuesday 25 March 2025 21:21 Hello,
After many try I have one connexion.
But no update of my devices. I have deleted all devices and hope one automatic new creation (with params for allow new device) but nothing !
One idea ?
Thanks,
Jean-Charles
Log :
2025-03-25 21:14:01.982 Status: Météo: Use refresh token from database...
2025-03-25 21:14:01.982 Status: Météo: Requesting refreshed tokens
2025-03-25 21:14:02.423 Status: Météo: We refresh our token ...
2025-03-25 21:14:02.423 Status: Météo: Login 1
2025-03-25 21:14:02.639 Status: Météo: Station Data parsed Buanderie
2025-03-25 21:14:02.640 Status: Météo: Station Data parsed Météo abri
2025-03-25 21:14:02.640 Status: Météo: Weather 1
2025-03-25 21:14:02.640 Status: Météo: Get HomesData Details
2025-03-25 21:14:02.902 Status: Météo: Home id METEO updated.
2025-03-25 21:14:02.902 Status: Météo: Home id Buanderie et cave updated.
2025-03-25 21:14:02.902 Status: Météo: Home id Abri et serre updated.
2025-03-25 21:14:02.902 Status: Météo: Home Status Details, size (number of homes) is 3
2025-03-25 21:14:03.829 Status: Météo: Parse Persons
2025-03-25 21:14:03.829 Status: Météo: HomeStatus parsed
2025-03-25 21:14:04.106 Status: Météo: Scenarios Data Recieved
2025-03-25 21:14:04.284 Status: Météo: Parse Persons
2025-03-25 21:14:04.285 Status: Météo: HomeStatus parsed
2025-03-25 21:14:04.513 Status: Météo: Scenarios Data Recieved
2025-03-25 21:14:04.514 Status: Météo: Status 1
Code: Select all
2025-03-25 19:38:10.509 Error: Netatmo: Invalid/no data received (refresh tokens)... HTTP/2 403
2025-03-25 19:38:10.513 Status: Netatmo: Retry LOGIN within 45 min.
2025-03-25 19:38:10.513 Debug: Netatmo: Refresh Token Flag 1 ...
2025-03-25 19:38:10.513 Status: Netatmo: Login 0
2025-03-25 19:38:21.784 Status: Mainworker Stopped...
2025-03-26 20:09:34.060 Status: Netatmo: Status 1
Thanks. For my part I found the solution by allowing the addition of equipment. Another NETATMO device was added and everything was in order. ThanksAbidos wrote: ↑Thursday 27 March 2025 15:26 Hi,
As far as I'm concerned, I had exactly the same problem.
After seeing "Retry LOGIN within 45 min." several times, I decided to reauthenticate. With no success. Then I rebooted my RPI: that did the trick! After reboot, it worked.
It's worth giving it a try...![]()