rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
405 stars 82 forks source link

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

Open Frank-Bemelman opened 5 months ago

Frank-Bemelman commented 5 months 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 ;-)

WhiteDogBe commented 3 months ago

Chiming it with a similar request for the DH-IPC-HDBW3849R1-ZAS-PV. It has red/blue lights, whiite light and siren option. The integration currently only pick up the infrared.

Thanks for maintaining this integration!