Netatmo authentication changes Oct 2022

Moderator: leecollings

homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

I have 2 setups 1 for development build from Github and 1 running in a Docker container.
This last one is giving me problem with the connection to Netatmo.
I believe this is a Firewall issue from Docker, but this needs some more investigation.
The one build from Github is running normal without restoring the database, but I had to re-do the Login proces.

kind regards


Edit;

adding

Code: Select all

network_mode: host
to

Code: Select all

docker-compose.yml
did the trick.
Then;

Code: Select all

docker compose pull && docker compose build && docker compose create && docker compose start
Now all is connected and running.
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

homeJLB wrote: Saturday 15 March 2025 11:20 This is for the most recent login not correct.
Can you try without localhost ?
I left the redirect URL empty in the app made on https://dev.netatmo.com/, then went to the https://api.netatmo.com/oauth2/authoriz ... ead_camera (yes replaced <CLIENT_ID> with my ID)

still arrived at http://localhost/netatmo?state=teststat ... <SOME_CODE>
pasted the new <SOME_CODE> in the password field. but unfortunately still:
Error: Netatmo: Invalid/no data received...

The latest wiki page is different than the older wiki page, but the latest wiki page says that there is a <client_id> field, a <client_secret> field and a Scope field.
I don't have these fields in my 2024.7 version of domoticz:
netatmo-hardware.png
netatmo-hardware.png (22.05 KiB) Viewed 976 times
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

in your URL there is still the mention off 'Localhost'

Code: Select all

https://api.netatmo.com/oauth2/authorize?client_id=%3CCLIENT_ID%3E&redirect_uri=http%3A%2F%2Flocalhost%2Fnetatmo&state=teststate&scope=read_station%20read_thermostat%20write_thermostat%20read_homecoach%20read_smokedetector%20read_presence%20read_camera
change that to

Code: Select all

http://ip:port/
from Domoticz

so for example

Code: Select all

http://192.168.1.1:8080/
Wimpi
Posts: 11
Joined: Sunday 07 January 2024 12:52
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by Wimpi »

I'm following this, I also have the same problem with Netatmo.

I don't have a recent backup, it doesn't work exactly for everyone.

Update and upgrade OS wasn't the problem either,
with a new app at Netatmo the error still occurs.

I don't know either and I'm following this
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

homeJLB wrote: Saturday 15 March 2025 16:55 in your URL there is still the mention off 'Localhost'

Code: Select all

https://api.netatmo.com/oauth2/authorize?client_id=%3CCLIENT_ID%3E&redirect_uri=http%3A%2F%2Flocalhost%2Fnetatmo&state=teststate&scope=read_station%20read_thermostat%20write_thermostat%20read_homecoach%20read_smokedetector%20read_presence%20read_camera
change that to

Code: Select all

http://ip:port/
from Domoticz

so for example

Code: Select all

http://192.168.1.1:8080/
I have updated the redirect URi in the app on dev.netatmo.com to: http://192.168.1.3:8080/netatmo
I have used the URL ... ze?client_id=<MY_CLIENT_ID>&redirect_uri=http%3A%2F%2F192.168.1.3:8080%2Fnetatmo&state=teststate...
then I end up on the page: http://192.168.1.3:8080/netatmo?state=t ... <SOME_CODE>
showing: 400 Bad Request
insert the <SOME_CODE> as password in the domoticz hardware page still gives me: Error: Netatmo2: Invalid/no data received...
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

The netatmo is too much in your url. And try with a blanc redirect URi in the app on dev.netatmo.com

This last I suspect will be Changing in the future.
But for now it works like this
dgilbert2
Posts: 95
Joined: Wednesday 16 August 2017 8:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: UK
Contact:

Re: Netatmo authentication changes Oct 2022

Post by dgilbert2 »

From my own experience "Error: Netatmo: Invalid/no data received..." does not seem to be caused by login issues, rather new Netatmo server security. Its almost as though it is blocking Domoticz which is sending some data every 30 seconds. I could be completely wrong though.

Try this, disable Netatmo under Hardware and reboot. Leave Netatmo disabled for an hour. After this get a new Netatmo password/token, enter it in the hardware tab and re-enable. Then see what errors, if any, you get. If you see "Error: Netatmo: Error connecting to Server..." that seems to be another security block and I suggest setting up a new App on the Netatmo dev server.

Once working its definitely a case of not touching it ;-)
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

homeJLB wrote: Saturday 15 March 2025 18:25 The netatmo is too much in your url. And try with a blanc redirect URi in the app on dev.netatmo.com

This last I suspect will be Changing in the future.
But for now it works like this
Made the redirect URi empty in the app
Used the url: https://api.netatmo.com/oauth2/authoriz ... ead_camera
Then I end up in the front page of my Domoticz
This still have me the
Error: Netatmo2: Invalid/no data received...
Even when I enter the <SOME_CODE> from that URL in the password field in the hardware page.
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

