Page 11 of 21

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 15:45
by jpcasta
As mentioned before I am using the beta version build 16406 from January 3rd 2025 with the new authentication and I am getting the same issue.

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 15:48
by jpcasta
dgilbert2 wrote: Thursday 13 March 2025 15:43 On the Netatmo Status page is says this:

"3rd parties - sync api
maintenance
Mar 12, 2025, 8:30 AM - Mar 12, 2025, 1:30 PM GMT | Duration: 5 hours
Impacted Business Services
3rd party APIs
scheduled
We will migrate all the sync api routes for the 3rd parties to a new component which will help us to enforce the declared quotas.
This will impact only the 3rd parties API declared via dev.netatmo.com. Netatmo/Legrand applications and voice assistants are not impacted by the change."

However, this was dated yesterday so not sure if the issue is temporary or not!?
May be it is because this change the data are no longer returned?

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 15:54
by Matmar
I also saw this communication from March 12. Thanks for the info!
So it would seem that the issue is with Netatmo and that the Domoticz beta is also affected by it.

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 16:01
by Matmar
@jpcasta Sorry, I didn't realize that you're already using the new authentication method: version build 16406. My mistake—I’m using the stable version build 16157. So switching to the new authentication method doesn’t help. Let's wait for them to complete their migrations. Thanks!

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 16:55
by homeJLB
With the latest beta the return message from Netatmo is

Code: Select all

The request is blocked.
HTTP status code

Code: Select all

HTTP/2 403 
Hopefully this is only temporally.

Netatmo Status Website
https://health.netatmo.com/posts/dashboard

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 18:22
by chrominator
According to the current status on this page, it is supposed to be ok, but it is not effective in dz actually.

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 18:33
by homeJLB
But above that Status there is the Scheduled Message for 3rd party APIs.
So until that message changes, I suspect no working solution for Domoticz

Re: Netatmo authentication changes Oct 2022

Posted: Thursday 13 March 2025 21:19
by Thuis
:roll: Netatmo :roll:

Re: Netatmo authentication changes Oct 2022

Posted: Friday 14 March 2025 10:42
by pipiche

Re: Netatmo authentication changes Oct 2022

Posted: Friday 14 March 2025 19:42
by chrominator
Got it working again, however I do not know why.
Still running the same beta 2024.7 (build 16360).
Stopping domoticz, replacing domoticz/domoticz.db by an older one from domoticz/backups/hourly.
Starting domoticz, the error message was not "Error: netatmo: Invalid/no data received (refresh tokens)..." and turned into:

Code: Select all

2025-03-14 19:27:25.148 Error: Netatmo: No access granted, forcing login again (Refresh tokens): invalid_grant
2025-03-14 19:27:55.152 Status: Netatmo: Use refresh token from database...
2025-03-14 19:27:55.153 Status: Netatmo: Requesting refreshed tokens
2025-03-14 19:27:55.342 Error: Netatmo: No access granted, forcing login again (Refresh tokens): invalid_grant
So back to Hardware I selected Netatmo and redo the connexion with the right scope and got:

Code: Select all

2025-03-14 19:28:08.861 Status: Netatmo: Worker stopped...
2025-03-14 19:28:08.862 Status: Netatmo: Worker started...
2025-03-14 19:28:13.863 Status: Netatmo: Use refresh token from database...
2025-03-14 19:28:13.865 Status: Netatmo: Requesting refreshed tokens
2025-03-14 19:28:14.000 Status: Netatmo: Get HomesData Details
2025-03-14 19:28:14.195 Status: Netatmo: Home id Thermostat updated.
2025-03-14 19:28:14.196 Status: Netatmo: Home Status Details, size (number of homes) is 1
2025-03-14 19:28:14.196 Status: Netatmo: Home_Data = home_id=5978<data are mine>64&get_favorites=true&
2025-03-14 19:28:14.455 Netatmo: General/Percentage ( Thermostat - Bat. Lvl)
2025-03-14 19:28:14.464 Netatmo: Setpoint (Consigne Netatmo)
2025-03-14 19:28:14.476 Netatmo: Temp (Netatmo)
2025-03-14 19:28:14.485 Netatmo: Light/Switch (Chauffage)
2025-03-14 19:28:14.489 Netatmo: Light/Switch (Planning Thermostat)
2025-03-14 19:28:14.493 Netatmo: Light/Switch (Thermostat - Mode)
2025-03-14 19:28:14.495 Status: Netatmo: HomeStatus parsed
2025-03-14 19:28:14.495 Status: Netatmo: Status 1
Still working so far.

