Testers needed for Netatmo climate (multiple thermostats or valves)

Strange I shouldn’t have two homes.
Thank you for pointing that and for the time you are spending on this !!

Let’s make a first try. Please try to download the following:

Replace the file: config/deps/lib/python3.6/site-packages/smart_home/Thermostat.py, remove the directory /config/deps/lib/python3.6/site-packages/smart_home/__pycache__/, and restart your HA to see what will happen.

Thanks!

Ok, the Key Error is now on rooms :

 Log Details (ERROR)
Thu Dec 20 2018 23:03:20 GMT+0100 (heure normale d’Europe centrale)

Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climate/netatmo.py", line 74, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/config/custom_components/climate/netatmo.py", line 327, in get_room_ids
    if self.setup():
  File "/config/custom_components/climate/netatmo.py", line 338, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/config/deps/lib/python3.6/site-packages/smart_home/Thermostat.py", line 127, in __init__
    for r in self.rawData['rooms']:
KeyError: 'rooms'

Not surprising, since that home is only for presence cameras. Now please keep the previous changed Thermostat.py and update config/custom_components/climate/netatmo.py with the new revision of:

To be safe, remove config/custom_components/climate/__pycache__ and restart HA.

Hmmm looks like same error :

Log Details (ERROR)
Fri Dec 21 2018 10:38:44 GMT+0100 (Central European Standard Time)

Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/climate/netatmo.py", line 74, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/config/custom_components/climate/netatmo.py", line 327, in get_room_ids
    if self.setup():
  File "/config/custom_components/climate/netatmo.py", line 338, in setup
    self.homestatus = pyatmo.HomeStatus(self.auth, home=self.home)
  File "/config/deps/lib/python3.6/site-packages/smart_home/Thermostat.py", line 127, in __init__
    for r in self.rawData['rooms']:
KeyError: 'rooms'

Hmm, it was because your two homes share the same name…

Now, please update config/deps/lib/python3.6/site-packages/smart_home/Thermostat.py to the new revision, clear the cache, and restart HA to try again.

In the train on an Android phone with termius to do copy/paste in vi but after a restart it seems to work !

All valves an thermostat detected and they seems to have the correct parameters.

I will play more with it when I am at home but thank you again for this tremendous work !!!

Cool! I am happy we found this hidden issue and got it fixed. Thank you for reporting this!

**EDIT : NEVERMIND, it’s just takes some times to update **
** NO ISSUE SO FAR :slight_smile: **

Hi,

About to switch off the radiators when windows is opened, you used automation or script?

thanks

As an automation.
Be aware, that since the last update the operation modes changed!

You can find an example of my window automation in one of my posts above.

Latly I often face the issue that my netatmo component(s) does not intialisize at start up of home assistant.
Some times both climate and sensor data are affected. Sometimes only one of both. And I already have the new component (no netatmo2 any more).

Do you guys face the same issue?
Only thing that solves my issue for now is to restart it until both components are connected. This usally takes 2-3 tries.

Will you update here when it’s merged into DEV branch ? So I can delete the files you provided it to me check if it’s still working.

Regards,

Laurent

Sure. All submitted, all checks passed. But since it is marked as “breaking change”, I think it may take longer to merge.

Unfortunately I missed this. realized today that my automations stopped working. So if you are using an automation that turns back to schedule you have to change it to auto.

Working example:

- alias: Window open
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: binary_sensor.wz
    to: 'on'
  action:
    service: climate.set_temperature
    data:
      entity_id: climate.netatmo_wz
      temperature: 12

- alias: window closed
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: binary_sensor.wz
    to: 'off'
  action:
    - service: climate.set_operation_mode
      data:
        entity_id: climate.netatmo_wz
        operation_mode: auto

Do you have any advice on sensors to detect opened windows ?

When I bought the valve, netatmo advertised this feature but it seems to take a long time before being implemented … They even have a doc page : https://www.netatmo.com/en-gb/helpcenter/energy/3/how-does-the-open-window-sensor-work/340

I also found some people here detecting opened windows from the change of temperature but having a sensor sounds fun to me as it’s something else to add to my HA setup :slight_smile:

Depending on how much time you want to spend tinkering I would recommend aqara door sensors with two options:

Option 1A) If you just want it to work and don’t mind that your data goes threw chinese servers, you could use aqara door sensors with their gateway.
Sensor:


Gateway:

They also have a homekit (more expensive; apple) variant now out of the box, but with home assistant you don’t need this because of the homekit component.

Option 1B) Else** you can spent some more time setting up zigbee2mqtt and add those aqara sensors to your local-only zigbee network (and many more zigbee devices).
https://koenkk.github.io/zigbee2mqtt/

Option 2) You could also use gigaset elements door sensors (not zigbee; siemens alarm system) if you use this project.

Option 3) other options that I don’t know/use :wink:

Thank you very much ! I will have a look at the tinkering option :wink:

I also want to mention that I find it ridiculous from netatmo that they did not implement that promised window feature yet.

We found our own solution here now thanks to @Baosong_Shan, but yeah they promise this to be released “soon” since the devices came out last year. Also contacted the support about this several times. But now I’m not interested in this any more. Their temperature sensor based feature will note beat the window sensor.

Hopefully the implementation of netatmo (in future) will not interfer with the home assistant automation. Hopefully we will be able to turn off that feature.