Netatmo: Difference between revisions

From Domoticz
Jump to navigation Jump to search
Walter vl (talk | contribs)
m beta - 2024.1
 
No edit summary
Line 1: Line 1:
NETATMO Thermostat & Thermostatic radiator valve
<span id="Netatmo"></span>
= About Netatmo Hardware =


Features supported:
Features supported:
* Temperature sensor,
* Set point switch,
* "away" mode switch,
* Heating Status Switch,
* Temperature & Humidity Sensor,
* Barometer Sensor,
* Rain Sensor,
* Air QUality Sensor,
* Sound Sensor,
* Wind Sensor,
* Alert Sensor for Security Events,


*Temperature sensor
*Set point switch
*"away" mode switch


Install<span> </span>:
<span id="Install :"></span>
= Install =


*Enable "Accept new Hardware Devices" in Setup/Setting
Enable "Accept new Hardware Devices" in Setup/Setting
*Add a "Netatmo" Hardware in Setup/Hardware. Input your Netatmo login and password. 5 minutes Data Timeout(not sure about that).
Add a "Netatmo" Hardware in Setup/Hardware. Input your Netatmo login and password. 5 minutes Data Timeout(not sure about that).
*Turned the Thermostat up and down via the iPhone app and it showed up in Domoticz!
Turned the Thermostat up and down via the iPhone app and it showed up in Domoticz!
*In Setup/Devices, display the "not used" and "add" the 3 news devices.
In Setup/Devices, display the "not used" and "add" the new devices.
[https://forum.domoticz.com Forum Domoticz].


Forum thread:
<span id="Authentication"></span>
[https://www.domoticz.com/forum/viewtopic.php?f=31&t=6846#p45449]
= Authentication =
 
New Netatmo Authentication method implemented from 2024.1
 
'''New Netatmo Authentication method implemented from 2024.1'''


step 1:
step 1:
Line 24: Line 33:
Setup an App under MyApps in the Netatmo developers portal (https://dev.netatmo.com/)
Setup an App under MyApps in the Netatmo developers portal (https://dev.netatmo.com/)


The Redirect_URI has to contain
The Redirect_URI has to contain;
<code><nowiki>http://localhost/netatmo</nowiki></code>
""
 
Once configured correctly, the Client_ID and Client_Secret will be generated and shown.
Once configured correctly, the Client_ID and Client_Secret will be generated and shown.


Line 32: Line 42:
In the domoticz hardware setup:
In the domoticz hardware setup:


*Create/modify the Netatmo hardware
Create/modify the Netatmo hardware
the Client ID should contain <client_id>
the Client Secret should contain <client_secret>
Then Select the Desired Scope compatible with your Devices.
 
Then Click on the Login Button.
 
This brings you to the My Netatmo page where you have to identify yourself and are asked for permission to grant access to certain devices and types (based on the scope provided).
 
Confirm the access to the Devices.
After confirmation, your browser will try to redirect you.
 
Then your Hardware is added or you can press 'ADD'.
 
if you take too long and Domoticz says it cannot login, error: No access granted, check credentials...
 
Please try again....
 
 
<span id="supported Devices"></span>
= supported Devices =
At the moment, the supported Devices are;
 
* Weather station,
* Netatmo thermostat,
* Netatmo Valves,
* Homecoach,
* CO2detector,
* Smokedetector,
* Presence camera (Only Events),
* Welkom camera  (Only Events),
* Door Tag,
 
<span id="settings"></span>
= Settings =
 
Settings for Netatmo are found in the Domoticz GUI: '''Name: &gt; Client ID: &gt; Client Secret: &gt; Scope:''':


*the username should contain <client_id>:<client_secret>
* '''Name''': This is the name you wan't for your Hardware module.
*  '''Log level''',
*  '''Data Timeout''',
** '''Client ID''': Client ID obtained from Netatmo Development Site
** '''Client Secret''': Client Secret obtained from Netatmo Development Site.
** '''Scope''': Select here the Scope for your Netatmo Devices, make sure you only select scopes compatible with your devices!


*the password should contain the retrieved <SOMECODE> as instructed below:
<span id="troubleshooting"></span>
= Troubleshooting =


To retrieve the code (a.k.a. authorisation_code), use the browser and type the following URL. Make sure to fill in the <YOURCLIENTID> with your clientid!
So, you think if you have done everything correctly but things do not work (in some way) as you expected. Here are a couple steps you can do to find the cause.
<code><nowiki>https://api.netatmo.com/oauth2/authorize?client_id=</nowiki><YOURCLIENTID>&redirect_uri=http%3A%2F%2Flocalhost%2Fnetatmo&state=teststate&scope=read_station%20read_thermostat%20write_thermostat%20read_homecoach%20read_smokedetector%20read_presence%20read_camera</code>
This URL brings you to the My Netatmo page where you have to identify yourself and are asked for permission to grant access to certain devices and types (based on the scope provided).


After confirmation, your browser will try to redirect you to a page it cannot find so you will get an error. But the URL of that page is visible in the browser and looks like
<span id="turn-on-debug-logging"></span>
<code><nowiki>http://localhost/netatmo?state=teststate&code=</nowiki><SOMECODE></code>
=== Turn on debug logging ===
You need to copy this SOMECODE as the password in the domoticz hardware screen. The <SOMECODE> you retrieved is only valid for a few minutes, so if you take too long and Domoticz says  it cannot login, error: No access granted, check credentials...
Edit your /etc/systemd/system/domoticz.service file to;


Please retrieve a new code and be a little quicker....
ExecStart=/home/domoticz/domoticz -www 8484 -sslwww 8443 -log "/var/log/domoticz.log" -loglevel all -debuglevel normal,hardware,received,eventsystem
WorkingDirectory=/home/domoticz


NOTE:


At the moment, the scopes are fixed to
=== Get help ===


*read_station
The Domoticz forum is a great resource for help and solutions. Check the [https://forum.domoticz.com Forum].
*read_thermostat
*write_thermostat
*read_homecoach
*read_smokedetector
*read_presence
*read_camera


<br />
<span id="wiki Netamo Domoticz."></span>
= History [https://wiki.domoticz.com/Netatmo link to wiki] =

Revision as of 09:29, 1 January 2025

About Netatmo Hardware

Features supported:

  • Temperature sensor,
  • Set point switch,
  • "away" mode switch,
  • Heating Status Switch,
  • Temperature & Humidity Sensor,
  • Barometer Sensor,
  • Rain Sensor,
  • Air QUality Sensor,
  • Sound Sensor,
  • Wind Sensor,
  • Alert Sensor for Security Events,


Install

Enable "Accept new Hardware Devices" in Setup/Setting Add a "Netatmo" Hardware in Setup/Hardware. Input your Netatmo login and password. 5 minutes Data Timeout(not sure about that). Turned the Thermostat up and down via the iPhone app and it showed up in Domoticz! In Setup/Devices, display the "not used" and "add" the new devices. Forum Domoticz.

Authentication

New Netatmo Authentication method implemented from 2024.1

step 1:

Setup an App under MyApps in the Netatmo developers portal (https://dev.netatmo.com/)

The Redirect_URI has to contain; ""

Once configured correctly, the Client_ID and Client_Secret will be generated and shown.

step 2:

In the domoticz hardware setup:

Create/modify the Netatmo hardware the Client ID should contain <client_id> the Client Secret should contain <client_secret> Then Select the Desired Scope compatible with your Devices.

Then Click on the Login Button.

This brings you to the My Netatmo page where you have to identify yourself and are asked for permission to grant access to certain devices and types (based on the scope provided).

Confirm the access to the Devices. After confirmation, your browser will try to redirect you.

Then your Hardware is added or you can press 'ADD'.

if you take too long and Domoticz says it cannot login, error: No access granted, check credentials...

Please try again....


supported Devices

At the moment, the supported Devices are;

  • Weather station,
  • Netatmo thermostat,
  • Netatmo Valves,
  • Homecoach,
  • CO2detector,
  • Smokedetector,
  • Presence camera (Only Events),
  • Welkom camera (Only Events),
  • Door Tag,

Settings

Settings for Netatmo are found in the Domoticz GUI: Name: > Client ID: > Client Secret: > Scope::

  • Name: This is the name you wan't for your Hardware module.
  • Log level,
  • Data Timeout,
    • Client ID: Client ID obtained from Netatmo Development Site
    • Client Secret: Client Secret obtained from Netatmo Development Site.
    • Scope: Select here the Scope for your Netatmo Devices, make sure you only select scopes compatible with your devices!

Troubleshooting

So, you think if you have done everything correctly but things do not work (in some way) as you expected. Here are a couple steps you can do to find the cause.

Turn on debug logging

Edit your /etc/systemd/system/domoticz.service file to;

ExecStart=/home/domoticz/domoticz -www 8484 -sslwww 8443 -log "/var/log/domoticz.log" -loglevel all -debuglevel normal,hardware,received,eventsystem WorkingDirectory=/home/domoticz


Get help

The Domoticz forum is a great resource for help and solutions. Check the Forum.

History link to wiki