New Netatmo climate component supporting multiple thermostats/valves

Thank you very much for answering, now I have deleted the folder netatmo of custom_components but I still get error, this is what I get

Error while setting up platform netatmo
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/binary_sensor.py”, line 67, in setup_platform
if not data.get_camera_names():
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/init.py”, line 204, in get_camera_names
self.update()
File “/usr/local/lib/python3.7/site-packages/homeassistant/util/init.py”, line 224, in wrapper
result = method(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/init.py”, line 241, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File “/usr/local/lib/python3.7/site-packages/smart_home/Camera.py”, line 49, in init
nameHome = self.rawData[“homes”][i][“name”]
KeyError: ‘name’

Also this is my configuration in the file configuration.yaml in case it had changed:

camera:
platform: netatmo

binary_sensor:

  • platform: huesensor
  • platform: netatmo
    cameras:
    • Camera
      presence_sensors:
    • Outdoor motion
    • Outdoor human
    • Outdoor animal
    • Outdoor vehicle

netatmo:
api_key: *****
secret_key: *****
username: ******
password: *****
discovery: no

I do not know what the problem will be but in fact both the thermostat and the camera of the netatmo platform have disappeared

Don’t have the camera myself so not 100% sure, but looking at the HA Docs you may need to change your configuration a little to accommodate the idea of “Homes” in the Netatmo setup

I’m getting the same error. I havent been able to get this to work since it was integrated to HA.

there isn’t…

Ok, I looked in my core files and your right.

Ok than I would guess you have a manuel config and autodiscovery activated. This would cause double entities.

Yes I have auto discovery and manual configure. Could I exclude netatmo from auto discover?

Try it by commenting it out

i ve just updated to the last HA version and i got this error:

which it means climate entity not available in my frontend. Any idea/suggestion? Thanks in advanced!

my mistake. my relay wasnt work.

Hi very long topic this one.
I want explain my situation in case someone helps.
2 Netatmo thermostats and 1 Netatmo weather station, discovery: true
The 2 thermostats, whatever I done or do, shows like setpoint temperature mixed by one or the other thermostat . I setted state almost 1000 times but it turns as he likes.
The other factor is that if I don’t set discovery true the Netatmo indoor weather station module does not receive data, for humidity, noise, and co2.
I tried the solution in first post but I never been able to have to works the settings.
Can someone address me to the right way?

Hi all

is there a way to have the battery status from the thermostat?

I see that from the Netatmo Smart Home API page it is available from the

Device specific data: id, firmware, battery status, radio status, location, wifi status

Thanks

1 Like

After upgraded to 0.92 the thermostat not work, this is the error:

2019-04-26 14:08:42 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo/climate.py", line 94, in setup_platform
    for room_id in room_data.get_room_ids():
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo/climate.py", line 342, in get_room_ids
    if not self.setup():
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo/climate.py", line 352, in setup
    self.homedata = pyatmo.HomeData(self.auth)
  File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Thermostat.py", line 30, in __init__
    self.getAuthToken = authData.accessToken
AttributeError: 'NoneType' object has no attribute 'accessToken'

This should be fixed in 0.92.1.

upgraded to 0.92.1 and give this error:

2019-04-27 10:38:36 ERROR (Thread-17) [smart_home] Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/__init__.py", line 39, in postRequest
    if params
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: 

2019-04-27 10:38:36 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.2 seconds.
2019-04-27 10:38:36 INFO (Thread-12) [homeassistant.loader] Loaded samsungtv from homeassistant.components.samsungtv
2019-04-27 10:38:36 ERROR (MainThread) [homeassistant.setup] Error during setup of component netatmo
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 156, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo/__init__.py", line 91, in setup
    'read_station read_camera access_camera '
  File "/srv/homeassistant/lib/python3.5/site-packages/pyatmo.py", line 85, in __init__
    self._accessToken = resp["access_token"]
TypeError: 'NoneType' object is not subscriptable

Please raise an issue on github as I need your config and more info to debug.

Alternatively open a new thread and share your config there so we can dig deeper.

Good afternoon, I still can not configure my camera and my Netatmo thermostat. I have the modified files that supposedly work in the custom_components folder loaded and I can not get it. Since version 0.89 it has not worked properly again. How have people indicated I have tried to configure it with discovery: true or false and it keeps showing me again and again the same errors, I do not know if someone could help me out or maybe it is still in the process of being patched and that’s why it does not work. I have also tried to reset my credentials in Netatmo dev but it does not work either

The error is the next one:

Error while setting up platform netatmo

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/binary_sensor.py", line 68, in setup_platform
    if not data.get_camera_names():
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/__init__.py", line 204, in get_camera_names
    self.update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 224, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/__init__.py", line 241, in update
    self.camera_data = pyatmo.CameraData(self.auth, size=100)
  File "/usr/local/lib/python3.7/site-packages/smart_home/Camera.py", line 49, in __init__
    nameHome = self.rawData["homes"][i]["name"]
KeyError: 'name'

Now I have also noticed that I do not correctly load the custom_components since now I do not see the cache folder that I understand that appears when they are loaded in the system and I do not know what the reason is.

Mi config is:

netatmo:
  api_key: ***
  secret_key:***
  username: ***
  password: **
  discovery: false
  
climate:
  - platform: melcloud
    email: ***
    password: ***
  - platform: netatmo
    homes:
      - name: Casa
        rooms:
          - Salon
          
camera:
  platform: netatmo
  home: Casa
  cameras:
    - Camara

@cgtobi Would you mind to have a look at #23723 and let me know if there is any workaround for this problem? Thank you.