Home Assistant release with the issue:
0.71.0
Last working Home Assistant release (if known):
unknown
Operating environment (Hass.io/Docker/Windows/etc.):
ubuntu, native 16.04.4
Component/platform:
https://www.home-assistant.io/components/camera.netatmo/
Description of problem:
I'm not sure whether it coincides with an update home homeassistant or something else, but for a while, my netatmo presence camera doesn't show up in netatmo anymore. Welcome was still OK for a while, not it's gone, too.
Relevant part seems to be:
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform netatmo
Jun 19 03:29:48 cs hass[3201]: Traceback (most recent call last):
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
Jun 19 03:29:48 cs hass[3201]: SLOW_SETUP_MAX_WAIT, loop=hass.loop)
Jun 19 03:29:48 cs hass[3201]: File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
Jun 19 03:29:48 cs hass[3201]: return fut.result()
Jun 19 03:29:48 cs hass[3201]: File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Jun 19 03:29:48 cs hass[3201]: result = self.fn(*self.args, **self.kwargs)
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/camera/netatmo.py", line 41, in setup_platform
Jun 19 03:29:48 cs hass[3201]: for camera_name in data.get_camera_names():
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/netatmo.py", line 84, in get_camera_names
Jun 19 03:29:48 cs hass[3201]: self.update()
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/util/__init__.py", line 319, in wrapper
Jun 19 03:29:48 cs hass[3201]: result = method(*args, **kwargs)
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/netatmo.py", line 115, in update
Jun 19 03:29:48 cs hass[3201]: self.camera_data = lnetatmo.CameraData(self.auth, size=100)
Jun 19 03:29:48 cs hass[3201]: File "/home/pkormann/.homeassistant/deps/lib/python3.6/site-packages/smart_home/Camera.py", line 50, in __init__
Jun 19 03:29:48 cs hass[3201]: for e in self.rawData['homes'][i]['events']:
Jun 19 03:29:48 cs hass[3201]: KeyError: 'events'
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=camera, service=enable_motion_detection>
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=camera, service=disable_motion_detection>
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=camera, service=snapshot>
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 1.3 seconds.
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=camera>
Jun 19 03:29:48 cs hass[3201]: 2018-06-19 03:29:48 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform netatmo
Jun 19 03:29:48 cs hass[3201]: Traceback (most recent call last):
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
Jun 19 03:29:48 cs hass[3201]: SLOW_SETUP_MAX_WAIT, loop=hass.loop)
Jun 19 03:29:48 cs hass[3201]: File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
Jun 19 03:29:48 cs hass[3201]: return fut.result()
Jun 19 03:29:48 cs hass[3201]: File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Jun 19 03:29:48 cs hass[3201]: result = self.fn(*self.args, **self.kwargs)
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/binary_sensor/netatmo.py", line 74, in setup_platform
Jun 19 03:29:48 cs hass[3201]: if not data.get_camera_names():
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/netatmo.py", line 84, in get_camera_names
Jun 19 03:29:48 cs hass[3201]: self.update()
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/util/__init__.py", line 319, in wrapper
Jun 19 03:29:48 cs hass[3201]: result = method(*args, **kwargs)
Jun 19 03:29:48 cs hass[3201]: File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/netatmo.py", line 115, in update
Jun 19 03:29:48 cs hass[3201]: self.camera_data = lnetatmo.CameraData(self.auth, size=100)
Jun 19 03:29:48 cs hass[3201]: File "/home/pkormann/.homeassistant/deps/lib/python3.6/site-packages/smart_home/Camera.py", line 50, in __init__
Jun 19 03:29:48 cs hass[3201]: for e in self.rawData['homes'][i]['events']:
Jun 19 03:29:48 cs hass[3201]: KeyError: 'events'
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
camera:
platform: netatmo
binary_sensor:
platform: netatmo
cameras:
- Einfahrt
- Welcome Eingang
presence_sensors:
- Outdoor motion
- Outdoor human
- Outdoor animal
- Outdoor vehicle
netatmo:
api_key: xxxx
secret_key: xxxx
username: xxxx
password: xxxx
discovery: no
Traceback (if applicable):
Additional information:
Please complete the report with issue template requested information.
done
You can try to replace this file
/home/pkormann/.homeassistant/deps/lib/python3.6/site-packages/smart_home/Camera.py
by this one:
https://github.com/gieljnssns/netatmo-api-python/blob/camera-fix/smart_home/Camera.py
Sems to work flawlessly, couldn't see any error in log and cameras are back up!
One thing I just noticed though, when you click on the pic instead of a 'semi life' stream you only get a blue question mark (pic not found?)
I copied the file to the folder you mentioned, rebooted, but nothing changed. I still don't see the camera pictures. Maybe I do something wrong? :-(

@dlawnurg
Do you get any errors in the log?
Did you create this folder or did you replace an old camera.py file?
Thank you @gieljnssns coming back to me. I created the folder by myself. There was no Camera.py in the the folder before.
Here is the error message I receive:
2018-06-24 22:52:46 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform netatmo
Traceback (most recent call last):
File "/usr/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/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
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/camera/netatmo.py", line 40, in setup_platform
for camera_name in data.get_camera_names():
File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/usr/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 319, in wrapper
result = method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/usr/lib/python3.6/site-packages/smart_home/Camera.py", line 50, in __init__
for e in self.rawData['homes'][i]['events']:
KeyError: 'events'
You Can try to place the camera file in
File "/usr/lib/python3.6/site-packages/smart_home/Camera.py“
Hello,
I'm facing the same issue, however I have an error message with the new file.
2018-07-07 12:17:27 ERROR (MainThread) [homeassistant.setup] Error during setup of component netatmo
Traceback (most recent call last):
File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 146, 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 "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 46, in setup
import pyatmo
File "/home/pi/homeassistant/lib/python3.5/site-packages/pyatmo.py", line 17, in <module>
from smart_home.Camera import CameraData
File "/home/pi/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax
This is my config
netatmo:
api_key: redacted
secret_key: redacted
username: redacted
password: redacted
discovery: False
camera:
- platform: netatmo
home: Rigaud
cameras:
- Salon
Thanks
@iditude
I think you did something wrong, at line 7 in my file there is no <!DOCTYPE html>
I've the same issue, I've tried the proposed file but I get the following error message :
2018-07-10 16:10:02 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 129, 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 74, in setup_platform
if not data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 84, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 319, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 115, in update
self.camera_data = lnetatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 79, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
IndexError: list index out of range
Try to restart another time…
tried twice, same error each time :(
Le mer. 11 juil. 2018 Ã 10:12, Giel Janssens notifications@github.com a
écrit :
Try to restart another time…
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/15047#issuecomment-404083451,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVJxXKGZtHTtkEYQjFmWFC3XAAOlajIwks5uFbNqgaJpZM4UstqD
.
@doune I've pushed another commit, can you try the new file?
it works for me. Thanks !
i have this error for netatmo in HassOS 1.5 x64
Error while setting up platform netatmo
Traceback (most recent call last):
File "/usr/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/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
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/binary_sensor/netatmo.py", line 73, in setup_platform
if not data.get_camera_names():
File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/usr/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 318, in wrapper
result = method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/usr/lib/python3.6/site-packages/smart_home/Camera.py", line 50, in __init__
for e in self.rawData['homes'][i]['events']:
KeyError: 'events'
@gieljnssns Thanks a lot. This is working well for me.
Apologies for the error earlier, I blindly downloaded your link directly with wget so didn't notice I didn't download the file but the Github page :-)
Cheers
@iditude hehe at first I did the same, but usually I look at the file before starting it, so I noticed the mistake.
@gieljnssns @sirdir1972 I tried to replace the code you suggested in the camera.py file in another installation I made of Home Assistant now everything is working perfectly thanks a lot! Will this fix for the next version of Hassio be released? people complained about this problem
Most helpful comment
You can try to replace this file
/home/pkormann/.homeassistant/deps/lib/python3.6/site-packages/smart_home/Camera.pyby this one:
https://github.com/gieljnssns/netatmo-api-python/blob/camera-fix/smart_home/Camera.py