Testers needed for Netatmo climate (multiple thermostats or valves)

I switched to Netatmo2 but still have errors

2018-08-24 10:32:06 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo2
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, 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/netatmo2.py”, line 70, in setup_platform
for room_name in room_data.get_room_names():
File “/config/custom_components/climate/netatmo2.py”, line 316, in get_room_names
self.setup()
File “/config/custom_components/climate/netatmo2.py”, line 331, in setup
self.homestatus = lnetatmo.HomeStatus(self.auth, home=self.home)
File “/config/deps/lib/python3.6/site-packages/netatmo_home/Thermostat.py”, line 125, in init
self.rawData = resp[‘body’][‘home’]
KeyError: ‘home’
2018-08-24 10:32:09 ERROR (SyncWorker_7) [homeassistant.components.maxcube] Unable to connect to Max!Cube gateway: timed out
2018-08-24 10:32:09 ERROR (MainThread) [homeassistant.setup] Setup failed for maxcube: Component failed to initialize.
2018-08-24 10:32:13 ERROR (MainThread) [homeassistant.components.sensor.netdata] Sensor is not available: hddtemp_local.temperatures
2018-08-24 10:32:15 ERROR (MainThread) [netdata] Can not load data from Netdata
2018-08-24 10:32:15 ERROR (MainThread) [homeassistant.components.sensor.netdata] Unable to retrieve data from Netdata
2018-08-24 10:32:18 ERROR (MainThread) [homeassistant.setup] Error during setup of component netatmo
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/netatmo.py”, line 51, in setup
config[DOMAIN][CONF_API_KEY], config[DOMAIN][CONF_SECRET_KEY],
KeyError: ‘netatmo’
2018-08-24 10:32:18 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of sensor.netatmo. Setup failed for dependencies: netatmo
2018-08-24 10:32:18 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.netatmo: Could not setup all dependencies.

This is what I get deleting all custom components

2018-08-24 10:47:07 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform netatmo
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, 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/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py”, line 80, in setup_platform
if module_name not in data.get_module_names():
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py”, line 304, in get_module_names
self.update()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py”, line 320, in update
self.station_data = pyatmo.WeatherStationData(self.auth)
File “/usr/local/lib/python3.6/site-packages/smart_home/WeatherStation.py”, line 23, in init
self.rawData = resp[‘body’][‘devices’]
TypeError: ‘NoneType’ object is not subscriptable

A bit of progress…

If I comment out lines 71 to 74 in /custom_components/climate/netatmo2.py I get all my rooms to show up:
image
image

I still get duplicate rooms, and all the rooms share the same room_id and the same module_id:

I can set the target temperature in any room, but in reality it just changes the living room and in home assistant it looks like the target has been changed in all rooms at ones.

I had another go here (starting from scratch) and have everything working 100% now :slight_smile:
Not exactly sure what I did differently this time around but obviously wasn’t paying attention last time and did something wrong. Anyway I can now see and control both my thermostats as expected. Thanks @gieljnssns :+1:

image

Can you tell me what you did, I am a little confused what to do (netatmo, netatmo2 …???). I also have 2 thermostat.

I also have HASSIO, and have trouble in finding where are the files to delete/change (if are not in config folder)

I went totally back to the start - removed everything netatmo related from custom_components, cunstom_components\climate as well as any traces of the previous netatmo custom_component (Adding support for Netatmo Thermostat) that I’d been using, rebooted HA and then followed the process from Post #1 here. Rebooted again and my two thermostats appeared as climate.test_thermostatname

so for you what I think you need to do is just follow the steps above. Ignore the original netatmo component as that is still needed for Weather and then setup this new netatmo2 component which is for Climate/Heat only.
If you don’t have the custom_components folders listed above in the thread you need to create them in HASSIO - if you don’t have the folders that are mentioned to delete I wouldn’t worry about it.

Now trying again from scratch, this is my conf. On the Netatmo website I created 2 app (so I have 2 sets of keys)

climate:
  - platform: netatmo2
netatmo2:
  api_key: !secret netatmo2_api_key
  secret_key: !secret netatmo2_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: False
climate:
  - platform: netatmo
netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: False

NOPE, also the set temperature, after few minutes it goes to 12 degrees, and away_mode goes to ON … but on the NEtatmo APP its keeping the set temperature of 15.

Hope this component get fixed before winter :smiley:

this I do not understand, since I have all files named differently

Cattura

Nothing works … I have the sensors, but changing them in HASS does not change the values in reality

climate:
  - platform: netatmo2
netatmo2:
  api_key: !secret netatmo2_api_key
  secret_key: !secret netatmo2_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: False
climate:
  - platform: netatmo
netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
  discovery: False

The above was wrong since I had two climate: instances (did’tr ssee it in the erro log, now I fixed it, but have the below error in LOG

2018-08-31 09:28:21 ERROR (MainThread) [homeassistant.setup] Error during setup of component netatmo2
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/setup.py”, line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
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/netatmo2.py”, line 47, in setup
import lnetatmo
ModuleNotFoundError: No module named ‘lnetatmo’
2018-08-31 09:28:21 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of climate.netatmo2. Setup failed for dependencies: netatmo2
2018-08-31 09:28:21 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.netatmo2: Could not set up all dependencies.

from what I can tell you should have a file called lnetatmo.py in \<>\config\deps\lib\python3.6\site-packages\ (I do anyway). That seems to be what the error is pointing to.

I have that file there too

hello,
I have 1 Netatmo thermostat and 1 Netatmo valve, I tried the custom component “netatmo2” without success,
my configuration is:

netatmo2:
  api_key: !secret netatmo2_key
  secret_key: !secret netatmo2_secret
  username: !secret netatmo2_user
  password: !secret netatmo2_pass
  discovery: false
climate:
  - platform: netatmo2

I find only the valve: “climate.test_camera_da_letto” but I can find the thermostat, so do you have any ideas?
thanks

in the log, lot of errors:

2018-09-22 23:10:37 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.test_camera_da_letto fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 224, in async_update_ha_state
yield from self.async_device_update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 353, in async_device_update
yield from self.hass.async_add_job(self.update)
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 “/home/homeassistant/.homeassistant/custom_components/climate/netatmo2.py”, line 259, in update
self._data.update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/init.py”, line 325, in wrapper
result = method(*args, **kwargs)
File “/home/homeassistant/.homeassistant/custom_components/climate/netatmo2.py”, line 338, in update
self.homestatus = lnetatmo.HomeStatus(self.auth, home=self.home)
File “/srv/homeassistant/lib/python3.5/site-packages/netatmo_home/Thermostat.py”, line 105, in init
self.home_data = HomeData(authData)
File “/srv/homeassistant/lib/python3.5/site-packages/netatmo_home/Thermostat.py”, line 31, in init
self.rawData = resp[‘body’][‘homes’]
TypeError: ‘NoneType’ object is not subscriptable

Played around with it a bit and I was able to get both of my Netatmo rooms to show up in home assistant after a small change: https://gist.github.com/LucaKaufmann/9c700f1cbcaa5d1599e44a1b33200578

Right now they both display the same values, probably because both entities get passed the same room_data, so that’s something that might have to be rewritten

Hi, any updates?

I will try it this evening!

I tried your netatmo2.py and I have same behaviour, 1 netatmo thermostat e 1 valve with same value.

Hope @gieljnssns can have a look into it. Winter is approaching :smile:

Winter is coming :grin::grin::grin: