dahua icon indicating copy to clipboard operation
dahua copied to clipboard

Dahau VC-PTI08-A180-PV

Open j3n0v4 opened this issue 1 year ago • 1 comments

Hello,

I have installed the addon in home assistant using HACS and have connected to a Dahau Camera. The camera has security lights and a alarm. These functions are not shown in Home Assistant.

model is VC-PTI08-A180-PV. Firmware: 3.140.0000000.21.R,build:2024-05-14 ONVIF version: 23.12(V3.1.0.1734191)

These are the only controls shown. image

j3n0v4 avatar Nov 26 '24 16:11 j3n0v4

Probably have to add to supports security light.

def supports_security_light(self) -> bool:
        """
        Returns true if this camera has the red/blue flashing security light feature.  For example, the
        IPC-HDW3849HP-AS-PV does https://dahuawiki.com/Template:NameConvention
        Addressed issue https://github.com/rroller/dahua/pull/405
        """
        return "-AS-PV" in self.model or self.model == "AD410" or self.model.startswith("IP8M-2796E")

Something like this:

def supports_security_light(self) -> bool:
        """
        Returns true if this camera has the red/blue flashing security light feature.  For example, the
        IPC-HDW3849HP-AS-PV does https://dahuawiki.com/Template:NameConvention
        Addressed issue https://github.com/rroller/dahua/pull/405
        """
        return "-AS-PV" in self.model or self.model == "AD410" or self.model.startswith("IP8M-2796E") or self.model.startswith("IPC-HDW3849HP")

Let me know if you need help testing and then I can help get it into code. I added IP8M-2796E to get the same features working on it. Currently that is all starting on line 561 through 567 in __init__.py which is in custom_components/dahua directory.

this is what mine looks like now: image

To test you just have to modify the line 567 with this. If it work, then we can create a pull request and add it so it is part of the codebase. return "-AS-PV" in self.model or self.model == "AD410" or self.model.startswith("IP8M-2796E") or self.model.startswith("IPC-HDW3849HP")

alpauna avatar Dec 09 '24 11:12 alpauna