Plug-In Motion Sensing Night Light
14
Download
5
Likes
0
Makes
Create your own IoT controlled, motion sensing nightlight.
I used a short strip of 5V warm white LEDs and two AM312 PIR motion sensors connected to a sonoff SV. All powered by an Apple USB Plug.
You'll need either a USB cable with a short bend radius from the USB connection to the wire, or a 90 degree USB cable, to make sure the USB cable can bend downwards into the body of the device.
Set up the sonoff SV so that the wifi circut and relay use the same power suppy (connect jumper to pins near input terminal.
I used ESP home to create a sketch with one "output" with the platform "gpio" on pin GPIO12 named "relay", then a "light" with the platform "binary" using the output "relay". This will cause the relay to be discovered as a light in homeassistant instead of a switch. Also, the sketch has two binary sensors (platform = gpio) for pins 05 and 04, to create the motion sensor entities.
I used node-red to trigger the light to turn on when motion is detected and my home
I used a short strip of 5V warm white LEDs and two AM312 PIR motion sensors connected to a sonoff SV. All powered by an Apple USB Plug.
You'll need either a USB cable with a short bend radius from the USB connection to the wire, or a 90 degree USB cable, to make sure the USB cable can bend downwards into the body of the device.
Set up the sonoff SV so that the wifi circut and relay use the same power suppy (connect jumper to pins near input terminal.
I used ESP home to create a sketch with one "output" with the platform "gpio" on pin GPIO12 named "relay", then a "light" with the platform "binary" using the output "relay". This will cause the relay to be discovered as a light in homeassistant instead of a switch. Also, the sketch has two binary sensors (platform = gpio) for pins 05 and 04, to create the motion sensor entities.
I used node-red to trigger the light to turn on when motion is detected and my home
Hai stampato questo modello? Accedi e condividi il tuo make!
Accedi per lasciare un commento
AccediAncora nessun commento – sii il primo!