Preamble:
1 -
The following tutorial fix the authentication issue of Domoticz to authenticate Netatmo's devices.
Below, you can see how the errors appears in the logs:
2023-12-16 12:54:18.497 Error: Netatmo di : No Access granted, check username/password
*** Procedure ***
1 - Required Domoticz version 2023.2 (Build 15731) or above
2 - Log on to the website https://dev.netatmo.com/ and authenticate with the same credentials as your My.Netatmo account
3 - Click, in the upper right corner, "My apps"
4 - Press "Create", button and fill in the required fields.
(App name, Description and Data protection officer name and Data protection officer mail)
5 - Accept the terms and conditions and click on Save
6 - Enter in the "redirect URI" field, the value –> http://localhost/netatmo
Copy in a Notepad the values inside Client_ID and Client_secret, they will be required later.
Press the Save button.
7 - Open Domoticz web portal and select "Hardware" under "Settings" menù
8 - Select "Netatmo Weather Station" who has the authentication problems.
Type inside "Username" textbox the following string:
Client_ID:Client_secret
N.B.:
There is a Semicoloum ( : ) between Client_ID and Client_secret
9 - The password, is a token that must be generated via Netatmo's API.
Open a browser page and put the followind URL, replacing <Client_ID> with the previously saved value.
https://api.netatmo.com/oauth2/authorize?client_id=<CLIENT_ID>&redirect_uri=http%3A%2F%2Flocalhost%2Fnetatmo&state=teststate&scope=read_station%20read_thermostat%20write_thermostat%20read_homecoach%20read_smokedetector%20read_presence%20read_camera
10- Accept and provide permission on the page that will opened
11 - A blank page will open.
You have to copy in the URL bar, what appears after after "Code="
12 - Enter the value you have just copied, in the "Password" field on Domoticz web portal
N.B.:
1 - Steps 10, 11 and 12, must be performed quickly (within about 30 seconds), otherwise the token will be unusable.
2 - In case the authentication issue appears again, it's enough regenerate a new token following steps 9, 10 and 11 and not the whole procedure.