Netatmo thermostat support Topic is solved

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

joske522
Posts: 18
Joined: Friday 19 September 2014 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Netatmo thermostat support

Post by joske522 »

Hi guys,

Does anyone know how to integrate the Netatmo thermostat into Domoticz?

There is an API available: https://dev.netatmo.com/doc/devices/thermostat

Thanks in advance!
leplan73
Posts: 4
Joined: Sunday 31 August 2014 22:36
Target OS: Linux
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by leplan73 »

Hi,

Working on a native support !

I will keep you posted

Seb
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Netatmo thermostat support

Post by gizmocuz »

joske522 wrote:Hi guys,

Does anyone know how to integrate the Netatmo thermostat into Domoticz?

There is an API available: https://dev.netatmo.com/doc/devices/thermostat

Thanks in advance!
Send you a PM
Quality outlives Quantity!
joske522
Posts: 18
Joined: Friday 19 September 2014 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by joske522 »

Thanks guys! :-)
umbr3lla
Posts: 4
Joined: Tuesday 14 July 2015 12:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by umbr3lla »

Hi, did you manage to get your Netatmo Thermostat linked with Domoticz. I also have a netatmo thermostat and would like to the same.

Any help would be great.

Thanks
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Netatmo thermostat support

Post by gizmocuz »

Just add it from the hardware settings, and supply your username/password
Quality outlives Quantity!
mcflyyy
Posts: 4
Joined: Sunday 05 April 2015 11:57
Target OS: -
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by mcflyyy »

Any news on native support ?
umbr3lla
Posts: 4
Joined: Tuesday 14 July 2015 12:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by umbr3lla »

gizmocuz wrote:Just add it from the hardware settings, and supply your username/password
This is only for if you have Netatmo Weatherstation.

Still waiting support for the thermostat device.
toutazimuth
Posts: 16
Joined: Tuesday 29 September 2015 19:20
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by toutazimuth »

Hi
No news about the support of Netatmo thermostat ?
I'm very interesting about this support by Domoticz, for this new heating season.
Btw, the Domoticz support of the Netatmo weather station is so perfect ;)
Thx
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Netatmo thermostat support

Post by gizmocuz »

If someone can send me PM with there login details, i can have a look at implementing support for this
Quality outlives Quantity!
toutazimuth
Posts: 16
Joined: Tuesday 29 September 2015 19:20
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by toutazimuth »

For me, this is the same account and password for netatmo station weather and netatmo thermostat.
For information, the team netatamo weather station and Domoticz, is currently perfect.

Thx for your amazing work
Mommeke
Posts: 1
Joined: Tuesday 10 November 2015 10:42
Target OS: Linux
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by Mommeke »

Did you get an account login already from somebody, to work on implementation?
If not, I'm prepared to provide mine...

For now I'm controlling my netatmo thermostat through shell scripts (via domotiga and smartvisu)
It seems to work although I'm not using the refreshtoken (cause I'm not sure how), so I think the authentication part is not the best way.
Also I'm not a bash nor json expert. So I'm sure this could be written a lot better. But it all works...
Sharing this anyway, maybe it helps people to do more with their thermostat. It's an example how the api can be called.
Feel free to comment and improve.

client_id and client_secret can be retrieved from dev.netatmo.com when you 'create an app'
device_id and module_id were found in the data reply (written to /tmp/netatmo_data)
email and pass are the ones used for logging in to the thermostat webinterface.
Obviously I replaced the real values with dummy ones for this post.


away.sh: execute 'away.sh On' to enable away mode on the thermostat

Code: Select all

#!/bin/bash
#request token
curl -s -d "grant_type=password&client_id=12345&client_secret=6789&[email protected]&password=somepassword&scope=read_thermostat write_thermostat" "https://api.netatmo.net/oauth2/token" >/tmp/netatmo_token
#extract token values
access=`jq -r '.access_token' /tmp/netatmo_token`
refresh=`jq -r '.refresh_token' /tmp/netatmo_token`
#use token to request data
curl -s -d "access_token=$access" "https://api.netatmo.net/api/getthermostatsdata" >/tmp/netatmo_data
#extract data values
#this line seems to work best if not set to manual
setpoint=`jq -r '[.body.devices[].modules[].measured.setpoint_temp] | unique | .[]' /tmp/netatmo_data`
#this line seems better when set to manual mode, else the step up or down is calculated with a previous set value instead of the most current value. still have to figure this out better.
#setpoint=`jq -r '[.body.devices[].modules[].setpoint.setpoint_temp] | unique | .[]' /tmp/netatmo_data`
temp=`jq -r '[.body.devices[].modules[].measured.temperature] | unique | .[]' /tmp/netatmo_data`
mode=`jq -r '[.body.devices[].modules[].setpoint.setpoint_mode] | .[]' /tmp/netatmo_data`
# echo some values
if [ "$mode" == "away" ]
then status="On"
else
status="Off"
fi
echo "$status"
echo "$setpoint"
echo "$temp"
#switch
if [ "$1" == "On" ]
then
#set to away
curl -s -d "access_token=$access&device_id=70:ee:50:12:34:56&module_id=04:00:00:12:34:56&setpoint_mode=away" "https://api.netatmo.net/api/setthermpoint" >/dev/null
fi
replace setpoint_mode=away with setpoint_mode=program for normal operation (follows your schedule) or with setpoint_mode=hg for antifrost. Adjust the

Code: Select all

if [ "$mode" == "away" ]
line accordingly.


this script sets the desired temperature 0,5 degrees celcius higher for one hour: execute as "up.sh On"

