Testers needed for Netatmo climate (multiple thermostats or valves)

Hi,

In case that i’m using home assistant in docker where i can find this file to update?

because just making these changes:

i have these errors in log:

2018-12-23 17:06:57 ERROR (MainThread) [homeassistant.components.binary_sensor] 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 "/usr/src/app/homeassistant/components/binary_sensor/netatmo.py", line 73, in setup_platform
    if not data.get_camera_names():
  File "/usr/src/app/homeassistant/components/netatmo.py", line 82, in get_camera_names
    self.update()
  File "/usr/src/app/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/app/homeassistant/components/netatmo.py", line 113, in update
    self.camera_data = pyatmo.CameraData(self.auth, size=100)
  File "/config/deps/lib/python3.6/site-packages/smart_home/Camera.py", line 81, in __init__
    self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-23 17:06:58 ERROR (MainThread) [homeassistant.components.camera] 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 "/usr/src/app/homeassistant/components/camera/netatmo.py", line 40, in setup_platform
    for camera_name in data.get_camera_names():
  File "/usr/src/app/homeassistant/components/netatmo.py", line 82, in get_camera_names
    self.update()
  File "/usr/src/app/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/app/homeassistant/components/netatmo.py", line 113, in update
    self.camera_data = pyatmo.CameraData(self.auth, size=100)
  File "/config/deps/lib/python3.6/site-packages/smart_home/Camera.py", line 81, in __init__
    self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'

thanks

After restarting, and added in my climate.yaml file this:

- platform: netatmo

now works!

Sorry and thanks!

I had some troubles to bring this to work. Which files should be changed now?
I changed the netatmo.py in the components and climate folder. Is a change of Thermostats.py also required?

Hi,

In my case yesterday i updated files, and only changed the 2 github files:

https://community.home-assistant.io/t/testers-needed-for-netatmo-climate-multiple-thermostats-or-valves/58233/250?u=garvarma.

And changed the climate.yaml file, and after restart twice, worked perfect!

It may be helpful if you can attach your error messages.

2018-12-27 09:04:31 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 124, in _async_setup_platform
task = async_create_setup_task()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
None, platform.setup_platform, hass, platform_config,
AttributeError: module 'homeassistant.components.climate.netatmo' has no attribute 'setup_platform'
2018-12-27 09:04:31 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /home/homeassistant/.homeassistant/known_devices.yaml: Config file not found: /home/homeassistant/.homeassistant/known_devices.yaml
2018-12-27 09:04:32 ERROR (MainThread) [homeassistant.components.camera] 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 128, 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/camera/netatmo.py", line 40, in setup_platform
for camera_name in data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-27 09:04:32 ERROR (MainThread) [homeassistant.components.binary_sensor] 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 128, 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/binary_sensor/netatmo.py", line 73, in setup_platform
if not data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-27 09:04:32 ERROR (Thread-5) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information

Hi, here are the ERROR Messages. I changed the two netatmo.py files in components and components/climate and the Thermostat.py file.
In the configuration.yaml I wrote both ids and my login credentials.
Where is the problem here? Sorry, but I am new to Home Assistant.

Apparently you don’t have the correct file at least for custom_components/climate/netatmo.py, where there should be a function called setup_platform.

I copied your files now in the folder custom_components and custom_components/climate
But still some errors:

2018-12-27 18:34:39 ERROR (MainThread) [homeassistant.components.binary_sensor] 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 128, 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/binary_sensor/netatmo.py", line 73, in setup_platform
if not data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
 File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-27 18:34:39 ERROR (MainThread) [homeassistant.components.camera] 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 128, 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/camera/netatmo.py", line 40, in setup_platform
for camera_name in data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'

I think it is strange that the errors occur in the camera and binary sensor section. I have no binary netatmo sensors and also no netatmo cameras.

It seems that the climate error has gone. Any climate device found?

No only the sensors from the weather station.
I have one relay with two valves but nothing was been found.

According to your log messages, nothing in the custom_components has been used. custom_components should stay in the same directory as configuration.yaml, is yours the case?

That was the problem. I created the custom_component beside the component folder. Moved it to the configuration.yaml and now it works. Thank you :grinning:

Hi,
I need help with my configration. i am a newbie with my docker homeassistant
I have copied netatmo.py in custom-components and netatmo.py in the climate folder.
My folder structure is like this:
homeassistant
|___config
|___custom-components
Is it that right?
And I have this log:
2018-12-28 10:24:59 ERROR (MainThread) [homeassistant.components.binary_sensor] 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 “/usr/src/app/homeassistant/components/binary_sensor/netatmo.py”, line 73, in setup_platform
if not data.get_camera_names():
File “/usr/src/app/homeassistant/components/netatmo.py”, line 82, in get_camera_names
self.update()
File “/usr/src/app/homeassistant/util/init.py”, line 324, in wrapper
result = method(*args, **kwargs)
File “/usr/src/app/homeassistant/components/netatmo.py”, line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File “/usr/local/lib/python3.6/site-packages/smart_home/Camera.py”, line 81, in init
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: ‘CameraData’ object has no attribute ‘default_home’
2018-12-28 10:24:59 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 “/usr/src/app/homeassistant/components/climate/netatmo.py”, line 50, in setup_platform
for module_name in data.get_module_names():
File “/usr/src/app/homeassistant/components/climate/netatmo.py”, line 164, in get_module_names
for module in self.thermostatdata.modules[self.device].values():
KeyError: ‘Etxea’
2018-12-28 10:24:59 ERROR (MainThread) [homeassistant.components.camera] 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 “/usr/src/app/homeassistant/components/camera/netatmo.py”, line 40, in setup_platform
for camera_name in data.get_camera_names():
File “/usr/src/app/homeassistant/components/netatmo.py”, line 82, in get_camera_names
self.update()
File “/usr/src/app/homeassistant/util/init.py”, line 324, in wrapper
result = method(*args, **kwargs)
File “/usr/src/app/homeassistant/components/netatmo.py”, line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File “/usr/local/lib/python3.6/site-packages/smart_home/Camera.py”, line 81, in init
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: ‘CameraData’ object has no attribute ‘default_home’

No, custom-components has to be INSIDE config.

Hi,
i have inside the config folder. i have a docker installation in my NAS
Must I do anything with the pytatmo library?
Thanks in advance

According to the above quoted message, your modules in the custom_components are NOT loaded (still using the standard ones). I am using docker and it works fine.

I have see that the folder custom must be custom_component and I have custom-component but now I have this error log:
Log Details (ERROR)
Sat Dec 29 2018 00:05:59 GMT+0100 (hora estándar de Europa central)

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)
AttributeError: module ‘pyatmo’ has no attribute ‘HomeData’

Can I delete the component folder?
Must I install any pytamo.py component?
Thanks in advance

Hi,

I’m also using HA in synology nas docker.

You must do this:

imagen

imagen

then, in climate.yaml you must have this:

- platform: netatmo

of course, in configuration.yaml, also you must have netatmo config:

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

and this, works fineh with ha 84.2 in docker synology

imagen

Under config/deps/lib/python3.6/site-packages/: there should be:

pyatmo.py
pyatmo-1.*.dist-info/
smart_home/
__pycache__/

Please try to remove all of them, and try to restart HA, to see if the correct one can be installed automatically.