D-Link Motion Sensor DCH-S150

It’s such a fantastic device in our home and enables so much - all thanks to your work!

@postlund - quick question do I need to have a dlink_device.py for each motion sensor ? Or can I run multiple sensors from one instance. At the minute I have dlink1.py dlink2.py etc

You should only add one set of files, you set up each new motion sensor as a binary_sensor (with dlink_motion_sensor as platform) in your config.

1 Like

One thing I noticed.

I switched to 802.11r and can confirm the DCH-S150 don’t support it. After some time they reset back to factory Wi-Fi

I reverted my Wi-Fi and got two of the motion sensors connected again. However home assistant wouldn’t start. No error in the logs the UI would just not come up and the back en process was in a hung state. I finally figured that I needed to get my other motion sensors running to match the config for HA UI to work. Could there be something in the custom component that stops HA loading if the sensor is offline?

it works perfectly, great job! thank you

@postlund and @warner83 how to change this new error on 0.88+:
Integrations need to be in their own folder. Change binary_sensor/dlink_motion_sensor.py to dlink_motion_sensor/binary_sensor.py. This will stop working soon

And what to do with dlink_new.py?

dlink_new.py to sensor.py?

I have pushed an update:

You should not use dlink_new.py, just remove it.

1 Like

@postlund thank you! What about dlink.py?

Save that as well. Keep the same directory and file structure I have and it should be fine.

Thank you very much! @postlund have you maybe implemented data from @warner83 to restart sensor every 3 hours?

No, that’s not part of my Implemention. I haven’t had time to look at it, but I might add it later.

Thanks for help

Thanks for updating this.

Hello,

I don’t know if this forum is still active. I am trying to write some c code to work with these dch-s150 sensors. One problem is that after a day and a half or so, they seem to “hang” and won’t respond to anything unless I unplug them, and putthem back in an outlet again.
Also, I am looking for the XML/soap to interface with them (I figured out the lastmation, there seem to be two different interpretations

Ron

Has anyone managed to update this custom component to make it compatible with 0.92 version of homeassistant?

Got it working.

Just add an empty __init__.py file to your dlink_motion_sensor folder. And make sure you’re using latest update from postlund

I’ve added that file, correct folder structure/naming and I use the latest available code from @postlund which is 2 months old or so, however, the problem is that after update to 0.92 it says

Configuration invalid

Integration dlink_motion_sensor not found when trying to verify its binary_sensor platform.

Try removing/comment out the sensor from your .yaml config first and then restart with the dlink sensor still in your custom component folder. Then add dlink_motion_sensor back to your config after restart. Config should be valid after that and then restart once more

It worked, thanks!