Code: Select all

#!/bin/bash
#request token
curl -s -d "grant_type=password&client_id=12345&client_secret=6789&[email protected]&password=somepassword&scope=read_thermostat write_thermostat" "https://api.netatmo.net/oauth2/token" >/tmp/netatmo_token
#extract token values
access=`jq -r '.access_token' /tmp/netatmo_token`
refresh=`jq -r '.refresh_token' /tmp/netatmo_token`
#use token to request data
curl -s -d "access_token=$access" "https://api.netatmo.net/api/getthermostatsdata" >/tmp/netatmo_data
#extract data values
#setpoint=`jq -r '[.body.devices[].modules[].measured.setpoint_temp] | unique | .[]' /tmp/netatmo_data`
setpoint=`jq -r '[.body.devices[].modules[].setpoint.setpoint_temp] | unique | .[]' /tmp/netatmo_data`
temp=`jq -r '[.body.devices[].modules[].measured.temperature] | unique | .[]' /tmp/netatmo_data`
mode=`jq -r '[.body.devices[].modules[].setpoint.setpoint_mode] | .[]' /tmp/netatmo_data`
tijd=`jq -r '[.body.devices[].modules[].measured.time] | unique | .[]' /tmp/netatmo_data`
# echo some values
if [ "$mode" == "manual" ]
then status="On"
else
status="Off"
fi
echo "$status"
echo "$setpoint"
echo "$temp"
#switch
if [ "$1" == "On" ]
then
#calculate new temp
step="0.5"
newtemp=`echo "($setpoint + $step)" | bc`
#endtime
end=`date -d '+1 hour' "+%s"`
#increase temp
curl -s -d "access_token=$access&device_id=70:ee:50:12:34:56&module_id=04:00:00:12:34:56&setpoint_mode=manual&setpoint_temp=$newtemp&setpoint_endtime=$end" "https://api.netatmo.net/api/setthermpoint"
fi
to lower the temperature instead, you can use almost the same script but replace the + with a -

Code: Select all

newtemp=`echo "($setpoint - $step)" | bc`
more options and documentation at https://dev.netatmo.com/doc
Last edited by Mommeke on Tuesday 10 November 2015 23:43, edited 1 time in total.
DomoArie
Posts: 8
Joined: Tuesday 10 November 2015 19:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Netherlands
Contact:

Re: Netatmo thermostat support

Post by DomoArie »

Hi, I am wondering where this very good start of getting Netatmo thermostat integrated into Domoticz is at the moment.
I am considering buying this piece, but would like to steer it from my RBpi2 with Domoticz.
@Mommeke did put some interesting scripting material in this topic, but I noticed @gizmocuz was also active here... Any news and advise?
sbebrone
Posts: 2
Joined: Wednesday 11 November 2015 7:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by sbebrone »

Hi,

I've submitted a PR to support this hardware last night:
https://github.com/domoticz/domoticz/pull/188

Following features are supported:
  • Temperature sensor
    Set point switch
Should be easy to add support for "away" mode switch.

Hope it'll get to the main repo soon. Feeback are more than welcome :)

Gtz,
Stéphane.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Netatmo thermostat support

Post by gizmocuz »

sbebrone wrote:Hi,

I've submitted a PR to support this hardware last night:
https://github.com/domoticz/domoticz/pull/188

Following features are supported:
  • Temperature sensor
    Set point switch
Should be easy to add support for "away" mode switch.

Hope it'll get to the main repo soon. Feeback are more than welcome :)

Gtz,
Stéphane.
Hello Stephane,

Thank you very much for the hard work, left a bit feedback on github

Is it possible to send me a PM with the credentials so i can test it ? I think i want to merge this code in the existing netatmo class, and maybe if needed add a special constructor so we can differentiate it
Quality outlives Quantity!
course66
Posts: 28
Joined: Monday 10 August 2015 23:51
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3202
Location: Italy
Contact:

Re: Netatmo thermostat support

Post by course66 »

Hi gizmocuz,

if you need user/password to test netatmo thermostat over domoticz I can provide it to you.

ciao,
gabriele
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Netatmo thermostat support

Post by gizmocuz »

course66 wrote:Hi gizmocuz,

if you need user/password to test netatmo thermostat over domoticz I can provide it to you.

ciao,
gabriele
I am also working on this with Stephane, but yes this would help a lot (double testing), send you a PM

Thanks in advance
Quality outlives Quantity!
qqlapraline
Posts: 12
Joined: Saturday 11 January 2014 16:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Netatmo thermostat support

Post by qqlapraline »

I own a Netatmo thermostat and would be happy to help.
I guess I have to explicitely get the sources, recompile and run it ?
If this is the case, it will want for next weekend or the week after.

As I understand this is done as a new hardware, would that be possible to merge to the trunk so that I can't get this and try it ?
Regards.

QQ.
3 Raspberry PI (Raspbian + Rfxcom, teleinfo or mysensors gateway)
Bunch of OS THGR810n (5)
Some THN122
1 WGR800 and PCR800
Some BMP085
Bunch of TS34C (4)
Bunch of DIO plugs (3)
Teleinfo
Various mysensors devices (Temp, Hygro, ...)
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Netatmo thermostat support

Post by gizmocuz »

I think it should work now in the latest beta version
Quality outlives Quantity!
course66
Posts: 28
Joined: Monday 10 August 2015 23:51
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3202
Location: Italy
Contact:

Re: Netatmo thermostat support

Post by course66 »

Yes, it works: thermostat temperature, away switch and set-point (only minor issues with set-point)

ciao,
gabriele
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest