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.22k stars 30.58k forks source link

Arcmcrest component #56126

Closed muffintsi closed 3 years ago

muffintsi commented 3 years ago

The problem

Im using core-2021.8.7 After upgrade to core-2021.9.6 a noticed problem in using my Dahua cameras.

I had defined two cams from one device, because in some dashboards i need low quality, on other dasboards i need full hq. My config is like this:

amcrest:

After upgrade Home Assistant generating id for this two entities from his names like : 'Cam1 LQ' -> camera.cam1_lq in is error that armcres not generating unique id and xxxxxxxxxxxxxx alredy exists. I see only firmst entity. Its not possible to define two entity from one device. Maybe add possibility to define unique_id:

Not I downgraded HA to core-2021.8.7

What is version of Home Assistant Core has the issue?

core-2021.9.6

What was the last working version of Home Assistant Core?

core-2021.8.7 - checked and working well

What type of installation are you running?

Home Assistant OS

Integration causing the issue

armcrest

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

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

amcrest documentation amcrest source (message by IssueLinks)

probot-home-assistant[bot] commented 3 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)

flacjacket commented 3 years ago

This is an interesting problem. I am wondering if it would be possible to change how the camera is configured to allow both of the camera configurations to be derived from the same device. I guess regardless we would need to set some extra values in the unique id of the cameras.

flacjacket commented 3 years ago

The one thing I am worried about is the other parameters being used, such as stream source or ffmpeg arguments, and just needing to keep adding additional values to the unique id.

muffintsi commented 3 years ago

Maybe good option is add definition resolution: both and with this option create automatically two camera entities?

flacjacket commented 3 years ago

56207 provides a fix for this by disambiguating the cameras by the resolution. By providing both through a single configuration makes naming each of the cameras more difficult, IMO.