Skip to content

Monitor up to 3 garage doors. Check if the garage door is open or closed and if there is a car occupying the spot. All sent via MQTT and integrated with home Assistant

License

Notifications You must be signed in to change notification settings

DotNetDann/ESP-MQTT-GarageDoorSensor

Repository files navigation

ESP8266 MQTT GarageDoorSensor and Temperture HomeAssistant

This project allows for up to three "dumb" garage door openers to be controlled (open/close) and report garage door status (open/closed/occupied) via MQTT. In addition if you can also monitor the Temperture and Humidity within your garage to over MQTT as well.

The code covered in this repository utilizes Home Assistant's MQTT Cover Component and uses an ESP8266 microcontroller. There is a sample configuration in the repository

Inspiration for this comes from GarHAge and OpenGarage. The Temp and Humidity code for a DHT22 from GarHage, and now it morphed to change to NewPing for the ultrasonic HC-SR04 due to the inconsitant reading using the Ultrasonic library with the HC-SCR04 I aquired from china.

NOTE: I am currrently only using this with one garage door, to enable for 2 or 3, just enable the use to true in the auth.h file you create

Supported Features Include

  • Report status on up to 3 garage doors
  • Report information on Temp and Humidity
  • Ability to Select Celius or Fahrenheit for Temp
  • Web page for status of Garage Doors and Temperature
  • Events and status sent via MQTT
  • MQTT commands to toggle relays to open/close the garage doors
  • Over-the-Air (OTA) Upload from the ArduinoIDE!

OTA Uploading

This code also supports remote uploading to the ESP8266 using Arduino's OTA library. To utilize this, you'll need to first upload the sketch using the traditional USB method. However, if you need to update your code after that, your WIFI-connected ESP chip should show up as an option under Tools -> Port -> 'HostName'at your.ip.address.xxx.

More information on OTA uploading can be found here.

Parts List

Wiring Diagram

alt text

Web page

alt text

Completed Project

alt text alt text alt text

I have also made a stl bracket to hold it to the rail

alt text

Sample MQTT commands

Listen to MQTT commands

mosquitto_sub -h 172.17.0.1 -t '#'

Open the second garage door

mosquitto_pub -h 172.17.0.1 -t GarDoor/2/action -m "OPEN"

About

Monitor up to 3 garage doors. Check if the garage door is open or closed and if there is a car occupying the spot. All sent via MQTT and integrated with home Assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published