Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dahau VC-PTI08-A180-PV #431

Open
j3n0v4 opened this issue Nov 26, 2024 · 1 comment
Open

Dahau VC-PTI08-A180-PV #431

j3n0v4 opened this issue Nov 26, 2024 · 1 comment

Comments

@j3n0v4
Copy link

j3n0v4 commented Nov 26, 2024

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

@alpauna
Copy link
Contributor

alpauna commented Dec 9, 2024

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants