rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
369 stars 71 forks source link

Add Amcrest model IP8M-2796E-AI #346

Open alpauna opened 3 months ago

alpauna commented 3 months ago

This model has a White Light and it is not working with this integration. It does work with video however it is not turning on the "Flood light:. Modifying the script at line 535 in init.py by adding or self.model.startswith("IP8M")

# supports_security_light function staring at line 530
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
        """
        return "-AS-PV" in self.model or self.model == "AD410" or self.model.startswith("IP8M")

Added security light and illumination. Also, security light works with this in HA I can turn on and off with events from frigate. So, that is working good for me. I can check that in if that would be helpful. What is your checkin procedure?

I will keep messing with illumination as it should support 0 - 100 as other cameras do. Currently it is showing as a on / off switch only. This simple modify above at least made it usable with HA so that I can control via Frigate AI.

Thanks for the awesome integration I have been using for quite some time!

alpauna commented 3 months ago

Just tested on 0.9.51 and it impacts the exact same lines.

alpauna commented 2 months ago

Just tested on 0.9.54 the line has moved to 537 but otherwise it works just the same.