Skip to main content

How to make a Smart Motion Sensor out of a Night Light Smart Plug.  An excellent solution to easily put a motion sensor in a room where you couldn't before for automated lights. You also get a night light and smart plug in the same package for less than $20!

Parts List
Smart Plug - iMah or iClever
PIR Motion AM312 Sensor - 2 pack or 1 pack 

Soldering Iron Station
Helping Hands(as shown)
Better Helping Hands
0.015 Solder
Female Jumper Wires
USB FTDI for Flashing

(click the pic to zoom)

Home Assistant Configuration YAML - Samples


switch:
  - platform: mqtt
    name: "MotionNite Switch"
    state_topic: "stat/MotionNite1/POWER1"
    command_topic: "cmnd/MotionNite1/POWER1"
    availability_topic: "tele/MotionNite1/LWT"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false

binary_sensor:
  - platform: mqtt
    name: "MotionNite PIR"
    state_topic: "MotionNite1/PIR"
    availability_topic: "tele/MotionNite1/LWT"
    qos: 1
    payload_on: "1"
    payload_off: "0"
    payload_available: "Online"
    payload_not_available: "Offline"
    device_class: motion

light:
  - platform: mqtt
    name: "Motion Night Light"
    state_topic: "stat/MotionNite1/POWER2"
    command_topic: "cmnd/MotionNite1/POWER2"
    availability_topic: "tele/MotionNite1/LWT"
    brightness_state_topic: "stat/MotionNite1/RESULT"
    brightness_command_topic: "cmnd/MotionNite1/Dimmer"
    brightness_scale: 100
    brightness_value_template: "{{ value_json.Dimmer }}"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false