home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.23k stars 30.58k forks source link

Amcrest camera do not work in 2021.12.1 #61739

Closed andyp05 closed 2 years ago

andyp05 commented 2 years ago

The problem

Amcrest cameras to not initialize and create devices once upgraded to 2021.12.1 works in 2021.11.x

What version of Home Assistant Core has the issue?

2021.11.5

What was the last working version of Home Assistant Core?

2021.11.5

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

amcrest

Link to integration documentation on our website

https://www.home-assistant.io/integrations/amcrest/

Example YAML snippet

amcrest:
  - host: 192.168.1.22
    username: admin
    password: !secret cam_22
    name: 2nd floor hall
    resolution: high

Anything in the logs that might be useful for us?

2021-12-13 16:21:47 ERROR (MainThread) [homeassistant.components.camera] amcrest: 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/amcrest/camera.py", line 368, in update
self.is_streaming = self._get_video()
AttributeError: can't set attribute
2021-12-13 16:21:47 ERROR (MainThread) [homeassistant.components.camera] amcrest: 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/amcrest/camera.py", line 368, in update
self.is_streaming = self._get_video()
AttributeError: can't set attribute

Additional information

copied from https://github.com/home-assistant/core/issues/61594 to add integration info and logs.

probot-home-assistant[bot] commented 2 years ago

amcrest documentation amcrest source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @flacjacket, mind taking a look at this issue as it has been labeled with an integration (amcrest) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

andyp05 commented 2 years ago

@frenck wanted to ping you since you worked on this integration last. Thanks for all your hard work.

flacjacket commented 2 years ago

File "/config/custom_components/amcrest/camera.py", line 368, in update

It looks like you are using a custom component rather than the built-in amcrest component. Can you get rid of that and see if that changes the behavior?

andyp05 commented 2 years ago

Good eye. I added a custom component months ago to test something with the official amcrest code and forgot about it. Deleted that folder and all seems well. Apologize for the waste of time. Have a great holiday!