Adding support for Netatmo Thermostat

Hi @gieljnssns, hitting a brick wall so apologies for calling you out by name (hope it’s OK)
I have two Relays, each with one thermostat attached. I can only get HA to detect one of them (the first one I initialised). Any idea how I can specify a particular relay and/or thermo (the config in the documentation does not work).
As it stands my configuration.yaml shows as below (which is “correct”) but still only detects the other relay (I have Relay_Up, which was the first one I initialised - a network scan see this as “Netatmo Relay” and the other (Relay_Down) as “Netatmo Relay-2”)

Know I can rewire them, but would be nice to solve programitically…so I can see Downstairs instead of Upstairs…

climate:
  platform: netatmo
  relay: Relay_Down
  thermostat:
    - ThermoDownstairs

(running HASSIO on Pi3 if that helps)

1 Like

You can try

netatmo:
 discovery: False

Cheers, thanks for coming back to me. Have already set discovery:false for the netatmo component (and added everything manually for Weather & Climate/Heating) but no joy on the Climate. No matter what configuration I use (with the current one being in the previous post) I get the Upstairs Relay/Thermo only.when I specify the other Realy/Thermo combination.

From what I read in the thread you seem to have solved this issue for another user so was hopeful of a quick fix :slight_smile:
In terms of pointing me in the right direction can you tell me if the various netatmo.py and thermostat.py files you’ve linked to are now in the main HASSIO version (0.56 at the moment) or are they still alternate options i can try?

@Gav_in
If someone want to test something,

make a custom_components folder in your config folder and put this file in there.

In the custom_components folder make another folder, climate and put this file in there

2 Likes

I can check, What is it? Solving using multiple Netatmo?

What is working and what not.

I can check tomorrow morning (10 hours from now)

Did now, on HASS.IO 0.57.2.

Now it shows all values fine (of all multiple thermostat).

But when I click to change the temperature, it does change in the HASS interface, but the command is not executed

any errors in the log?

no errors in the log

I think it sends the service correctly just to one of them, not the other: now I can’t test this because the one that was working I have it off (the relay)

sorry, bit late to get back to you here

I’ve loaded the two files into HA as you outline and bingo…everything seems pretty much to be working as it should :smile:
I can now see and operate both my thermostats as expected which is great.

Testing them both seem to work fine - from HA I can set them Away, increase Temp (which calls boiler), decrease Temp (and shut off boiler).
Only thing I can see amiss is that the current target temp on my second thermo is detected as 0. (This is the thermo working off the second relay (Netatmo Relay-2) so maybe there is a issue there)

you do?

I can’t, the service is called but the temperature does NOT change

Yeah, all working fine for me here
I have a two relay, two thermo setup and both working as per my previous post. Changing Temp on HA will trigger the relay on (and boiler too) - this is reflected on the Netatmo App (on Android) and the thermostat too, so all good here

1 Like

Hi, I saw you have posted some updates and I have retried your custom_components/climate/netatmo.py and custom_components/netatmo.py and now no thermostats are displayed in HA and i have this error:

2017-11-29 11:41:52 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
File “/usr/local/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/local/lib/python3.4/asyncio/tasks.py”, line 393, in wait_for
return fut.result()
File “/usr/local/lib/python3.4/asyncio/futures.py”, line 274, in result
raise self._exception
File “/usr/local/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.4/site-packages/homeassistant/components/climate/netatmo.py”, line 47, in setup_platform
for module_name in data.get_module_names():
File “/usr/local/lib/python3.4/site-packages/homeassistant/components/climate/netatmo.py”, line 155, in get_module_names
self.update()
File “/usr/local/lib/python3.4/site-packages/homeassistant/util/init.py”, line 306, in wrapper
result = method(*args, **kwargs)
File “/usr/local/lib/python3.4/site-packages/homeassistant/components/climate/netatmo.py”, line 170, in update
self.target_temperature = self.thermostatdata.setpoint_temp
AttributeError: ‘ThermostatData’ object has no attribute ‘setpoint_temp’

Oups /climate/netatmo.py wasn’t copied in the custom folder! Now all seems working fine!
thanx!!!

@rletourneur

How is this with your thermostat?

After some tests I effectively when I click to change the temperature or select the away_mode, it does change in the HASS interface, but the command is not executed and a few time after hass climate values return in their previous state!
I try to see to work directly with netatmo python scripts api but I have to see why after my acces token doesn’t have the good scope right this code is you can find it on netatmo at: https://dev.netatmo.com/en-US/resources/technical/samplessdks/codesamples#getthermostatsdata

#This code sample uses requests (HTTP library)
import requests

params = {
‘access_token’: ‘[YOUR_ACCESS_TOKEN]’,
‘device_id’: ‘[YOUR_DEVICE_ID]’
}

try:
response = requests.post(“https://api.netatmo.com/api/getthermostatsdata”, params=params)
response.raise_for_status()
data = response.json()[“body”]
except requests.exceptions.HTTPError as error:
print(error.response.status_code, error.response.text)

yes …

Hi, could you tell me why after the last HA upgrade 0.59 all the Netatmo climate are not displayed now. Do I have to delete some files in the deps folder? The two netatmo in the custom_components are always presents!