ldotlopez / ha-hnap-device

Home Assistant component for HNAP devices
GNU General Public License v3.0
6 stars 4 forks source link

DCH-S160 Water Leak Sensor? #7

Open cvocvo opened 10 months ago

cvocvo commented 10 months ago

I have a couple of DCH-S160 water sensors that are no longer supported by D-Link. Will this project work with them? I’m using an old integration from here: https://github.com/postlund/dlink_hnap But I’m assuming this is updated / has better HA support?

If so, how can I test it out?

ldotlopez commented 10 months ago

Hi,

That integration was an starting point for this one, in fact it's listed on the README.

My integration doesn't support water leak sensors yet, for the sole reason that I don't have access to any device, but it's should be really simple.

To support water devices I need to know what is the "MODULE_TYPE" for the device.

If you have command line skills install this repository: https://github.com/ldotlopez/python-hnap/ and run python -m hnap with the appropriate flags to get that information.

For personal reasons I'm unable to do any home-assistant tasks in two weeks but I will check out this issue after that.

cvocvo commented 9 months ago

If you have command line skills install this repository: https://github.com/ldotlopez/python-hnap/ and run python -m hnap with the appropriate flags to get that information.

Clone the repo, pip install, and run it on Home Assistant?

To support water devices I need to know what is the "MODULE_TYPE" for the device. Is that equivalent to this? https://github.com/postlund/dlink_hnap/blob/774df531826bbaac926c537b5675f72fc2899f38/custom_components/dlink_hnap/binary_sensor.py#L37

Does this project yield better integration than the original one from postlund? / What does it do differently or improve upon?

Thank you!

ldotlopez commented 9 months ago

Hi, sorry about the delay, I was in the middle of a moving.

First, in order to support water leak sensor I need some info:

  1. Install the python-hnap module pip install python-hnap

  2. Run the following command and post the output python -m hnap --hostname whatever.hostname.or.ip.has.your.device --password 123456 # Replace the password

About your other question, postlund's integration didn't support siren devices (which is the device I own) also hasn't been updated in more that two years. Some other projects around github support HNAP devices in some other forms (via some api proxies written in node).

My goal with this project was to provide a common, extensible and updated ground for all HNAP devices.

I can't recommend postlund's over mine or otherwise, I haven't check postlund's one since I started this project. Use the one that suits better for you. However, if you provide some information about water leak sensor I will try to integrate them into this project.