Wemos D1 Mini (AliExpress affiliate) - [ Ссылка ]
5 Pack Hc-sr501 Pir Motion Ir (AliExpress affiliate) - [ Ссылка ]
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 WRITTEN ARTICLE - [ Ссылка ]
► MY GUIDE - ON SALE
Smart Home Getting Started Smart Home Guide v2.0 - [ Ссылка ]
► SUPPORT MY WORK
Patreon – [ Ссылка ]
Paypal – [ Ссылка ]
Bitcoin – 1GnUtPEXaeCUVWdJxCfDaKkvcwf247akva
Revolut - [ Ссылка ]
► COME AND SAY “HI” on:
My Discord server: [ Ссылка ]
My Twitter: [ Ссылка ]
► AFFILIATE LINKS
Wemos D1 Mini - [ Ссылка ]
5 Pack Hc-sr501 Pir Motion Ir Sensor Body Module Infrared - [ Ссылка ]
jumper (Dupont) wires - [ Ссылка ]
USB to microUSB Cable - [ Ссылка ]
USB Plug Adapter 1A - [ Ссылка ]
NodeMCU-32 ESP32 wifi+Bluetooth (ESP32) - [ Ссылка ]
NodeMCU V3 (ESP8266) (AliExpress affiliate link) - [ Ссылка ]
Ubiquiti UniFi Dream Machine (UDM) - [ Ссылка ]
Raspberry Pi 4 4GB Starter Kit with 32GB Micro SD Card - [ Ссылка ]
Raspberry Pi Zero W kit 2 - [ Ссылка ]
Raspberry Pi Zero W Official Starter Kit (Amazon Affiliate link) - [ Ссылка ]
Tech that I’m using right now - [ Ссылка ]
Get $100 in credit over 60 days for DigitalOcean - [ Ссылка ]
► CRYPTO AFFILIATE LINKS
Sign up for Crypto.com and we both get $25 USD (Referral code: xn86atnceg) - [ Ссылка ]
Coinbase - Get $10 in Bitcoin when you buy or sell $100 or more - [ Ссылка ]
Binance - One of the biggest Crypto currency exchange - [ Ссылка ]
► 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
# automations.yaml entry
alias: When PIR motion sensor is activated
description: ''
trigger:
- platform: state
entity_id: binary_sensor.pir_sensor
to: 'on'
condition: []
action:
- service: light.turn_on
target:
entity_id: light.shellybulbduo_8caab5616d5c
mode: single
► USEFUL LINKS
PIR Sensor 3D printed cases - [ Ссылка ]
ESPHome PIR Sensor page - [ Ссылка ]
✅ 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!
![](https://i.ytimg.com/vi/n8RYzzCg1Fg/maxresdefault.jpg)