Testers needed for Netatmo climate (multiple thermostats or valves)

Hi, I’d a Raspberry Pi3 B+ with the 0.84.2 version of Hassio.

I’d created the custom_components in config directory and i’d put the netatmo2.py (Custom climate component for testing new Netatmo Energy API on HA +0.72 · GitHub) inside, then i’d created the climate folder in custom_components and i’d saved inside the netatmo2.py (Custom climate component for testing new Netatmo Energy API on HA +0.72 · GitHub).

After this I’d modified the configuration.yaml file as following:

    netatmo:
      api_key: first_api_key
      secret_key: first_secret_key
      username: my_netatmo_user
      password: my_netatmo_password
      discovery: true

    netatmo2:
      api_key: second_api_key
      secret_key: second_secret_key
      username: my_netatmo_user
      password: my_netatmo_password
      discovery: false

  climate:
    - platform: netatmo2

After saving the configuration file, before restarting the server, i’d checked the file with hassio validing system and result this error:

Invalid config for [netatmo2]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 26). Please check the docs at _https://home-assistant.io/components/netatmo2/

when I restarting the server i can see the thermostat temperature, but i cannot see the valves and the sensors on the weather station.
Can you help me?

Do you use the secret.yaml?
if you use it, then you have to have to change you configuration like this:

netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
#  discovery: false

netatmo2:
  api_key: !secret netatmo2_api_key
  secret_key: !secret netatmo2_secret_key
  username: !secret netatmo2_username
  password: !secret netatmo2_password
  discovery: False

try the script from here.
I think you can set HG with it aswell.

Sorry, but i’m very newest on Hassio… How can check if I use the secret.yaml? And why if i’ll use only netatmo i can see the thermostat and the weather sensors but not valves?

Hey,

Just updated to 0.84.3 + last version on github and i no longer have this problem of 127.5°c through homekit. So i guess it s perfect for me.

Thx

Hi, pyatmo library commit has been merged (release 1.5), so now I can release a testing version which has been submitted to HA dev.

You have to replace custom_components/netatmo.py with:

And also replace custom_components/climate/netatmo.py with:

And, this is to replace the netatmo component, so you have to change your configuration file. You can use automatic discovery by just putting (modify accordingly if you are not using secrets):

netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_user
  password: !secret netatmo_pass

If you want to specify the home and room list, you should set discovery to False and put:

climate:
  platform: netatmo
  home: home_name
  rooms:
    - room_name1
    - room_name2

Please also be advised that the names of the operation modes have been changed to make a better adoption with lovelace UI.

45
From left to right, the 6 icons mean: schedule (auto), manual, away (eco), frost guard(cool), max (heat), off.
57

2 Likes

So with this we geht rid of netatmo2, right?

You can first make sure the new one works for you and then remove netatmo2.

Great news!
I already added it.
The first issue I have, is that all thermostats are doubled. But this doesn’t have anything todo with your improvments, because my netatmo presences is listed two times since the begining.
So thanks for your development!

Perfect, now i can see all the parameter.

Only one question, every how much time refresh the valves temperature and states?

I had this “doubled” issue. For me it disappeared after I removed climate:netatmo from configuration.yaml. I guess the automatic discovery and climate finds twice, but I’m not sure about it.

Five minutes by default, but each time you set something, this interval limit is disabled once.

Yes, i’d resolved with the same editing, because the component auto discovered the climate and when we recall with climate: platform in the configuration file we had the informations duplicate

Ok, but now during my test one valve drop under the min temp and i see that the boiler turning on. On the netatmo energy app and on the thermostat i can see that one valve required to turn on the boiler but on hassio i continue to see the idle state and i cannot update manually

in the netatmo.py file present in the custom_components i see this value:

MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=10)

and in the netatmo.py file present in the climate i see this value:

MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=300)

which are the differences?

works perfect, thanks again to @Baosong_Shan

Hello,

Thank you for your work but I got an error when trying your new version of custom component
It’s not Hass.io but home assistant in Docker.

Also, I am French speaking and have some special characters like èé, perhaps it could be the issue.

I tried with this version : Home Assistant 0.85.0.dev0

2018-12-19 11:29:22 ERROR (MainThread) [homeassistant.components.climate] 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 71, in setup_platform


    for home in home_data.get_home_names():


  File "/config/custom_components/climate/netatmo.py", line 291, in get_home_names


    self.setup()


  File "/config/custom_components/climate/netatmo.py", line 301, in setup


    self.homedata = pyatmo.HomeData(self.auth)


  File "/config/deps/lib/python3.6/site-packages/smart_home/Thermostat.py", line 64, in __init__


    for t in range(len(self.rawData[i]['therm_schedules'])):


KeyError: 'therm_schedules'

The first one is for generic Netatmo components, in this file, for the camera especially.

The second one is the override for Netatmo thermostats. In fact it could be more frequent I think.

Thanks for your help on testing :slight_smile:

I don’t think it is because docker, because I myself am using docker. Either it is a temporary communication issue, or something related to the special characters. It would be helpful if you turn on DEBUG output and send me the detailed log.

Thank you for your quick answer !

I restarted it with debug :

logger:
  default: debug


2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=load_platform.binary_sensor, platform=netatmo, discovered=>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=load_platform.climate, platform=netatmo, discovered=>

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.netatmo

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.loader] Loaded binary_sensor.netatmo from homeassistant.components.binary_sensor.netatmo

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.loader] Loaded climate.netatmo from custom_components.climate.netatmo

2018-12-20 09:33:43 WARNING (MainThread) [homeassistant.loader] You are using a custom component for climate.netatmo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=load_platform.camera, platform=netatmo, discovered=>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.weather, old_state=None, new_state=<state group.weather=unknown; entity_id=('sensor.date', 'sensor.time', 'sensor.weather_symbol', 'sensor.netatmo_outdoor_temperature', 'sensor.netatmo_outdoor_max_temp', 'sensor.netatmo_outdoor_min_temp', 'sensor.netatmo_outdoor_humidity', 'sensor.weather_precipitation', 'sensor.weather_wind_speed', 'sun.sun'), order=10, friendly_name=Météo @ 2018-12-20T09:33:43.052673+01:00>>

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.loader] Loaded camera.netatmo from homeassistant.components.camera.netatmo

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.netatmo

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.components.climate] Setting up climate.netatmo

2018-12-20 09:33:43 DEBUG (SyncWorker_19) [custom_components.climate.netatmo] Starting to setup platform climate.netatmo...

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.components.camera] Setting up camera.netatmo

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.netatmo, old_state=<state group.netatmo=unknown; entity_id=('climate.thermostat', 'sensor.netatmo_indoor_temperature', 'automation.famille_away_set_planning', 'automation.famille_home_set_on'), order=8, control=hidden, friendly_name=Thermostat @ 2018-12-20T09:33:43.030347+01:00>, new_state=<state group.netatmo=off; entity_id=('climate.thermostat', 'sensor.netatmo_indoor_temperature', 'automation.famille_away_set_planning', 'automation.famille_home_set_on'), order=8, control=hidden, friendly_name=Thermostat @ 2018-12-20T09:33:43.166869+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=group.default_view, old_state=<state group.default_view=unknown; entity_id=('group.tv_salon', 'group.grenier', 'group.lights', 'group.netatmo'), order=0, view=True, friendly_name=default_view, icon=mdi:home, hidden=True @ 2018-12-20T09:33:42.931087+01:00>, new_state=<state group.default_view=off; entity_id=('group.tv_salon', 'group.grenier', 'group.lights', 'group.netatmo'), order=0, view=True, friendly_name=default_view, icon=mdi:home, hidden=True @ 2018-12-20T09:33:43.170928+01:00>>

2018-12-20 09:33:43 DEBUG (SyncWorker_12) [homeassistant.components.sensor.netatmo] WeatherStationData detected!

2018-12-20 09:33:43 INFO (SyncWorker_12) [homeassistant.components.sensor.netatmo] NetAtmo refresh interval reset to 348 seconds

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_pressure, old_state=None, new_state=<state sensor.netatmo_indoor_pressure=1021.8; unit_of_measurement=mbar, friendly_name=Pression Atmosphérique, icon=mdi:gauge @ 2018-12-20T09:33:43.361675+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_outdoor_max_temp, old_state=None, new_state=<state sensor.netatmo_outdoor_max_temp=6.8; unit_of_measurement=°C, friendly_name=Température Max., icon=mdi:thermometer @ 2018-12-20T09:33:43.363244+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_humidity, old_state=None, new_state=<state sensor.netatmo_indoor_humidity=51; unit_of_measurement=%, friendly_name=Humidité Ambiante, device_class=humidity @ 2018-12-20T09:33:43.364709+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_outdoor_humidity, old_state=None, new_state=<state sensor.netatmo_outdoor_humidity=100; unit_of_measurement=%, friendly_name=Taux d'humidité, device_class=humidity @ 2018-12-20T09:33:43.366772+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_wifi, old_state=None, new_state=<state sensor.netatmo_indoor_wifi=High; unit_of_measurement=, friendly_name=Netatmo Indoor Wifi, icon=mdi:wifi @ 2018-12-20T09:33:43.368304+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_min_temp, old_state=None, new_state=<state sensor.netatmo_indoor_min_temp=18.3; unit_of_measurement=°C, friendly_name=Netatmo Indoor Min Temp., icon=mdi:thermometer @ 2018-12-20T09:33:43.369717+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_temperature, old_state=None, new_state=<state sensor.netatmo_indoor_temperature=18.3; unit_of_measurement=°C, friendly_name=Température, device_class=temperature @ 2018-12-20T09:33:43.371227+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_outdoor_temperature, old_state=None, new_state=<state sensor.netatmo_outdoor_temperature=6.6; unit_of_measurement=°C, friendly_name=Température Extérieure, device_class=temperature @ 2018-12-20T09:33:43.373276+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_outdoor_radio, old_state=None, new_state=<state sensor.netatmo_outdoor_radio=High; unit_of_measurement=, friendly_name=Netatmo Outdoor Radio, icon=mdi:signal @ 2018-12-20T09:33:43.375679+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_max_temp, old_state=None, new_state=<state sensor.netatmo_indoor_max_temp=20.8; unit_of_measurement=°C, friendly_name=Netatmo Indoor Max Temp., icon=mdi:thermometer @ 2018-12-20T09:33:43.378928+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_outdoor_battery, old_state=None, new_state=<state sensor.netatmo_outdoor_battery=Full; unit_of_measurement=, friendly_name=Netatmo Outdoor Battery, icon=mdi:battery @ 2018-12-20T09:33:43.382697+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_outdoor_min_temp, old_state=None, new_state=<state sensor.netatmo_outdoor_min_temp=5; unit_of_measurement=°C, friendly_name=Température Min., icon=mdi:thermometer @ 2018-12-20T09:33:43.383985+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_noise, old_state=None, new_state=<state sensor.netatmo_indoor_noise=35; unit_of_measurement=dB, friendly_name=Bruit Ambiant, icon=mdi:volume-high @ 2018-12-20T09:33:43.385349+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.netatmo_indoor_co2, old_state=None, new_state=<state sensor.netatmo_indoor_co2=640; unit_of_measurement=ppm, friendly_name=Taux de Co2, icon=mdi:cloud @ 2018-12-20T09:33:43.386773+01:00>>

2018-12-20 09:33:43 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=load_platform.sensor, platform=netatmo, discovered=>

2018-12-20 09:33:43 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.netatmo

2018-12-20 09:33:43 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo

File "/config/custom_components/climate/netatmo.py", line 71, in setup_platform

File "/config/custom_components/climate/netatmo.py", line 291, in get_home_names

File "/config/custom_components/climate/netatmo.py", line 301, in setup