Hnap devices (D-Link DCH / mydlink series & others)

Hi everyone,

First: Yes, I known that hnap protocol is insecure but maybe you still have one of those devices hanging around.

Now the news: I have developed an integration for those devices: GitHub - ldotlopez/ha-hnap-device: Home Assistant component for HNAP devices

This posts is a request for testing. I only have acces to a motion sensor (DCH-S150) and to Siren Device (DCH-S220) and some reports of working DLINK-822 router. If you have one of those devices laying in a drawer test my integration please.

Also, if have debuging skills you can test the underlaying library: GitHub - ldotlopez/python-hnap: Generic HNAP client and specialized clients for motion sensorts, sirens, routers, water detectors and more. which comes with a command line interface to read and call HNAP methods from the devices.

Thanks!

I did some testing with my Siren but I’m not sure how to change the tone. I see that the code has some parameters but I don’t see how to set the default tone to the entity. Could you share how to do that?

Hi @mig8447

As far as I know there is no way to set default tone on the device (via hardware).

By default my extension plays the ‘police’ tone for 15 seconds. There is some relevant code at https://github.com/ldotlopez/ha-hnap-device/blob/c23f66f11ac0f8a0cca4759a75785c22541487df/custom_components/hnap_device/siren.py#L74

Theorically a configurable option can be implemented into the extension to set the default value.