take your D-Link DCS-D150 out of the cloud and into Home Assistant

I wouldn’t especially recommend the D-Link DCS-D150 motion sensor but it does have some features that had me buy it. Firstly it plugs into a wall socket above a worktop so it can sense when someone is in the kitchen. (I can then turn on the lighting – whatever). Secondly this motion sensor was one of the few sensors that worked without the need for a separate hub. It could send its ‘motion detected’ signal to IFTTT and I could then make the lights turn on and more. At £25 that’s not bad.

A few years later D-link went over to a new system and the DCS-D150 was no longer supported. A few years later still, in 2020, D-link dropped support for IFTTT so that I was left with a stupid sensor that talked to a stupid app that talked to nothing.

Luckily I found a custom component for Home Assistant. The motion sensor is back in use and can now be ‘heard’ over the network. If you want a motion sensor today (2020) consider using an RF or Zigbee model. And if you’ve any words to feedback to D-link for ‘killing off’ support like this please add them below.

The D-link motion sensor was abandoned and its IFTTT cloud service was shut

Install the Dlink component into Home Assistant

Go to the file editor in the Home Assistant frontend.

  • In /config create a new folder ‘custom_components’.
  • In the custom-components folder make another folder ‘dlink_motion_sensor’
  • Add the three files shown (go to the end of this thread to find the files)
  • Still in File editor open your configuration.yaml and add this code to the binary_sensor section.
  • Save the edits and completely shut down and restart the Raspberry Pi
  - platform: dlink_motion_sensor
    name: kitchen_motion
    password: 9957XX
# the password or PIN is printed on the sensor. The ip address can be found # via the router. 

After Home Assistant restarts

You’ll now have an new entity called binary_sensor.kitchen_motion. When you walk past the sensor the state changes from Open to Closed.

Create an automation to turn on the lights and start a timer

id: '1566591XX7312'
alias: motion day lightson
entity_id: binary_sensor.kitchen_motion
from: 'off'
platform: state
to: 'on'
after: 06:30
before: '23:00'
condition: time
data: {}
entity_id: switch.cupboard_lights
service: switch.turn_on
data: {}
entity_id: switch.ceiling_lights
service: switch.turn_on
data: {}
entity_id: timer.ceiling_lights
service: timer.start

Create an automation to turn off the lights when a timer finishes

id: '1578935XX2018'
alias: motion light timer finished so turn off lights
entity: timer.ceiling_lights
event_type: timer.finished
platform: event
alias: ''
data: {}
entity_id: switch.ceiling_lights
service: switch.turn_off
data: {}
entity_id: switch.cupboard_lights
service: switch.turn_off

Leave a Reply

Your email address will not be published. Required fields are marked *