Testers needed for Netatmo climate (multiple thermostats or valves)

I had some time, and I’ve tried to rewrite the netatmo-api for the new Energy API.
I only have 1 Thermostat, no valves.

If someone can test this:
Update to +0.72, so other Netatmo components talk to the Pyatmo library.
You can leave everything from your original netatmo components untouched.
Make a custom_components folder in /config
place this file in the folder https://gist.github.com/gieljnssns/9406291de78d19a8732b2dab6ac2a813
Make a climate folder in the custom_components folder and place this file in there https://gist.github.com/gieljnssns/4ff4d0d5548c614c548de8b77dcd11d2
Make another app in https://dev.netatmo.com/myaccount/
In your configuration.yaml:

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

climate:
  - platform: netatmo2

reboot

You should have one or more climate.test_ entities
Please report what’s working and what’s not.

4 Likes

@p3xx69
can you post your netatmo + netatmo2 config as code?
please use code blocks and syntax highlighting

sensor netatmo2 :
  - platform: netatmo
    station: Home_xxx'

netatmo2:
  api_key: .....
  secret_key: .....
  username: ....
  password: ...
#  discovery: False

climate:
#  - platform: netatmo2

i have set only netatmo2

For your sensors, set your original netatmo.
For climate use

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

climate:
  - platform: netatmo2

I have some errors below :

Log Details (ERROR)
Fri Jun 29 2018 12:32:00 GMT+0200 (heure d’été d’Europe centrale)

Error during setup of component netatmo
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 146, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 53, in setup
    'read_station read_camera access_camera '
  File "/usr/lib/python3.6/site-packages/pyatmo.py", line 74, in __init__
    self._accessToken = resp['access_token']
TypeError: 'NoneType' object is not subscriptable
Log Details (ERROR)
Fri Jun 29 2018 12:32:01 GMT+0200 (heure d’été d’Europe centrale)

Unable to setup dependencies of sensor.netatmo. Setup failed for dependencies: netatmo
Log Details (ERROR)
Fri Jun 29 2018 12:32:01 GMT+0200 (heure d’été d’Europe centrale)

Unable to prepare setup for platform sensor.netatmo: Could not setup all dependencies.
Log Details (ERROR)
Fri Jun 29 2018 12:32:07 GMT+0200 (heure d’été d’Europe centrale)

Unable to find component binary_sensor.netatmo2
Log Details (ERROR)
Fri Jun 29 2018 12:32:07 GMT+0200 (heure d’été d’Europe centrale)

Unable to prepare setup for platform binary_sensor.netatmo2: Platform not found.

Can you post your config…

What do you mean by config ? please

can you post your netatmo + netatmo2 config again

sensor netatmo :
  - platform: netatmo
    station: Home_xxx

netatmo:
  api_key: xxx
  secret_key: xx
  username: xxx@gmai#l.com
  password: xx
#  discovery: false
netatmo2:
  api_key: xxx
  secret_key: xxx
  username: [email protected]
  password: xxx
#  discovery: False

climate:
#  - platform: netatmo2

Try to uncomment those 2 lines in your second code blok.

Done , same results , don’t run
image

Don’t you have any errors netatmo related in your log?
Do you see your thermostats in the frondend?

yes i saw my thermomstat on frontend
image

But i don’t see my sensor for meteo station
image

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 146, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 53, in setup
    'read_station read_camera access_camera '
  File "/usr/lib/python3.6/site-packages/pyatmo.py", line 74, in __init__
    self._accessToken = resp['access_token']
TypeError: 'NoneType' object is not subscriptable

Check your api and secret key for your original netatmo,
when I delete some numbers from my api key, I get the some error.
Another possibility is, you have set your app on https://dev.netatmo.com/myaccount/
disable.

same problem. I tried to reverse the api key and the secret key between netatmo and netatmo2 but I get the following errors


I see the two thermostats correctly through netatmo2

Hello ,
I have change code and it’s still same errors

image

Mon Jul 02 2018 11:52:27 GMT+0200 (heure d’été d’Europe centrale)

Error during setup of component netatmo
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 146, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 53, in setup
    'read_station read_camera access_camera '
  File "/usr/lib/python3.6/site-packages/pyatmo.py", line 74, in __init__
    self._accessToken = resp['access_token']
TypeError: 'NoneType' object is not subscriptable

@p3xx69
@CapitanoNemo
try to delete the pyatmo library

/site-packages/__pycache__/pyatmo.cpython-35.pyc
/site-packages/pyatmo-1.0.dist-info
/site-packages/smart_home
/site-packages/pyatmo.py

and reboot

@CapitanoNemo
Are you using thermostats or valves?

1 Like

Thanks, by deleting the files now everything works perfectly.
I have 2 thermostats and I see the correct temperature values

@CapitanoNemo
Can you change temperature? On the right thermostat?
Away mode? …