If this may help...

Re: Netatmo authentication changes Oct 2022

Posted: Friday 14 March 2025 20:37
by dgilbert2
chrominator wrote: Friday 14 March 2025 19:42 Got it working again, however I do not know why.
......

Still working so far.

If this may help...
Thank you for this!

I've just done the same and it started working, how strange!!

Really odd, lets hope it continues to work now.

Thanks again!

Re: Netatmo authentication changes Oct 2022

Posted: Friday 14 March 2025 20:56
by dgilbert2
... just to add, I've now restored back to my latest database, updated the Netatmo token and that too has started working. All very odd!

Re: Netatmo authentication changes Oct 2022

Posted: Friday 14 March 2025 22:55
by DomoFlits
Did you replace the database with one from less than an hour ago or one from longer time ago?
Since when I replaced it with one from less than an hour ago I still got the same error

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 4:12
by chrominator
Mine was 3 hours old.

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 9:26
by DomoFlits
With stopping Domoticz, replacing the domoticz.db for an older version and starting Domoticz again, I went to:

Error: Netatmo: No access granted, check credentials...

So I did the login again in dev.netatmo.com and pasted the <SOMECODE> from
http://localhost/netatmo?state=teststate&code=<SOMECODE>
Again in the password field at the Domoticz hardware.

This gave me in the logs:

Error: Netatmo: Error connecting to Server...

The username I use in the Netatmo hardware component is <client ID>:<client secret> from my Netatmo app in dev.netatmo.com

So not solved here, but went to another error...

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 9:48
by homeJLB
@domoflits why are you using localhost and not the local ip:port?

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 10:27
by jpcasta
I restored a database backup from 1 month without success.

Next:
- I revoked the Domoticz Netatmo access in "home.netatmo.com/settings/my-account", I created a new App in "dev.netatmo.com/apps".
- I modified the "Client ID" and "Client Secret values", I logged in again using the "Connexion" button in Domoticz Netatmo Hardware.
- After all of that I am still getting the same error message: Error: Netatmo: Invalid/no data received (refresh tokens)...

Do you know if the token is cached somewhere and not really renewed?
Thanks

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 11:12
by DomoFlits
homeJLB wrote: Saturday 15 March 2025 9:48 @domoflits why are you using localhost and not the local ip:port?
Because I had it working after following the (previous) wiki after the new authentication method.
https://wiki.domoticz.com/index.php?tit ... ldid=18755

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 11:20
by homeJLB
This is for the most recent login not correct.
Can you try without localhost ?

Re: Netatmo authentication changes Oct 2022

Posted: Saturday 15 March 2025 12:33
by Matmar
My Netatmo data reception has resumed, and everything is working again. I don’t fully understand the reason either.

Basically, I wanted to upgrade from my stable version 16157 to the latest beta, which includes the new Netatmo plugin. While doing this, I started by updating the operating system (I use a Raspberry Pi). After completing the update, upon reboot, Domoticz restarted with the exact same database as before. I didn’t restore the database as some of you did.

After the reboot, I encountered the usual error that occurs when the token is lost:
Error: Netatmo: No access granted, check credentials...
This was different from the strange error I had seen when the issue first started:
Error: Netatmo: Invalid/no data received...

So, I performed the usual procedure of replacing the Netatmo Hardware password with the token obtained from the Netatmo website. Since I don’t have the latest beta but still the stable version from July, I always had to do this anyway after every Domoticz or Raspberry reboot. After doing this, data reception started working again.

At that point, I decided to abandon the idea of switching to the beta and stuck with the stable version. I realize that sooner or later, I’ll also have to switch to the latest Netatmo plugin version, but if everything keeps working like this, I’ll wait until the next stable release.

In my opinion, some cached information is retained, and the OS update along with the reboot restored the system to its initial working state. If this information can be helpful to any of you, that would be great!