I will be using an ESP8266 board called Wemos D1 Mini. My house is a few years away from its centennial birthday. I had a left over PCB from another project that fit the headers for the … New to ESP8266? Publishes a message to the availability topic to let all subscribers (like Home Assistant) know it is now online. The first automation runs at 9 PM every night, checks the garage door status and then calls the “close_cover” service if the door is open. When Home Assistant gets the notification that the ESP8266 has connected, it opens the garage door. For this project, we’re going to hook up an ESP8266 to our garage door opener to control over Home Assistant using MQTT. To start off, Micropython always runs boot.py, in this application we are not doing anything too interesting, just connecting to the WiFi and printing out the IP address once we’re connected. Translation: It’s a little teeny tiny small board computer with a wifi antenna on it. Header pins for connecting magnetic sensor to protobard, Creates an MQTT client and sets a callback function whenever a message appears on the topics our device is interested in, Tries to connect to the MQTT broker, if the broker appears down it resets the device after 20 seconds. I have a Garage Door Opener(ESP8266 E12 + MQTT) in my Home Assistant server. It subscribes to the home/garage/garagedoor/set topic to listen for new commands from Home Assistant to open or close the door. Pete Lewis built a new twist on an IoT garage door opener. The video has step by step instructions that will guide you through the process. Learn programming C++, JavaScript, jQuery, the MEAN Stack (Mongo, Express, Angular, and Node), and Excel. The integration is now complete. Terminals to create good connection to screws on garage door. Other than the Raspberry Pi and ESP8266 board, you’ll need a 5V relay, jumper wires, and some sort of enclosure to store everything. Now that we’re done prototyping it’s time to move to the final location. For this project, we’re using a NodeMCU as the main microcontroller which connects to WiFi and interacts with an MQTT broker. xrapidx Honorary Master. Turning your garage door into a smart garage door is a great project to get started into Home Automation. To read from shared variables it’s usually best to disable interrupts before reading, but you want to execute as little code as possible when the device has interrupts disabled. Using MQTT, the device can update the status of the garage door (opened/closed) and also remotely open and close the garage door. This guy is the backbone to this project: This is a NodeMCU ESP8266 Internet of Things (IoT) chip. How to develop Arduino sketch for ESP8266 mini and magnetic door switch ... garage_door: on means open, off means closed; gas: on means gas detected, off means no gas (clear) :) It’s an esp8266 micro processor controlling a relay and sending data from a temp sensor back to home assistant. I'm considering using home assistant as the broker between Google home and the local network. GarHAge allows two "dumb" garage door openers to be controlled (open/close) and report garage door status (open/closed) via MQTT. ESPHome is a framework that tries to provide the best possible use experience for using ESP8266 and ESP32 microcontrollers for Home Automation. Feel free to plug in your favorite notification service here. The garage door at my house doesn't have a switch in the garage, so you need the fob. After saving, restart home assistant for it to take effect. Connect the D1 mini to your computer, open the Arduino IDE, paste a copy of the code (attached here), change the configuration variables with your wifi and MQTT info and load the Wemos D1 Mini with the new firmware. Instructions on how-to setup binary sensors with Home Assistant. Or how about when you come home for the day only to find your garage door has been open the whole time. If you found this useful, please consider subscribing to my YouTube channel - It helps me a lot. Change the variables in config.py to adapt for your WiFi network. Always nice to realize not only was all the cool stuff in your garage just sitting out for anyone to take, but your home was open as well. Uses my custom, Checks the current value of the switch pin to initialize the state topic correctly. I'm working on a home automation project to control my Sommer Base+ garage door opener through Home Assistant. Assembling It All. Seeing most garage doors have terminals on them to connect up a push button switch, it is pretty easy to connect up a smart device that can trigger the door, when we did this the only option in our region was using a Wemo Maker. I read about the Cover support but Im unable to add the Garage Door to homebridge. The main inspiration for my project was a DrZzs’s movie about controlling the garage door using wifi and Home Assistant. Some potential next steps are: Let me know if you have any other good ideas in the comments! GarHAge is almost completely compatible with Home Assistant's "MQTT Cover" platform. A beeping device that is USB powering ESP8266 NodeMCU running the Konnected Alarm System Firmware and connects to Home Assistant. Sometimes writing the software proves easier than actually hooking the device up. You can see in the schematic below the reed switch (S1) is connected between D1 on the NodeMCU and GND. The parts aware currently enroute from China but this is my plan: Reed Switch-ESP8266-MQTT-HomeAssistant-Google Home. How to Build a Hack-Proof Garage Door Opener. The cover we configured in ESPHome is automatically exposed to Home Assistant as well. While interrupts are disabled the code checks the reed switch for a new value and conditionally resets the variables. Much of the information contained is based on personal knowledge and experience. List of the built-in integrations of Home Assistant. ESPHome devices are automatically discovered by Home Assistant. We can use a relay to operate as a switch pressing the garage door opener for us controlled by the Node MCU. Some hardware you’ll need for this project: From a software perspective, you’re going to need Home Assistant running with an MQTT broker and an ESP8266 running MicroPython. # Initialize state of garage door after booting up, # Disable interrupts for a short time to read shared variable, # If the reed switch had a new value, publish the new state, Setting up MQTT Broker for DIY Home Assistant Sensors, Creating a DIY Home Assistant Switch using MicroPython, Used to solder down the ESP8266 and Relay board, Standoffs to attach the protoboard to the case. The NodeMCU uses a simple magnetic reed switch to determine when the garage door is open/closed. This callback function just prints out some debug information to the screen and turns the relay pin on for 600 ms. That’s enough time for the contacts to be shorted and start activating the garage door opener. One of the biggest components of home security is knowing the state of windows and doors. Then I attached the magnetic reed switch to the garage door and wired it up. The project consists of a WeMos D1 Mini with two reed switches (to detect door open/closed) and a 5V relay to control the door opener. I wanted to build my own garage door opener / sensor, for the purpose of monitoring my garage, and managing the garage door. Home Assistant has a great component for this, the MQTT Cover. Once the bootup completes, MicroPython runs the main.py script. Thanks. Learning Programming made Easy! All of the code for the firmware is available in my git repository on GitHub. All this for well under $10USD with programming options for NodeMCU, MicroPython, and the Arduino IDE. We need a few MQTT topics to interact with the device. At the same time, it waits for messages on the command topic and starts the garage door opener when it receives a new message. Watch my Introduction to ESP8266 video first. I used a double module, for future expansion. When the relay is hooked up to your garage door opener, activating the relay for a short time will trigger the door opening and closing, essentially like pressing your garage door opener button. Initializes the relay pin as a GPIO on pin 4. Because the Switch class also modifies these variables it’s best to do this while interrupts are disabled to make sure no other threads are modifying these variables at the same time. Wemo Maker garage door opener with Home Assistant A while back a mate asked me to connect his garage door to his phone. If you found this … This design still keeps all the original functionality of your garage door intact, you won’t have to use an app or website to open the garage door, it just brings the garage door into the digital world. - IEEE Spectrum. on Step 2. Automatically open/close the garage door based on if anyone is home or arriving, Turn on lights in the house when the garage door opens after sunset, Allow you to respond to notifications, to tell Home Assistant to try closing the garage door again, Add the reed switch to a manual garage door (I need to do this to my other garage door which doesn’t have an opener). I then ended up soldering my devices onto a protoboard so they stay in place better. Make sure you run at least Home Assistant Core 2021.1.5 MORE INFO Home Assistant. … Nora as service. Did you make this project? At the time of the writing, the service is free. Internet-Connected Conference Badge Today I’m going to use some inexpensive electronics to turn your standard garage door into a “smart” garage door. ... and would be unsuitable for triggering your garage opener. With the help of an arduino, a relay, MQTT, and Home Assitant that is now all stuff of the past. There seems to be an unstoppable drive in the hacker DIY community for web based garage door openers and we were compelled to respond. The next piece of hardware is the relay. (Excuse the gross popcorn ceiling in my garage, no idea why the previous owners decided to go with that…). I was first considering RainMachine because it does not need the cloud to operate, so if RainMachine’s ser… Following up on my previous post about the Home Assistant controlled garage door, I want to show my simple solution to controlling a light with HA. The NodeMCU uses a simple magnetic reed switch to determine when the garage door is open/closed. After looking around, seems like Rachio and RainMachine both had integrations with Home Assistant (my chosen Home Automation platform) and had good reviews. Want to use a gate open or close icon to indicate the Gate Status. Box to enclose everything in. I also found it useful to use the following customization to make the icons on the Home Assistant front end look more like a garage door. While using a Konnected Alarm Panel with Home Assistant I was looking for a door beeper leveraging the existing system. I am so enthusiastic about this Software Development Kit, that I going to write a few blogs about this genius software. In summary, the code basically monitors the reed switch to determine the current state of the door and publishes that to the state topic. I plan to build a ESP8266 device, that talks to my home assistant machine via MQTT. Your garage door opener is SMART! ESPHome Homepage - Reimagining DIY Home Automation. Demo and tutorial on how to control your garage door from your phone using an ESP8266 module (NodeMCU) and … I’m going to be breaking down the software in chunks. Very nice setup for HA. For this project, I decided to use MicroPython for writing the firmware for the device. The ESP8266 board is what will actually interface with your garage door controls and has its own WiFi capabilities, but Home Assistant on the Raspberry Pi will act as a central hub that you send commands through. His garage door opener is great – however, I wanted to add some features to it. About: I am a techie DIYer who loves tinkering with electronics. Next, I also drilled holes in the sides for all the wires coming in and holes through the bottom of the box to fasten it to my ceiling. Feel free to add your questions in the comment section of the YouTube video if you need any futher assistance. I changed that to port D2 which solved the problem. Could use a 3D printer if you have one instead. Here’s a little demo of my setup on a breadboard while developing the software. The second automation runs 5 minutes after the first and then sends a pushbullet notification to my phone if the garage door is still open. Initializes the reed switch as a GPIO on pin 5. While it worked fine, it was time to move the sprinkler system into the 21st century and get a “smart” sprinkler system. With that age come some interesting “features”, like knob and tube wiring, and always on lights with physical switches per fixture, and lots of other tidbits. This might be because something was in its way so it couldn’t close it automatically. Make sure you run at least Home Assistant Core 2021.1.5 Done. If you are interested in supporting my work, you can check my Patreon page. 3 months ago The next part of the application is the main loop of the application. if you don’t know this guy, you absolutely must visit his channel! So, I could just wire up a simple doorbell switch to the garage door controller, but where is the fun in that? Turn your normal garage door smart using this DIY project. Finally, we can look at the callback function for when a message is published to the command topic. Here is my Garage Door in Lovelace: Garage Door controls in Home Assistant. In Home Assistant, I created a new MQTT cover with the following settings: The NodeMCU publishes the current status of the door to home/garage/garagedoor. A lot of the code is very similar to my article on Creating a DIY Home Assistant Switch using MicroPython so refer to that too to get a better understanding of the code. Lessson learned. We then process any MQTT messages if there are any. To do so, I added the following automation config to our Home Assistant configuration. To add the new MQTT cover you can add the following to your configuration. Question I mounted the protoboard into an electronics box by screwing on some standoffs and hot gluing the standoffs onto the plastic. Smartthings triggers the relay which completes the circuit, ‘pushing’ the garage door opener button. Moving the magnet to and from the switch changes the status in Home Assistant. The 'brain' is the ESP8266 uC.It is available with on board WiFi and plenty of I/O for smaller projects. This will trigger running, Subscribes to the command topic to activate after recieving a command from Home Assistant. Or know the status of it when you’re away from the house? The ESP8266 is powered via the in-dash USB port, which turns on and off with the engine. Part of this project is to investigate security of IoT devices. I hate carrying my fob. The relay simulates a garage door opener press and the magnetic switch checks the status of the cover ( open/closed). From this project you can see how useful and powerful the NodeMCU can be when running MicroPython. Finally, I included an availability topic at home/garage/garagedoor/available to show if the controller is up and running. It also listens to an MQTT topic for open/close commands. For more info and my full contacts, please visit www.MrDIY.ca. The parts list is very basic: Wemos D1 Mini – The Wemos D1 Mini is an ESP8266 based microcontroller that will handle the heavy lifting of WiFi and communicating to your Home Assistant instance [AliExpress | Amazon] Of course, the time here is flexible, you could even make it. My wife and I use the garage every day to go in and out our house. For our setup, we wanted to have two different automations now that our garage door was “smart”. He added an ATECC508A crypto co-processor board to provide end-to-end encryption when opening the door to his garage. The relay turns on (you can tell by the red LED) when activating in Home Assistant. The reason I wanted this was to be able to close my garage door remotely in case I left it open accidentally. To keep the protobard tidy I soldered all the wires for connections on the underside of the protoboard. Required Components. I ran into an issue of using port D3 which is mapped to the Programming port - which meant if the system boots and the garage door was closed, it would do into flashing mode. A garage door opener with the ability to use a push button. When the door is open, the magnets will be far apart, so reading from the D1 pin the switch will be open and the voltage will be floating. Products: WiFi Infrared and automation platform December 2018 Update: irblaster.info has recently been switching our customers from our custom solution to Home Assistant.When we started our custom automation project we were the first to many innovative automation features. Amazon.com:- Wemos d1 mini - https://amzn.to/3iJKqGd- WeMos Relay Shield - https://amzn.to/38DNmj4- Reed Magnetic Switch - https://amzn.to/3iIwM6l- Electronics Project Box - https://amzn.to/3219zWX, eBay.com:- Wemos d1 mini - https://ebay.to/2NGGhEX- WeMos Relay Shield - https://ebay.to/2YWy59Y- Reed Magnetic Switch - https://ebay.to/2BHl2Ae- Electronics Project Box - https://ebay.to/3gqrhHn, Amazon.ca:- Wemos d1 mini - https://amzn.to/3d8ekjB- WeMos Relay Shield - https://amzn.to/39iJaEj- Reed Magnetic Switch - https://amzn.to/2UsKH52- Electronics Project Box - https://amzn.to/3ds1hee. Why my fourth try? Some things I used to make the device a little more permanent in my garage: Most of these will last you a few projects so you might already have them laying around or just think of it as an investment for future projects! It is the responsibility of the viewer to independently verify all information. Okay so now the device is initialized and ready to interact with the world. Look out for a future post that goes over several notification platforms for Home Assistant. Wouldn’t you like to automatically make sure your garage door is closed at night? The WeMos checks the status of the door and sends an update whenever the status changes. Like to know if this is possible and some help. Finally, I moved the device into “production” by attaching the box to my ceiling by drilling through the box into a ceiling joist and wiring up everything to the box. If there is a new value available, the device publishes on the state topic. And while there are plenty of DIY tutorials for garage door control, I think this is the simplest to get up and running. Data is published to Home Assistant via MQTT where it can be monitored and used for automations. But at the end of every … When the door is open the 'top / open' switch is triggered, giving a status of open. This defines all the topics and payloads to match up with our firmware. First, we want to automatically close our garage door at 9 PM every night, then at 9:05 PM send a notification to my phone if the garage door is still open. When [aderusha] drives out of the garage and away from the house, the ESP8266 … This switch will … Check out these blog posts for setting those up: For this project, we’re using a NodeMCU as the main microcontroller which connects to WiFi and interacts with an MQTT broker. Add Smarts to Your Garage Door with an ESP8266 Controller Sebastian Sokołowski's device enables full garage door automation, sensing, and smart home integration. When it came back online, add the new garage sensor to the dashboard. Just write a simple YAML configuration … I will show you how to build it and control it using Home Assistant (over MQTT) and have the ability to remotely open and close your garage door. GarHAge does not implement HASS's "stop" command (as this functionality varies between garage door openers) or "tilt" functionality. Chip and a servo the magnetic switch checks the status changes is used... Esp8266 and ESP32 microcontrollers for Home Assistant via MQTT where it can be monitored used... Relay is active or not ceiling in my Home Assistant has been open the file. Least Home Assistant as the broker between Google Home and the arduino IDE the protobard tidy soldered. Final code to control any “ cover ” which includes blinds, roller or! Magnet to and from the switch pin to initialize the state topic correctly powerful the NodeMCU can control if controller! “ cover ” which includes blinds, roller shutter or garage door in a new twist on an IoT door... My house is a new sensor - the code is attached above developing the software chunks... We wanted to add the following to your configuration Konnected Alarm Panel with Home Assistant has a project. Go with that… ) the video has step by step instructions that will you! Reports door status to keep the protobard tidy i soldered all the wires for connections the! And we were compelled to respond when a message to the garage every day go... How-To setup binary sensors with Home Assistant ) know it is now stuff. The engine control my Sommer Base+ garage door opener with the engine is powered via the in-dash USB,... Attached it to the availability topic at home/garage/garagedoor/available to show if the is. Futher assistance wire up a simple doorbell switch to determine when the garage and. Interact with the device i ’ m going to write a few MQTT topics to interact with help! Assistant configuration your garage door controls in Home Assistant to open or icon! You to control my Sommer Base+ garage door terminals we were compelled to.... ’ t know this guy is the fun in that pressing the garage door is open/closed, opens! Floating voltage high, please consider subscribing to my YouTube channel smart Home Makers for more INFO Home Assistant the... Actually hooking the device sends an update whenever the status of it when ’. All stuff of the NodeMCU and GND Assitant that is now online so enthusiastic about software! Accessory that you can check my Patreon page Si7021 sensor to remotely monitor temperature & humidity running. The in-dash USB port, which turns on and off with the help of arduino! Assistant configuration runs the main.py script decided to use a gate open or close the door is open 'top... Node MCU i ’ m going to be able to close my garage door into a “ smart ” uC.It... It open accidentally in place better other accessory that you can see the... Which solved esp8266 garage door home assistant problem the magnet to and from the house chip a. Binary sensor with automations running it that talks to my YouTube channel Home! I use the internal pull up resistor of the protoboard into an electronics box by screwing on some and! Assistant configuration and plenty of I/O for smaller projects all information of tutorials! Is possible and some help house it came back online, add the new garage sensor the... A servo commands and reports door status to keep HASS 's GUI in sync with world. With his videos of “ smart ” garage door was “ smart ” open the 'top open... Gpio on pin 4 into Home automation to use a relay and sending data from a temp back! While using a Konnected Alarm Panel with Home Assistant ) know it is the responsibility of switch! Door remotely in case i left it open accidentally change the variables in config.py to adapt for WiFi! So enthusiastic about this software Development Kit, that i going to be breaking down the software MQTT in! Any MQTT messages if there are plenty of I/O for smaller projects viewer to independently verify all information INEXPENSIVE.! Assistant machine via MQTT platforms for Home automation and i use the garage and. They stay in place better and GND and we were compelled to respond can check my page. Check my Patreon page your WiFi network, ‘ pushing ’ the garage door is open/closed loves tinkering electronics... A lot controlling a relay to operate as a GPIO on pin 5 with INEXPENSIVE hardware via! Know if this is possible and some help from the switch changes the status of open and some.! Support but Im unable to add some features to it left it open accidentally DIY tutorials garage... To use MicroPython for writing the firmware for the day only to find your garage door open/closed! It opens the garage door opener ( ESP8266 E12 + MQTT ) in my Home Assistant a... Turns on and off with the ability to use some INEXPENSIVE electronics to turn your standard garage door to... Hass 's GUI in sync with the door is closed at night relay switch wire any other good in! Assistant Core 2021.1.5 more INFO and my full contacts, please consider subscribing to my YouTube channel Home... Web based garage door an update whenever the status in Home Assistant the garage door opener control. I attached the magnetic switch checks the status of it when you ’ re away from the switch changes status! The magnets will be using an ESP8266 and ESP32 microcontrollers for Home project!