$5 DIY Wireless MQTT Smart Home Window Sensors

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • Bare Reed Switches: amzn.to/2qJ7Wcg
    ESP-01 Microcontrollers: amzn.to/2HJ8xTo
    CR2032 Batteries: amzn.to/2JWVgY1
    Resistors: amzn.to/2J67k8c
    Soldering Iron: amzn.to/2JUP3Mm
    USB to TTL Adapter: amzn.to/2Hak9BW
    3d Printer: amzn.to/2vqMpuz
    Bucky Ball Magnets: amzn.to/2vqMBdh
    *As an Amazon Associate I earn a % of qualifying purchases at no cost to you.*
    Arduino code on github: github.com/the...
    STL Files:
    Main Case: github.com/the...
    Case Cover: github.com/the...
    Magnet Holder: github.com/the...
    Support my channel:
    Patreon: / thehookup
    Tesla Refferal Code: www.tesla.com/...
    Music by BenSound.com

Комментарии • 276

  • @DriftwoodME
    @DriftwoodME 4 года назад +14

    I’m got a Wyze bridge hooked up to my pi, then I use the custom integration to bring the Wyze sense into HA. With this I can get their motion sensors for $6 each, and their door and window sensors for $5. And their batteries last a year. Mine have been working great so far and update instantly in HA

  • @harrison298
    @harrison298 5 лет назад +7

    I just discovered your channel when researching the SONOFF basic, and I love it. Your videos actually make these projects feel achievable for mere mortals like myself. Thanks!

    • @TheHookUp
      @TheHookUp  5 лет назад

      Glad to hear it, if you need help with a project just leave a comment and I'll see it.

  • @romwil
    @romwil 8 месяцев назад

    It’s a great solution for something that should never be moved or opened. A great way to also make a lock with included alarm if you don’t correctly disable it by moving the magnet with the sensor. Very neat project to build on due to the power disabled normal state. Or have an always ready to go ‘wipe it all’ kill switch handy to purge drives.

  • @russzaccari7761
    @russzaccari7761 2 года назад +1

    @the hook up I sure wish you'd do a remake on this with a USB C or USB Micro jack for powering. I found this video looking for MQTT sensors to put in refrig & freezer doors. Since I'm doing a powered device with an outlet behind it, I don't really want to replace batteries ever :) Thanks for the video!

  • @ddee2501
    @ddee2501 4 года назад +4

    As an electrician, i always suggest clients put in more wiring during building stage !!

  • @kabturek
    @kabturek 6 лет назад +27

    You should use a static ip address for your esp - it should lower the time to connect to 2s or less

    • @TheHookUp
      @TheHookUp  6 лет назад +10

      SornDP suggested that below. That's in my weekend plans.

    • @ahmedalshamsi1723
      @ahmedalshamsi1723 4 года назад

      @@TheHookUp I am facing a problem with knowing what to choose on node-red can you help me with making a tutorial and not depending on other channels vids this is a suggestion that will help you increase the quality of your channel.

    • @ddee2501
      @ddee2501 4 года назад +1

      @@ahmedalshamsi1723 MQTT IN node connected to DEBUG node. Then configure MQTT IN node to your topic in code (PICK_UNIQUE_WINDOW_TOPIC)

    • @ahmedalshamsi1723
      @ahmedalshamsi1723 4 года назад

      D DEE hey thanks for the reply

    • @ahmedalshamsi1723
      @ahmedalshamsi1723 4 года назад

      @D DEE what about flashing the firmware first to the esp8266 0-1 and then flashing the sketch. Cause whenever i try to compile a sketch it does not work, even flashing the firmware to the esp8266. I bought ftdi, usb to ttl and usb to esp8266, i worked first with @The Hook Up way using the ftdi but did not work. Then used usb to esp8266 wired the pins from the back of the usb to allow it to compile a sketch to the esp but did not work so as the usb to ttl. And know i bought an arduino but waiting for the jumper wires to hook em up. IN BRIEF HOW SHOULD I CONNECT THE ESP8266 0-1, THEN IF THE CONNECTION WORKED TO FLASH THE ESP FIRMWARE USING THE FLASHER AND FINALLY WILL IT WORK TO COMPILE A SKETCH.

  • @simon77809
    @simon77809 5 лет назад +4

    I've been watching your videos on node red, thanks by the way, and whilst I agree this is an interesting project, I would suggest you look at the CC2351 devices and Zigbee2mqtt software, so far I have bought aqara sensors Windows latch, temp/humidity and a double pole switch. All work brilliantly with MQTT, Home assistant and node red. And NO aqara xiaomi hub required, I also control my idea tradfris with this too no messing with upgrading them or linking to hue.

    • @TheHookUp
      @TheHookUp  5 лет назад +2

      Yep, it's a pretty good option these days. I believe this video predates zigbee2mqtt by 6 months or so.

  • @myounges
    @myounges 6 лет назад +2

    Nice video! Another solution are those RF Reed switches on AliExpress and use a sonoff RF bridge to listen for the rf signals and forward them via mqtt to nodered or HA. I used this setup batteries last year's on doors i open and close every day. And the cost is similar. The sonoff bridge was 8 euros i think. I use espurna firmware on the rf bridge. Hope it helps

    • @TheHookUp
      @TheHookUp  6 лет назад +1

      Yeah, DrZzs has a good video on the RF bridge with tasmota too. I ordered one to try it out but it was DoA and I haven't gotten another one yet.

    • @myounges
      @myounges 6 лет назад

      Using this RF bridge this gives you lots of things you can interact with. Smoke detectors, leak sensors, rf relays, garage doors, pir, alarm sirens, etc. I personally like espurna over tasmota just because it has a nicer gui but the functionalities are similar.

  • @bm830810
    @bm830810 4 года назад +1

    1- use a cheap boost converter (under 1$) to boost the voltage and get much more out of the battery
    2- use ESP-Now instead of wifi and make a simple custom esp-now to mqtt bridge for all your modules, you can reduce transmission time from 4s to around 0.1s, also the system would be much more secure
    now your batteries would last forever

    • @TheHookUp
      @TheHookUp  4 года назад +1

      Both really good suggestions. The purpose of this project was to make something as simple as possible, so I didn't want to add a boost converter and double the price and complexity of the board. I also wanted them to work independently of a hub which is why I decided against ESP-Now (although I did experiment with it and I do have a working version that utilizes it).

  • @StripesOO7
    @StripesOO7 3 года назад +2

    Imagine opening your windows less than 20 times in 6 years 🤯

  • @ericolson9695
    @ericolson9695 4 года назад

    I think this project is brilliant: outside-of-the-box thinking! Very clever.

  • @squalazzo
    @squalazzo 6 лет назад +3

    oh, great, an other brand new channel with very interesting tutorials! Thanks :D

  • @TecSanento
    @TecSanento 3 года назад

    You could use the normally closed leed part of the reed switch to determine if the esp should shutdown or not

  • @Zeric1
    @Zeric1 5 лет назад

    Cool idea of just using the reed switch to turn on the device. As others have pointed out battery life could be a concern on windows that are left open. I think the bigger thing for people to consider is the value of any security system if the intent is to catch a potential burgler, although it may be deterrent, especially cameras. The reality is burglaries only last at most 10 minutes, not enough time for a central monitoring company to verify with the owner that it's not a false alarm, call the authorities, and for the authorities to respond on site. My house was burglarized during the great recession, it was very obvious that they were only inside 5 minutes at the most, certainly not enough time for any alarm to do much. At the time I had two medium sized dogs, and an alarm sign prominently posted outside...neither, dogs, nor the fact I had an alarm system made any difference (the alarm system wasn't functional, but they didn't know that). Some rooms they didn't go into at all. I don't have any valuable jewelry or significant cash to speak of. They did take a cheap netbook and $40 sitting on the dresser. I was just glad they didn't injure my dogs. I now have hardwired security cameras that cover the full exterior of my house. I think that is a better deterrent. If one's intent is just to be reminded that a door or window has been left open, then sensors work well.

    • @TheHookUp
      @TheHookUp  5 лет назад +1

      Also a loud siren is good for making sure they don't stick around for long.

  • @JH_Tech49
    @JH_Tech49 5 лет назад +1

    nice project and nice video, but it would be better if more instructions on how to integrate it in Home assistant were provided. I am still a newbie :)

    • @TheHookUp
      @TheHookUp  5 лет назад

      If you use the updated code from this video: ruclips.net/video/2kLZ7DlP9KU/видео.html
      You will just add a sensor for each window like this:
      sensor:
      - platform: mqtt
      name: "Dining Room Window"
      state_topic: "windowStatus/diningRoom"

  • @nicholasrefalo7744
    @nicholasrefalo7744 5 лет назад +2

    Excellent solution Rob I've replicated this in my lab and it works great. Is there a way to adjust the code to stop the chip returning to the default state of closed? I want to use this on some windows which stay open for an hour or two and with the state returning back to close within 50seconds I don't know if my window is still open at the end of the day. I know this will drain the battery faster but I'm okay with that.

  • @Freestila
    @Freestila 4 года назад

    Use a sonoff rf bridge and standard rf window sensors. Sensors are around 5$ but use AA /AAA batteries and will work way longer. Also they have real open / close messages and sometimes anti tamper contact or battery low message

    • @JimBell20
      @JimBell20 4 года назад

      Ditto. I have 5 rf windows sensors with the sonoff rf bridge. Works great. Dr ZZs has a video on using these sensors with the bridge and where to get them cheap.

  • @TecSanento
    @TecSanento 3 года назад

    You could use the mac Adress for the unique Adress

  • @stupossibleify
    @stupossibleify 3 года назад

    I was about to ask about how you got the ESP8266 to deep sleep and then... GENIUS!

  • @yawarsaeed6499
    @yawarsaeed6499 5 лет назад

    Thanks for the prompt response.
    What I meant was that is it possible to get the sensor status notification when there is no internet access or connectivity.
    Waiting for your reply.

    • @TheHookUp
      @TheHookUp  5 лет назад

      Only if you have a local mqtt broker like a raspberry pi with mosquito and home assistant.

  • @johnjacobjinglehimerschmid3555
    @johnjacobjinglehimerschmid3555 5 лет назад +4

    Sweet this looks easy to do .....

  • @kennethbell4681
    @kennethbell4681 4 года назад

    Thank you for making this! I was looking for a cheap window sensor and it looks like I just found one!

  • @JohnnieHougaardNielsen
    @JohnnieHougaardNielsen 5 лет назад +1

    Wouldn't the three second delay mean that the alarm would not sound if the window is closed again quickly, cutting off power to the ESP-01? While that time is probably not realistic for someone to pass through the window before slamming it again, it could be feasible to throw some object inside the house, like some nasty gas, surveillance device, or whatever undesirable thing. I'm thinking that transmitting a 433Mhz signal (like from a wireless doorbell) could have a shorter reaction time than connecting to Wifi. It shouldn't add a lot of volume or cost to the window sensor.
    Another thing is that a somewhat smart miscreant could bring along a magnet to interfere with the sensor. This could be made harder by adding a second normally-open reed switch just outside the range of the installed magnets.

    • @TheHookUp
      @TheHookUp  5 лет назад

      Yep, these things fall under the "good enough" catagory for me, not "perfect". They have some downfalls and there are situations where they won't work (a wifi blocker or deauther would be the easiest route), but introducing additional complexity to the circuit seems like a waste just to cover those edge cases.

  • @pjrt_tv
    @pjrt_tv 4 года назад

    yeah, this kind of sensors make more sense in a normally-closed window environment (like Florida). But I'm in NY, and opening windows throughout the year is necessary. :(

  • @koenzele9579
    @koenzele9579 4 года назад

    I would like to see an update of this video with ESP NOW, very easy and less energy consuming.

    • @TheHookUp
      @TheHookUp  4 года назад

      The issue with ESP NOW is you also need a always on ESP8266 as the receiver (hub). I've played around with it but ended up sticking with the initial design. About a month ago I opened up all the windows to make sure they were still kicking, all messages came through as expected.

  • @MrGramcs
    @MrGramcs 6 лет назад +1

    Great videos please keep them coming, but I've got to say I love my Xiaomi sensors & switches running in Home Assistant but great to see an alternative.

  • @danielmoshi6214
    @danielmoshi6214 5 лет назад +5

    Open a window 20 times in 6 years? Must be a crack house!

    • @TheHookUp
      @TheHookUp  5 лет назад

      Florida. Only open the widows if you want hot wet air streaming into your house.

  • @garethsmith7628
    @garethsmith7628 4 года назад

    reed switches don't like switching much current at all, usually they are used in conjunction with a snubber circuit.

  • @bamc3835
    @bamc3835 3 года назад

    what if i don't want to do a diy window sensor? can you please make a video about different security system window sensors that won't easily be tripped by somebody who is just a regular guy (for example, somebody can just peel off the simplisafe door and window sensor and come back later and reglue it back on like it didn't happen)...pls feature both wired and wireless versions...also would you have a video on a good setup for whole house security system setup for a new build - really need that right now...thanks and love your channel; just wish i am more of a techy diy type

  • @johnfrankforther8162
    @johnfrankforther8162 6 лет назад

    Looks like a great article. What about how to set up MQTT software to communicate with the boards?

  • @cornstarch28
    @cornstarch28 6 лет назад

    Great write up and lots of detail. Thanks for the great ideas!

  • @NextLevelCode
    @NextLevelCode 4 года назад +1

    You should use a tiny boot converter to get the full life from the batteries :)

    • @TecSanento
      @TecSanento 3 года назад

      They take up even more energy

  • @JohnVanderbeck
    @JohnVanderbeck 2 года назад

    I know this is an old video but I'd love to some someone like you dig into making DIY devices for Thread. I've been doing a lot of digging and slowly learning but looking at building something like these window sensors that work with Homekit using Thread.

    • @TheHookUp
      @TheHookUp  2 года назад

      Thread is going to be replaced by, or rather is going to become Matter. At this point there's no reason to make a purely thread device. I actually just ordered a matter dev board and will be doing a video on it.

    • @JohnVanderbeck
      @JohnVanderbeck 2 года назад +1

      @@TheHookUp My understanding is Matter is an application layer that will use Thread as a preferred transport protocol which is why I said Thread but yes Matter is the end goal here :)

    • @TheHookUp
      @TheHookUp  2 года назад

      @@JohnVanderbeck Your understanding is correct :)

  • @klincecum
    @klincecum 6 лет назад

    It would make it a little bigger, but if you add two relays, you could have it completely unpowered, latch the power on relay, send the messages you want, and then have the 2nd relay break the power connection and turn it completely off again. No deep sleep required. May not be for this particular project but maybe give someone some ideas. Thx for the video, it inspired some other projects.

    • @Wrenchmonkey1
      @Wrenchmonkey1 5 лет назад

      The current a relay would draw would likely be more than the sleep function draws.
      Bottom line is, it's probably not the best option for windows that are opened frequently.

  • @boviac
    @boviac 5 лет назад

    Love your detail and DIY sharing attitude! However, now WYSE Sense Door/window sensors 4 for $20.

    • @TheHookUp
      @TheHookUp  5 лет назад

      Yep, they're pretty cool. Proprietary protocol, but still cool.

  • @MrBobWareham
    @MrBobWareham 5 лет назад

    Would love to build one but want to do my front door and that would mean at least two times a day so if I changed the battery to a rechargeable battery would it last longer for a front door? Thanks for the video and project Bob-in the UK

  • @gileansolomonsz6931
    @gileansolomonsz6931 3 года назад

    Hi Mate, awesome video and great to be on the hook up. Totally new to the entire home automation and only got hooked onto it during lock down so bare with me. I followed this video ordered the parts and got them last week. have made the window sensor and it works as expected and I installed a mqtt snooper app and i can read the open close messages. My issue is how do i now add it to my home assistant like you had on your video where it monitors all the windows

    • @hbosch5223
      @hbosch5223 3 года назад

      Go to the HA forum and you should be able to find your answer with step by step mqtt setup.

  • @demps7765
    @demps7765 6 лет назад +3

    What are the chances of getting a dozen of those window sensor cases/cover/magnet holders?

  • @adambaker5854
    @adambaker5854 5 лет назад +1

    Rob, thanks again for all your awesome work. Two questions:
    1. The Amazon link for the buckyball magnets goes to 2.5mm magnets, but the holes in the magnet holder's .stl file sure looks to be near 5mm. What size magnets is the .stl file designed for?
    2. Have you ever thought about integrating a simple database into your Node Red flow, so that rather than have a "default" state, every time the sensor's state changes, it pushes the most recent state to a database, and THAT's the value that is displayed in a dashboard? That way, you know whether your window is actually open or closed...
    Thanks again!

    • @TheHookUp
      @TheHookUp  5 лет назад +1

      The problem is the device never knows when it is closed. It wakes when it goes from closed to opened, sends a message, then goes into deep sleep. Closing the window cuts all power to the device so it can't send a closed message.

    • @adambaker5854
      @adambaker5854 5 лет назад +1

      Thanks for your answer...that makes sense. How about the buckyball size?

    • @TheHookUp
      @TheHookUp  5 лет назад +2

      @@adambaker5854 ​ You are correct about that, mine are 5mm. For some reason I assumed the 2.5mm was a radius, but it appears that is the diameter. This is the correct size: amzn.to/2UG8u4K

  • @TheBauwssss
    @TheBauwssss 5 лет назад

    I would love to buy one but I think i'll modify it to use two or 3 AAA cells, since I open my windows a lot. I have not done the math but that should give it a LOT more opens.

  • @gokul5693
    @gokul5693 6 лет назад +1

    Dude this is cool stuff ....Keep it up...well described Tutorial...Thanks for sharing..

  • @berczidavid2813
    @berczidavid2813 4 года назад

    Best youtuber/teacher in the world!!!

  • @SornDP
    @SornDP 6 лет назад +3

    Very cool, I will be trying this for myself. I believe part of the 4 sec response time could be shortened by using static IPs rather than DHCP assigned ones. Is is possible to test that?

    • @TheHookUp
      @TheHookUp  6 лет назад +2

      Gonna try that out this weekend.

    • @shaunwhiteley3544
      @shaunwhiteley3544 6 лет назад +2

      The Hook Up, hi, did you try this? Any time improvement? I wanted to go all static ip for all my nodes but my router has a hard limit of 30 static addresses. Have you tried the Hassio dhcp addon? I need to check if that has a limit or other limitations? I’m saving this tutorial for when I manage to fix my 3D printer, I’ve messed all the settings up flashing the firmware, doh! Cheers

    • @lmaoroflcopter
      @lmaoroflcopter 5 лет назад

      @@shaunwhiteley3544 your router shouldn't limit anything. Instead of using static DHCP leases, just configure your DHCP pool to be smaller than the full subnet and allocate IPs yourself in the esp01 code.

  • @glen4cindy
    @glen4cindy 4 месяца назад

    I know this is a pretty old video but I'm having trouble getting the ESP device programmed. I've failed several times. I'm guessing I may have the wrong board selected. Can you help?

  • @linuxboi2869
    @linuxboi2869 3 года назад

    Onboard until I saw the open windows 20 times. I open my windows that many times in a day sometimes. Still have an upvote though dude!

    • @TheHookUp
      @TheHookUp  3 года назад +1

      Yeah, not good for your use case.

    • @linuxboi2869
      @linuxboi2869 3 года назад

      @@TheHookUp be good to see how long a CR2450 would last in comparison.

    • @TheHookUp
      @TheHookUp  3 года назад +1

      I think the next logical step is an A123

    • @linuxboi2869
      @linuxboi2869 3 года назад

      @@TheHookUp yeah that’s around 1600 mAh, would last a long time!

  • @starshipduck
    @starshipduck 5 лет назад

    Hi nice video! So I’m trying to follow your code but I’m not sure what is going on in the reconnect loop and why you set boot to true on the beginning as well as why you have certain if statements checking if boot equals true when it will be true in the beginning from the get. It would be good if you could add comments on why you are doing it this way. Also why is the while loop checking if client is NOT connected “!client.connected()”

  • @deez-nutskroll7223
    @deez-nutskroll7223 2 года назад

    I love these and have them in all my window’s but I’m not sure how to get it in home assistant. I did get it to notify me when a window is open with node red. But I know there’s a way of seeing them in Lovelace. Could you help me. Thanks

  • @mkrice2
    @mkrice2 6 лет назад

    Great video. Just what I wanted. You made it look easy. No I have to go to work!!!!

    • @TheHookUp
      @TheHookUp  6 лет назад

      make sure you check out the updated version: ruclips.net/video/2kLZ7DlP9KU/видео.html

  • @Micahberger1
    @Micahberger1 3 года назад

    I really appriciate your explaination. Great project.

  • @whatevah666
    @whatevah666 5 лет назад +1

    Hmm, the battery limitations is a bummer, any cheap/sane way of hardwiring it to a powersupply of some kind? I'm about to remodel the house sso putting stuff into the walls does not bother the the least, perhaps something over PoE would work in this case? I have a few of those switches.

    • @Wrenchmonkey1
      @Wrenchmonkey1 5 лет назад

      Just run low voltage wiring, and run it off a DC transformer. New construction is easy to wire up for stuff like this. Existing homes are a bit more difficult, hence the need for wireless...

  • @mrq3969
    @mrq3969 4 года назад

    I do all the above steps perfectly. Wifi connected. But what about node-red configuration? please help me. How can the home assistant add it?

  • @yurid7418
    @yurid7418 5 лет назад

    for wireless sensors should be used cheapest and low power solutions based on STM32 MCUs. For standard wireless alarm system should take less than two seconds to send alarm event. Otherwise the sensor can be destroyed by intruder person. Also system must monitor battery state that means to send message with battery state. Any way good start and system step by step can be improved.

    • @TheHookUp
      @TheHookUp  5 лет назад

      Using an STM32 kinda misses the point. The whole reason I made this was to be able to use them with WiFi without needing a hub. If you used an STM32 you'd need to use some other module like RF or wifi (in which case you'd be using both the ESP01 and the STM32).
      Check out my follow up video to this one, I was able to get the transmission time down to around 2 seconds using a static IP: ruclips.net/video/2kLZ7DlP9KU/видео.html

    • @yurid7418
      @yurid7418 5 лет назад

      @@TheHookUp Agree with you that for STM32 + nRF / CC11xx / CC25xx / OTHER_RADIO require some gateway to connect sensor over Wi-Fi . I found some gateway solutions based on ESP8266 like: github.com/derkzomer/nrf24l01-esp8266/blob/master/post.ino
      or github.com/1technophile/OpenMQTTGateway
      It could improve power consumption, extend range in case of use 868MHz / 915MHz . In near feature I planning to connect my Irrigating system over the similar gateway solution to MQTT broker located in Raspberry. It will be nice to collaborate and share and publish source code.

  • @guatagel2454
    @guatagel2454 5 лет назад

    Simple. Thank you!

  • @Stony5438
    @Stony5438 6 лет назад

    interesting idea. Could you do a project showing how to hook your projects up hardwired? Or at least to a hardwired power source?

    • @TheHookUp
      @TheHookUp  6 лет назад

      I use NodeMCUs for all of my hardwired stuff, but yes, one of the next videos will be using a hardwired microcontroller.

    • @willhutcheon4144
      @willhutcheon4144 5 лет назад

      The hardwiring isn't that bad. Making it look good an concealing the wires - that is the trick. Some people have old (disabled)) security systems and those wires running to normal contacts. You could convert those (leave the normal contact if it is working) and "remotely" locate at the other end of the wiring, giving clean, easy access to power/wiring. In this scenario, 1 NodeMCU or D1 Mini or ESP32 could likely monitor all of your windows/doors as desired. Now that would be awesome! -- Another idea is to use a "cell phone powerbank" get one that looks good, and just wire it nearby. It would last a long time, and easily change standard AA batteries (or recharge the bank). It all depends on esthetics/look and feel. it might be a good way to "test" and start by installing contacts, then worry about concealment after 1 month and deciding it's working well for you. Just a thought.

  • @FranciscoJGomez-CHSM
    @FranciscoJGomez-CHSM 4 года назад

    Few months ago I asked If you have a channel in microbiology, my son is estading , I think you are in that area.

  • @joemasterson8860
    @joemasterson8860 4 года назад

    How long do your batteries last? Thinking of putting this setup on my garage freezer to alert me when it doesn't close all the way.

  • @PhG1961
    @PhG1961 6 лет назад

    Very cool video ! Thnxs for sharing !

  • @martinsmith5419
    @martinsmith5419 4 года назад

    I am relatively new into smart home tech, could this be modified to be used with a battery-powered doorbell as the switch instead? Thanks for your help!

  • @hbosch5223
    @hbosch5223 3 года назад

    Is there a way to incorporate a delay in the reed switch action ? I want to create a wifi button from this, but I don't want to press the button and hold it while it boots and sends a message. Would this be some mosfet thing ? I've been using WyzeSense for a button with HA, but these sensors all full stop unreliable. I have 5 dead ones already. The amount of labor I've spent with debugging the WyzeSense problem could have paid for a hardwire of my house. Thanks

  • @ItianNerona
    @ItianNerona 4 года назад +1

    I really enjoyed this video. I am trying to create something out of an ESP-01. Is there a way to contact you?

  • @mumbles1justin
    @mumbles1justin 5 лет назад

    I like the the idea and may make a few myself for use on cabinets. But aren’t all your windows susceptible to deauth attacks?

    • @TheHookUp
      @TheHookUp  5 лет назад +1

      Probably not. Deauth only works on currently connected devices, but they would be vulnerable to ssid spoofing.

  • @nicksharp7680
    @nicksharp7680 3 года назад

    It is late and I have not slept for the past 28 hours so please excuse me if I'm missing something?
    The way I have seen this is, with the window closed, no current is passed, open the window and woosh, current passed, ESP boots, sends MQTT message to say the windows open.
    But...
    What if the window is not closed for a good while? surely the ESP is fully powered for that entire time thus draining battery?
    Would it not be better to have some timing circuit on the VCC that once the reeds are triggered runs for say 15 seconds then cuts VCC and puts everything back to 0 current?
    This would reduce battery drain a great deal.
    But like I said, tired... dead servers to resurrect.
    [Strummers Law: No input, no output]

    • @nicksharp7680
      @nicksharp7680 3 года назад

      OK. how about using an XOR to detect the stat change of the reed switch, that would be simple enough?
      Going to bed
      [The future is unwritten] Joe Strummer

  • @testchannel1834
    @testchannel1834 4 года назад

    Hi can you make a video with this hardware for a mailbox door open closed notifications system with 3 cr2032 in parallel

  • @jayare7750
    @jayare7750 5 лет назад

    Is there a way (being powered by a wall adapter) to make a door sensor that can send open triggers, closed triggers and get current status of the reed switch with an ESP-01?

  • @danielmosquera3512
    @danielmosquera3512 4 года назад

    Hi, i have a question... will the device create an entity automatically in hassio? i'm using mosquitto broker and in node-red i see the "close" and "open" message but i do not know how to integrate it to hassio lovelace as a window
    im trying this in my file sensors.yaml
    - platform: mqtt
    name: "window1"
    state_topic: "test/window1"
    but nothing. could you help me? thanks

  • @jeevakkuwar
    @jeevakkuwar 3 года назад

    Any way I can receive similar notification with Amazon Alexa?
    I am not using Home Assistant and would like such sensors to work with alexa

  • @rklauco
    @rklauco 4 года назад

    Set static IP for the ESP - will start MUCH faster ;)

    • @TheHookUp
      @TheHookUp  4 года назад

      I've got a follow up video to this where I set a static IP.

  • @RossCanpolat
    @RossCanpolat 3 года назад

    Is there a way to detect when the battery is low?

  • @davidscott153
    @davidscott153 4 года назад +1

    Great project! But I don't think most of people can do this. The WiFi definitely is not good choice for smart home applications, specially for the battery powered sensors. The LoRa wireless will be the best future for smart home. There is a new brand YoLink smart home products available on Amazon. The whole house smart security system including door sensor, leak sensor, smart plug and LoRa hub, all together cost under one hundred dollars. I strongly recommend everyone should use it and try this new long range tech.

  • @kylehase
    @kylehase 4 года назад

    Given that the default state is off, you wouldn't know if a chip failed or battery died without periodically testing each one.

  • @TecSanento
    @TecSanento 3 года назад

    Does it post "closed" when power drops out?

  • @aliayan1995
    @aliayan1995 5 лет назад

    you can add very small solar panel and rechargeable battery

    • @TheHookUp
      @TheHookUp  5 лет назад

      I'd love to do this, but it introduces a bunch of other circuitry (need a voltage regulator and a charging circuit).

  • @JamesMossR33
    @JamesMossR33 5 лет назад

    Sadly it appears that the four ESP-01s I bought must be the power hungry type. When I hook up to 3.3v it works perfectly in about 2 seconds, but when I use a new CR2032 straight out of the packet the lights come on then dim or go out, and no message is sent. Checking with a multimeter the cell voltage drops to ~1.4v when the circuit is made. I've nipped the LEDs off a couple of boards but no difference.

    • @TheHookUp
      @TheHookUp  5 лет назад +1

      That's a bummer. The case would need to be modified but I wonder how an A123 battery would do in this situation.

    • @JamesMossR33
      @JamesMossR33 5 лет назад

      @@TheHookUp Thanks for the steer I'll look into them, and thanks for the videos on these sensors. As I'm new to smart home stuff your videos have been gold.

  • @dannytech4709
    @dannytech4709 4 года назад

    Hi any update on this project ? Can this be accomplished with Esp home?

  • @msmadaram
    @msmadaram 5 лет назад

    have you ever work on android broker such as moquette or something like that ?

  • @hennieviljoen4335
    @hennieviljoen4335 4 года назад +1

    Hi The Hook up where is the home assistant setup for this project?

    • @hackup3841
      @hackup3841 3 года назад

      I would also like to know about the integration in home assistant. I subscribed Mosquitto mqtt broker to the topic of the sensor. But now I need to include it as sensor. I would like to integrate it as binary_sensor though. Anyone any ideas how to achieve that?
      In complex heating control with schedy in HA I see the window sensor switching from closed to open and back to closed from time to time. I just want it to show open and not send any more message on the mqtt topic. Is that possible?

  • @justinsarmento8809
    @justinsarmento8809 4 года назад

    Does anyone think that 4 AA's would be to much for it? I am looking at putting them on doors and would like for it to live longer then 20 openings.

  • @user-zr7kz4vs7c
    @user-zr7kz4vs7c 3 года назад

    Any cheap android tablet that you recommend for running Home assistant dashboard kiosk mode?

  • @junyulu1403
    @junyulu1403 3 года назад

    Better to buy coin cells with leads. U cannot solder directly to the coin cell or u will easily break it

    • @TheHookUp
      @TheHookUp  3 года назад

      No solder here, just press fit

  • @wholivelikethis
    @wholivelikethis 4 года назад

    this is some triple OG gangster shit

  • @aaaafaaaaf
    @aaaafaaaaf 6 лет назад

    Do you have the Arduino connection parameters for the esp1. thanks.

  • @rafac13
    @rafac13 5 лет назад

    Great video!

  • @DB-nl9xw
    @DB-nl9xw 5 лет назад

    Please review zigwee sensor or wifi door sensor

  • @KazimsChannel
    @KazimsChannel 4 года назад

    Still don't get how can it send close message? Reed relay disconnects power to ESP....

    • @TheHookUp
      @TheHookUp  4 года назад +1

      Last will and testament (lwt) is stored on the MQTT broker and basically says “if you don’t hear from me again, tell my family I love them”, except it just says “close” instead.

  • @oblongx
    @oblongx 6 лет назад

    very cool design

  • @ashoktvm
    @ashoktvm 4 года назад

    For me it dont go to closed with few seconds even after the esp01 is off but get closed after 22 seconds even if the esp01 is still on. How to rectify this

    • @bitterrotten
      @bitterrotten 4 года назад +1

      That 22 second delay is probably caused by your home assistant setup. I know my Raspberry Pi install with SD card is pretty lax with timings. I've read that moving it to SSD will speed things up.
      Your second problem with the window being marked as closed while it's still open, that's the way he's coded it. It only sends the open status once. He's using it for the notification that the window was opened rather than as a status indication. You could try playing with the ESP.deepSleep(0) value to make it keep sending an open status but then you'll get some weird toggling issues when your home assistant sends it's default closed value. There's a way to do this smoothly with an automation but I'm not good enough at HA to guide you.

  • @rottison
    @rottison 6 лет назад

    hi just got all the parts to make my first 10 units I was concerned about how small the magnets are. Do you use just one in each of the 3 holes? and to fasten them in I got a tube of super glue to put just a small amount in the hole then drop the ball in

    • @TheHookUp
      @TheHookUp  6 лет назад

      Yep, just one in each. you can put them next to the reed switch and hear them doing their thing. You'll hear a faint "click" when it disengages the circuit. Good luck! make sure you post a reply on how your build went.

    • @Conservator.
      @Conservator. 6 лет назад

      The Hook Up
      Still no reply from Dale L. Makes one wonder, might he accidentally have glued his fingers to the window?

  • @yawarsaeed6499
    @yawarsaeed6499 5 лет назад

    Awesome Project.
    Sir , can you confirm , do I still need to set up local mqtt broker on Raspberry pi to use this sensor.
    Please reply.
    Thanks

    • @TheHookUp
      @TheHookUp  5 лет назад

      Doesn't need to be local, you could use cloud mqtt if you wanted to.

    • @Zeric1
      @Zeric1 5 лет назад

      running a local MQTT server is more reliable and you have full control of who sees your data. If you were setting up MQTT devices for the first time, you could start with cloud mqtt for proof of concept, but would definitely move over to a local server. I started off directly with a local mosquito mqtt broker on a RPi a couple of years ago, it wasn't hard to setup...there are lots of "how to" sites and videos online.

  • @danhalliwell5397
    @danhalliwell5397 4 года назад

    HI, I have a Kerui Wireless Alarm System. I have all the door sensors and alarm panel setup but would love it to be intergrated via the Home Assistant. Does anybody know how I could do this at all. I am new to the Raspberry Pi but loving it. Any help would be much appreciated. Many thanks

    • @hbosch5223
      @hbosch5223 3 года назад

      If you have the Kerui I see on amazon, there is no real way to do this. It is a completely closed RF system without an integration point. I used wyzesense contact and motion sensors with HA, but reliability has been terrible. That is why I am looking at these or just getting the house hardwired.

  • @generonnebaum1989
    @generonnebaum1989 4 года назад

    Nice Video, I learned much. I hooked this up and started the debug program in Node-Red. I noticed though when I run the script code that it says "open" when I apply power to it on node-red. Then after approximately 23 seconds, it says "closed". I use mosquitto broker. The mosquitto says that it exceeded timeout and disconnected when I look at it even when I still have power on it. Is there a problem with the code. I can't seem to keep the ESP8266 alive. I have tryed two different ESP8266 modules and I am using a standalone power supply for 3.3V.

    • @TheHookUp
      @TheHookUp  4 года назад +1

      That’s what the program does. That is working as intended, this is not meant for windows that you will leave open.

    • @Xalies
      @Xalies 4 года назад +1

      if you still want one that stays open you need to keep the connection alive... heres one I have here pastebin.com/t5jiEwTS it only sends the open message on boot and sends "0" to another topic on loop and a closed when you disconnect

  • @davidwalker575
    @davidwalker575 4 года назад

    Hey, love your channel. I'm just getting started and trying to follow along. I get the following message when I both up the ESP-01 and check the Mosquito log on HA:
    1. New connection from 192.168.1.153 on port 1883.
    2. 1596619053: New client connected from 192.168.1.153 as KITCHEN_WINDOW (p2, c2, k15, u'mqttuser').
    3. 1596619075: Client KITCHEN_WINDOW has exceeded timeout, disconnecting.
    Any idea why it's timing out?

    • @TheHookUp
      @TheHookUp  4 года назад

      because the code turns the wifi radio off after a successful transmission

  • @madzur
    @madzur 5 лет назад

    Hello there and props for the very cool idea. I tried to follow your instructions, however it seems something is not right. I can get the Arduino IDE to program my ESP-01 with the supplied sketch, I even uncommented the few lines in your "static IP" sketch, however I don't see the ESP come online in my router's web interface and I also don't see any responses when connected to the ESP using a serial interface through Termite. Any tips on how to debug what is going on here, please?

    • @madzur
      @madzur 5 лет назад

      hey @thehookup, any tips, please? I tried different ESP01 chips (I have 3) and none of them seems to work. When I connect and disconnect them from the serial adapter some garbled text shows up in Termine, otherwise not even a single character. I’m pretty sure it's something simple, and being a noob, I can't figure it out..

    • @Wrenchmonkey1
      @Wrenchmonkey1 5 лет назад

      @@madzur
      Triple check your SSID and password. If your SSID has spaces or special characters, try changing that?

  • @davidboon5567
    @davidboon5567 5 лет назад

    you should make it deep sleep after it boots and sends a message to conserve power

  • @thegrubyak
    @thegrubyak 3 года назад

    neat project, but 20 times to drain the battery - that's not suitable for most of the use cases

  • @PhilFoyBoy
    @PhilFoyBoy 3 года назад +1

    Are you still using these in you smart home?

    • @TheHookUp
      @TheHookUp  3 года назад +2

      Yep, I actually just checked their batteries a few weeks ago.

    • @Thracx
      @Thracx 3 года назад

      @@TheHookUp I'm about to build a house, I would really be interested in a long winded version of what you'd do differently (0:55, i.e. wiring)!

  • @dweebyone
    @dweebyone 5 лет назад

    Hi, This is great info, I have order the components to have a go myself. Only problem with Arduino cant find library ESP8266WiFi.h

    • @Ed19601
      @Ed19601 5 лет назад

      Thats incuded in the esp8266 board install

  • @GlennTrefethen
    @GlennTrefethen 6 лет назад

    how did you remove the header pins from the esp-01. it does not fit the case with them.

    • @TheHookUp
      @TheHookUp  6 лет назад +1

      Check out 4:03 in the video. You can push the pins through with a hot soldering iron.

    • @GlennTrefethen
      @GlennTrefethen 6 лет назад

      and i watched this 4-5 times, and just missed that. tnks

  • @iohin
    @iohin 3 года назад

    How does Amazon dash button do it? It’s WiFi too

    • @TheHookUp
      @TheHookUp  3 года назад

      It's quite a clever beast. It actually never connected to wifi, it just sent some broadcast initialization packets to the router that would then get processed by echo devices on the same network. By avoiding the full WiFi handshake it saves a TON of battery.

    • @iohin
      @iohin 3 года назад

      I don’t think having an echo on the local network was a requirement. I think you are talking about the ARP packets that hackers/DIY-ers used to listen to the button presses. You might be able to replicate the ARP packet approach. ARP packet is sent when any device connects to wifi. So you don’t have to send anything to mqtt. Just fall asleep immediately after connecting to SSID and have a script listening to ARM packets with the known MAC address of your esp-01. They claimed 250 button presses of off one AA
      mpetroff.net/2016/07/new-amazon-dash-button-teardown-jk29lp/

  • @thetinytrader1564
    @thetinytrader1564 5 лет назад

    I am having around 50 connected devices. Can you suggest a good economical router for my house ?

    • @TheHookUp
      @TheHookUp  5 лет назад

      I love my google wifi, I have 60-70 devices at any given time and google wifi never skips a beat: amzn.to/2SnnWgr

    • @Leonvolt28
      @Leonvolt28 4 года назад

      Little late reply. But I would suggest to buy an Asus router. You can easily extend it with Asus Aimesh. Plus you can integrate asuswrt with home assistant for presence detection.

  • @FranciscoJGomez-CHSM
    @FranciscoJGomez-CHSM 4 года назад

    Could you work with deep sleep to optimize de battery.