core: Canary Camera Not Working
The problem
when using the Canary integration, everything works except the camera images do not load.
Environment
- Home Assistant Core release with the issue: 0.109.6
- Last working Home Assistant Core release (if known): N/A
- Operating environment (Home Assistant/Supervised/Docker/venv): Docker on 4.19.107-Unraid
- Integration causing this issue: Canary
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/canary/
Problem-relevant configuration.yaml
canary:
username: !secret canary_username
password: !secret canary_password
Traceback/Error logs
Logger: aiohttp.server
Source: components/canary/__init__.py:131
First occurred: 1:54:10 PM (2 occurrences)
Last logged: 1:54:27 PM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 125, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 490, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 507, in handle
image = await camera.async_camera_image()
File "/usr/src/homeassistant/homeassistant/components/canary/camera.py", line 87, in async_camera_image
await self.hass.async_add_executor_job(self.renew_live_stream_session)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 240, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/canary/camera.py", line 123, in renew_live_stream_session
self._live_stream_session = self._data.get_live_stream_session(self._device)
File "/usr/src/homeassistant/homeassistant/components/canary/__init__.py", line 131, in get_live_stream_session
return self._api.get_live_stream_session(device)
File "/usr/local/lib/python3.7/site-packages/canary/api.py", line 144, in get_live_stream_session
self._timeout)
File "/usr/local/lib/python3.7/site-packages/canary/live_stream_api.py", line 37, in __init__
self.login()
File "/usr/local/lib/python3.7/site-packages/canary/live_stream_api.py", line 56, in login
self._token = response.json()[ATTR_ACCESS_TOKEN]
KeyError: 'access_token'
Additional information
All other Canary sensors seem to work okay but the cameras do not load at all.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 26 (5 by maintainers)
Commits related to this issue
- Upgrade canary integration to use py-canary 0.5.1 Fixes #35569 — committed to markallanson/core by markallanson 4 years ago
- Upgrade canary integration to use py-canary 0.5.1 Fixes #35569 — committed to markallanson/core by markallanson 4 years ago
- Upgrade canary integration to use py-canary 0.5.1 (#44645) Fixes #35569 — committed to home-assistant/core by markallanson 4 years ago
- Upgrade canary integration to use py-canary 0.5.1 (#44645) Fixes #35569 — committed to home-assistant/core by markallanson 4 years ago
- Upgrade canary integration to use py-canary 0.5.1 Fixes #35569 — committed to markallanson/core by markallanson 3 years ago
The change is merged in the underlying library, we’re just waiting on a new release to be created now before updating the canary integration to use it.
Can confirm the same issue. I have multiple Canary Pros (aka all-in-one); temp & humidity data feeds from each device are fine, but Camera cards show nothing.
Yes I do have the camera configured per documentation
For anyone eager for an immediate resolution, I was able to install/test the fix with these steps:
https://github.com/home-assistant/addons-developmentTested and validated my Flex camera is now working! A few notes:
I’m now getting these errors spamming my logs,
Never had this previously, but I don’t use the Canary camera in HA, just the arm/disarm alarm.
@bm1549 This issue has been closed, if you have an issue with the beta, please raise a new issue so we can track and assign it. Thanks 👍