kuna
kuna copied to clipboard
v2021.12.0 Breaks Kuna Camera Streaming
After upgrading to core-2021.12.0, my Kuna cameras would no longer stream. I tried deleting and re-adding the integration, but I'm still getting the same error in the logs:
Logger: homeassistant.components.camera Source: custom_components/kuna/camera.py:100 Integration: Camera (documentation, issues) First occurred: 9:50:49 PM (2 occurrences) Last logged: 9:50:49 PM
kuna: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update await task File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/kuna/camera.py", line 100, in update self.is_streaming = True AttributeError: can't set attribute
Ha. Thought it was just me. Looking forward to a fix, let me know if I can provide any logs etc.
From Github
boctok https://github.com/boctok commented 15 hours ago https://github.com/marthoc/kuna/issues/37#issuecomment-991982953 I was able to fix the error and get the cameras back by changing line 100 in camera.py from self.is_streaming = True to self._is_streaming = True
On Dec 13, 2021, at 6:24 AM, D @.***> wrote:
Ha. Thought it was just me. Looking forward to a fix, let me know if I can provide any logs etc.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/marthoc/kuna/issues/38#issuecomment-992473005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHOJDTN7YJ3UYZ4OCKO2NPTUQXXXJANCNFSM5J5DHX4A. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@mcfarlde Good call. That worked for me as well.
Thanks @mcfarlde for the suggestion - it worked for me as well. I created this trivial PR to keep things up to date: https://github.com/marthoc/kuna/pull/41
I don't get any camera entities (only switches and motion) when installing the addon. Any ideas? HA 2021.12.10
after making the change, I am seeing this error. Any ideas?
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 179, in _async_get_image if image_bytes := await camera.async_camera_image( TypeError: async_camera_image() got an unexpected keyword argument 'width'
I'm getting the same:
File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 169, in _async_get_image if image_bytes := await camera.async_camera_image( TypeError: KunaCamera.async_camera_image() got an unexpected keyword argument 'width'
I updated HACS, rebooted and now the camera is back!
I only get that error when using Safari. The camera works in chrome, the Mac App and the mobile app.