I have extracted my integration for the motion sensor (S150) into its own repository now, which is also added to HACS. Since adding support for S160 should be quite simple, I want to do that as well but I need some help. If you use one and want to help out, have a look in https://github.com/postlund/dlink_hnap/pull/2.
The integration is here for the motion sensor as well:
I’ve managed to get my s160 connected properly to my HA after resolving some issues with postlund’s help, but I am hitting an issue in terms of using automation for notification when the water sensor gets wet. Below is my automation.yaml snippet. If anyone can put some pointers that would be great:
- id: '1604513245230'
alias: Basement Laundry Water Notification
description: ''
trigger:
- platform: state
entity_id: binary_sensor.basement_laundry
to: 'On'
for: 00:00:01
condition: []
action:
- service: notify.mobile_app_sm_g950w
data:
title: Laundry Water Sensor
message: Laundry Room has detected water issue
data:
group: Water Sensor
mode: single
I’ve managed to figure out the notification issue. So the only issue now I am trying to figure out is how to get the dch-s161 to work with home assistant as i validated that the s161 does not work with postlunds dch-160 integration.
I would love some help setting this up with a DCH-161 sensor. I can get the entity to show up in HA but the state does not change from dry to wet when triggered. Any help would be appreciated.
nope, i’ve left a message with @postlund a few months ago to see if there is something else I can do to help troubleshoot/narrow the issue but no luck.
The last i’ve left it at was that the communication protocol the s161 uses is different from the s160.
It’s really too bad. The sensors themselves are very good and relatively cheap.
For now I use IFTTT to trigger my water shutoff which works ok but I would love to have it all local.
@stamandr yea, i managed to get the notification to work on my phone at the end. I’ve had to use the GUI to do it, but below is the yaml snippet from my automations.yaml
alias: Basement Laundry Water Notification
description: ''
trigger:
- platform: state
entity_id: binary_sensor.basement_laundry
from: 'off'
condition: []
action:
- service: notify.mobile_app_sm_g950w
data:
title: Laundry Water Sensor
message: Laundry Room has detected water issue
data:
group: Water Sensor
mode: single
Also as a side note the above works great, compared to the native D-Link app that off and on notifies me about water incidents. Just wished I could get the S161 to talk to home assistant, but I haven’t had any luck to date with it.