you can try the solution mention by @dgilbert2

But Do you have all these devices in your account ?
read_station
read_thermostat
write_thermostat
read_homecoach
read_smokedetector
read_presence
read_camera

I find it strange that you only use the read_scope and not the write_scope or access_scope

kind regards
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

Shortened the url to only read_station, since I only have a weather station.
Disabled the Netatmo and rebooted.
Let's see tomorrow.
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

DomoFlits wrote: Saturday 15 March 2025 23:03 Shortened the url to only read_station, since I only have a weather station.
Disabled the Netatmo and rebooted.
Let's see tomorrow.
This did not help. Still:
Error: Netatmo2: Invalid/no data received...
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

And if you make a new app on dev.netatmo ?

The url must only contain the scopes for the devices you have.
So for only the weatherstation is read_station correct.
And after the ip:port need to be a /

https://api.netatmo.com/oauth2/authoriz ... ad_station
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

homeJLB wrote: Sunday 16 March 2025 8:54 And if you make a new app on dev.netatmo ?

The url must only contain the scopes for the devices you have.
So for only the weatherstation is read_station correct.
And after the ip:port need to be a /

https://api.netatmo.com/oauth2/authoriz ... ad_station
Really a / or a %2F ?
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

I believe it must be /

so like

Code: Select all

https://api.netatmo.com/oauth2/authorize?client_id=<CLIENT_ID>&redirect_uri=http://192.168.1.3:8080/&state=teststate&scope=read_station
kind regards
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

on second thought there is a url encode on the request;

Code: Select all

https://api.netatmo.com/oauth2/authorize?client_id=<MY_CLIENT_ID>&redirect_uri=http%3A%2F%2F192.168.1.3%3A8080%2F&state=teststate&scope=read_station
kind regards
lacha07
Posts: 3
Joined: Tuesday 16 November 2021 11:33
Target OS: -
Domoticz version:
Contact:

Re: Netatmo authentication changes Oct 2022

Post by lacha07 »

Same issue on my side since March 13thg.
I m with a docker solution on RP5
I try to upgrade domoticz (16576)
remove then add the netatmo material
Create a new app in netatmo
and I m still getting the 2025-03-16 15:10:11.915 Error: test: Invalid/no data received (refresh tokens)...
If someone know a way to get it back I m open
Other wise I did a down grade to 2025-beta.16498 and it works https://hub.docker.com/layers/domoticz/ ... 866ae8fb58
Regards
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

Did you try to add

Code: Select all

 network_mode: host 
To the docker compose?
DomoFlits
Posts: 39
Joined: Thursday 06 October 2016 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Bld16583
Location: The Netherlands
Contact:

Re: Netatmo authentication changes Oct 2022

Post by DomoFlits »

homeJLB wrote: Sunday 16 March 2025 10:31 on second thought there is a url encode on the request;

Code: Select all

https://api.netatmo.com/oauth2/authorize?client_id=<MY_CLIENT_ID>&redirect_uri=http%3A%2F%2F192.168.1.3%3A8080%2F&state=teststate&scope=read_station
kind regards
still no luck on a new app on dev.netatmo.com.
stil the same error: Error: Netatmo2: Invalid/no data received...

did anyone have any luck with the new "Netatmo hardware" on https://github.com/domoticz/domoticz/tr ... t/hardware
is the "token generator" at the app at dev.netatmo.com used by anyone?
homeJLB
Posts: 109
Joined: Tuesday 16 October 2018 23:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Belgium
Contact:

Re: Netatmo authentication changes Oct 2022

Post by homeJLB »

maybe you need an hour rest to try again.
This last url look OK to me.
In the beta this is all handled by the code.

For the token generator the domoticz hardware is not designed for this.

But maybe you want to use a script for authentication.
dgilbert2
Posts: 95
Joined: Wednesday 16 August 2017 8:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: UK
Contact:

Re: Netatmo authentication changes Oct 2022

Post by dgilbert2 »

From my own findings this is where I got to, broken down into the 3 types of error messages:

1) "Error: Netatmo: Invalid/no data received..." Changing App, Client id, password/token, Domoticz Beta does not clear this error. Only solution seemed to be restoring a previous backup of the Domoticz database. How far back you need to go to resolve this error is not clear! Once this error is cleared, I was then able to restore back to my latest database.

2) "Error: Netatmo: Error connecting to Server..." I needed to setup a new "app" in dev.netatmo.com and enter the details into the Domoticz Hardware tab to clear this.

3) "Error: Netatmo: No access granted, check credentials..." Nearly there! Re-enter into Domoticz Hardware tab latest login / token detail as was always needed by Netatmo.

So depending on the error will give a guide of the next steps, which may well be in the error order above ;-)

Hopefully the Domoticz developers will update the Netatmo plugin in line with Netatmo's new security "features" soon.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest