Cheap DIY Motion Sensor that works with ESPHome & Home Assistant

preview_player
Показать описание
Passive Infrared Sensors or #PIR sensors for short or just Motion Sensor are completely supported by #HomeAssistant and ESPHome. I have a question for you why to buy an expensive motion sensor when you can #DIY for cheap. In this video I will show you what parts you will need, how to install ESPHome, how to add the motion sensor to Home Assistant and how to make automations.

Using smart motion sensors on strategic places at your home is one of the quick wins when you are turning your home into a smart home. Of course you can use out of the box motion sensors like Shelly Motion or other similar, but they are not coming cheap, especially if you have to buy a lot of them. That is why we are going to create one that will cost around 4 US dollars and it will take only few minutes of your time to make it. I will show you everything step by step and at the end we will see a real demo with Home Assistant automation.

Let’s see how.

► TIME TABLE
00:00 Intro
01:38 What is needed for the DIY Motion Sensor?
03:04 How to connect the D1 Mini to PIR sensor?
03:34 Install ESPHome as Home Assistant add-on
05:00 Editing the ESPHome configuration
06:59 Install ESPHome on D1 Mini
07:55 Add the DIY Motion sensor to Home Assistant
09:02 How to make Home Assistant automation with the DIY Motion Sensor?
10:38 Outro


► MY GUIDE - ON SALE

► SUPPORT MY WORK
Bitcoin – 1GnUtPEXaeCUVWdJxCfDaKkvcwf247akva

► COME AND SAY “HI” on:

► AFFILIATE LINKS

► CRYPTO AFFILIATE LINKS

► ESPHome configuration
esphome:
name: pir-sensor-1
platform: ESP8266
board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
password: “512345rt234gwef”

wifi:
ssid: "A IoT"
password: “SmashTheLike”

# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Pir-Sensor-1 Fallback Hotspot"
password: “somepass”

captive_portal:

binary_sensor:
- platform: gpio
pin: 13
name: "PIR Sensor"
device_class: motion

► HOME ASSISTANT MOTION SENSOR AUTOMATION
alias: When PIR motion sensor is activated
description: ''
trigger:
- platform: state
to: 'on'
condition: []
action:
target:
mode: single

► USEFUL LINKS

✅ Don't Forget to like 👍 comment ✍ and subscribe to my channel!

► DISCLAIMER
Some of the links above are affiliate links, where I earn a small commission if you click on the link and purchase an item. You are not obligated to do so, but it does help fund these videos in hopes of bringing value to you!
Рекомендации по теме
Комментарии
Автор

What I like about these is that I don't have to worry about changing the batteries. I added some code in esphome to show the wifi signal strength and up time. It lets me know how my wifi network is preforming. Just add this to the yaml code and change the name to whatever you are using.
sensor:
- platform: wifi_signal
name: "PIR WiFi signal"
update_interval: 60s

- platform: uptime
name: "PIR uptime"
unit_of_measurement: "min."
filters:
multiply:

vegaswayne
Автор

I've used Home Assistant for several years now and noticed the Esphome integration, but had no idea how easy it was to use. Just ordered 5 nodemcu and 5 motion sensors. Now I can have my lights come on as I ever l enter certain times. Can't wait to try them out.
Thanks for this great tutorial. 👍

PCman
Автор

Super walkthrough! So cool too.... that GRAY thumbs up symbol is a great "mouse click" sensor, turns blue on a click, simply amazing!!!

jerrydon
Автор

Great video! The real hang-up is packaging these DIY devices, especially for outdoor use.

abe
Автор

I tried the blue thumb automation and it worked! 😂😂

e_v_a_l_ca
Автор

It is possible do with zigbee ? it will be greate because it will use battery. Thanks!

gabyxze
Автор

SUGGESTION..
Could you make a tutorial on building a cheap Wifi Door Sensor.? I'm sure using these D1 Mini boards and a cheap (Reed/Magnet) contact switch would be very useful to a bunch of people. Thanks in advance. 👍😊

PCman
Автор

Hi, I have my Home Assistant running on Synology NAS on virtual machine. Everything went ok until Install, where I got a message "No serial devices found". Validation went OK. I plugged in the sensor into USB of the NAS drive.
Any ideas what went wrong and how it can be installed? Thank you !!

TheOzembuch
Автор

Another great video. Is there an easy solution to turn these into battery powered devices?

sforeman
Автор

Is there any way yo add a led light or led strip to turn on where motion is detected?

sebastiancojuharii
Автор

Followed the on al the way through so excellent. Love your work

gilesh
Автор

Great video!!!. I made Two of this sensor but I have a lot of false event. Have you the same problem?

AlejandroMusso
Автор

Excellent guide! Straightforward and to the point! Thanks!

blakeXYZ
Автор

I like your videos, very easy to understand, thanks

rachidyekini
Автор

thanks for the tipp - using ikea trådfri motion sensor for €9 per piece but they suck
after motion was detected you will have 60 seconds until the device will take a new motion detection - so deadtimer
another questions: how do you power them? microusb is not available all the time where I need this sensors. any ideas?
are these kind of ESP modules also available for Zigbee? I love it since I didn't have any outages or issues with that protocol.

ML
Автор

Excellent solution, cheap and effective! I looking for similar solution but working with zigbee instead of wifi. Do you know how to do it and can you please make a video explaining how to do it?

ignaciotorrecillas
Автор

Is it possible to add bot pir and a dht22 for example to one board?

bornaradusin
Автор

#PIRowned the only issue is that the motion sensor must be attached to the Rasberry-pi/Laptop is there a way to use a battery to power it also the wireless option how it works ? thanks great video

hkhald
Автор

nice, wish i knew how to add a flexible timer to switch the light off

ecoterrorist
Автор

Can you explain about the ESP Mesh feature? Is it something the can be used alongside ESPHome? Thanks

frogeye