rroller / dahua

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

DH-IPC-HDW5449H-ASE-D2 with siren #367

Open Frank-Bemelman opened 2 weeks ago

Frank-Bemelman commented 2 weeks ago

I have this camera DH-IPC-HDW5449H-ASE-D2 and it also has a siren. The siren is not detected during installation in HA. It also has 2 white leds, which I can activate in the cameras webserver. The illuminator is also not detected in HA.

I changed line 530 in /init.py

    return "-AS-PV" in m or "-ASE" in m or "L46N" in m or m.startswith("W452ASD")

This change gives me the switch for the siren, in HA, and works.

There is some code to detect the illuminator, starting at line 571 but I have no clue how that works.

I also have a DH-IPC-PDW3849-A180-AS-PV with siren, security light and illuminator. These are all three detected, and the siren and security light works. The illuminator behaves funny - I can turn it on in HA, but not off (switch goes to off, light stays on). In the cameras web interface I can set the illuminator to auto, manual(on) and off. When I set it to off in the web interface while the switch is on in HA, it goes on again when turned off in HA. This is a bit confusing to explain.

You must have put a lot of time in this, all this reverse engineering. Respect for that ;-)