DIY motion sensor for Home Assistant

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • Jump to the different parts of this video with the links below!
    01:22 Part 1: Download ESP Home add-on for Home Assistant
    02:50 Part 2: Hook-up sensor hardware
    06:17 Part 3: Program motion sensor and setup WiFi
    12:52 Part 4: Configure Home Assistant
    14:52 Part 5: Create an automation to turn on a light
    Products used:
    ESP32 (2-pack): amzn.to/2yLSLGR
    Motion / PIR sensor (5-pack): amzn.to/2W0JouT
    Hook-up wire: amzn.to/2VVfMPP
    The above are Amazon affiliate links. If you use them to purchase your gear, it helps my channel out without any additional cost to you.
    If you enjoyed this video and would like to make a small donation, you can buy me a beer here at www.buymeacoff... Thanks for your support!

ความคิดเห็น • 34

  • @ronbrown6208
    @ronbrown6208 3 ปีที่แล้ว +1

    Just getting started with Home assistant, and this really helped me out. Thanks

  • @pereirabrian
    @pereirabrian 3 ปีที่แล้ว +1

    Great video. It worked for me. I used a PIR sensor with the TPLink Kasa Smart bulb. :-) Just a note for all. I had flashed this code on an ESP8266 which was used with an earlier project (which was added to Home Assistant). This sensor did not show on Home Assistant no matter what steps I did for troubleshooting like reboot HA and re-flash the code (several times). It did get an IP address from the router DHCP and I could ping the IP address. Only after I deleted the previous project from ESPHome did I get a Discovery message. Not sure why this happened as both projects were different with different sensors. I only re-used the ESP8266.

  • @MrBobWareham
    @MrBobWareham 3 ปีที่แล้ว +1

    I have joined your channel as I am new to HA and need to learn, your video was very good and easy to follow

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  3 ปีที่แล้ว

      I hope you find Home Assistant enjoyable. Definitely a learning curve to it but it does get easier as you go and the HA programmers are continually working on updates and improvements.

  • @jondoe5866
    @jondoe5866 3 ปีที่แล้ว +1

    Great job John.

  • @GioBen68
    @GioBen68 4 ปีที่แล้ว +1

    Very well explained 👍🏼 thanks

  • @WRod1464
    @WRod1464 3 ปีที่แล้ว +2

    Great video.
    May be i missed it, but how would i power it when i finish programming and im putting it in an area.

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  3 ปีที่แล้ว +1

      I typically use cheap usb phone chargers and a short cable.

  • @WRod1464
    @WRod1464 3 ปีที่แล้ว

    How do i use a battery to power up?

  • @phillipzx3754
    @phillipzx3754 2 ปีที่แล้ว +1

    Could you link to where you bought that particular ESP 32 board? It has an external wifi antenna connector whereas the Amazon link doesn't.

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  2 ปีที่แล้ว

      Hi Phillip, I bought that board in 2019 so no longer available on Amazon for the exact one, but I did find this 6-pack of them which was the best deal I could find. For just 1 board they are about $11, and this 6-pack is $38 right now. www.amazon.com/AiTrip-ESP32-DevKitC-Development-ESP32-WROOM-32U-Arduino/dp/B088QVQCTL/

    • @phillipzx3754
      @phillipzx3754 2 ปีที่แล้ว +1

      @@JohnsDIYPlayground Dang! That's a great deal for a 6 pack! Thank you. I don't know how I missed that as I (thought) I had done a good job of hunting for them but I guess not. 🙂
      I added them to my shopping list for my next Amazon order.

  • @pjcoca2
    @pjcoca2 3 ปีที่แล้ว +1

    hello, I have followed the tutorial but with esp32-cam and in home assistant when there is no newcomer it does not stay fine in undetected. it is changing all the time detected - not detected, any ideas?

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  3 ปีที่แล้ว

      There are 2 potentiometers on the motion sensor, 1 for sensitivity and 1 for time delay after detection. Try adjusting the sensitivity potentiometer.

    • @pjcoca2
      @pjcoca2 3 ปีที่แล้ว

      I have tested sensitivity and it remains the same. I have tested on protoboard and it works fine. I don't know how to fix it

  • @patmac
    @patmac 3 ปีที่แล้ว +1

    Great video. You do a good job explaining... Tx I went down the rabbit hole w/ home automation and Hasio....yikes. Working on my first project w a D1 mini (esp8266) pir and relay. For the life of me I can get the yaml code correct. All im tying to do it turn on shop lights when motion detected. Can I program the D1 to do both sense the movement and trigger a simple replay? What am I missing? I can do it w/ a seperate Sonoff through automation but that is over kill. I just want to switch a non-line contact to make continuity so to make the Sonoff mini trigger relay... Im over thinking it.. lol

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  3 ปีที่แล้ว +1

      Should be able to handle multiple inputs and outputs on your esp8266.

    • @patmac
      @patmac 3 ปีที่แล้ว

      @@JohnsDIYPlayground Thanks, Im sure it can but the code has me stumped. I'll get it though. ;) Im not a coder. ;)

  • @firepilot17
    @firepilot17 3 ปีที่แล้ว

    Do you think this could be made waterproof for outdoor use?

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  3 ปีที่แล้ว

      Yes. Amazon carries water tight cases. For the sensor you could drill a hole in the case and then silicone it in place.

  • @lezbriddon
    @lezbriddon 3 ปีที่แล้ว +1

    why usb and not wifi?

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  3 ปีที่แล้ว

      USB is just for initial programming / flashing. It’s WiFi after that step.

  • @TwanJaarsveld1
    @TwanJaarsveld1 3 ปีที่แล้ว +1

    This or tasmota ?

  • @cosmefulanito5933
    @cosmefulanito5933 4 ปีที่แล้ว

    Clickbait. You purchase the motion sensor. It's no diy.

    • @JohnsDIYPlayground
      @JohnsDIYPlayground  4 ปีที่แล้ว +5

      It doesn’t come pre configured to work with Home Assistant. Yes you buy the sensor but there’s still work to be done to connect to HA.

    • @cosmefulanito5933
      @cosmefulanito5933 4 ปีที่แล้ว

      @@JohnsDIYPlayground Change the title to "CONNECT a motion sensor to Home Assistant".

    • @berndheiden7630
      @berndheiden7630 3 ปีที่แล้ว +4

      @@cosmefulanito5933
      Go buy a motion sensor and let us know, what it did without you doing a hell of a lot to design, install, program, test and debug the system that it needs to be connected to. And that, Mr. Wise Guy, is normally called DIY among normal people. Like when you build a table you do actually buy nails, screws and even woodglue, not to mention the wood. And you hardly ever build your saw or drill. So that is not DIY? Find another hobby and keep your wisdom to yourself!

    • @cosmefulanito5933
      @cosmefulanito5933 3 ปีที่แล้ว

      @@berndheiden7630 You do not need to debug anything... It's a really easy task. Just connect it to any GPIO available and configure HA. If you use a PC and not a Raspberry PI, then connect it to any input line of any serial port...
      You do not need ESP Home.

    • @lezbriddon
      @lezbriddon 3 ปีที่แล้ว +6

      today i made coffee, then realised i didnt as i never grew the beans