bootswithdefer / esp32-relay-controller

ESP32 Relay Controller with Web Interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP32 Relay Controller with Web interface

Components

Overview

This project contains the code for an ESP32 based relay controller, used by the author as Garage Door Opener. It consists of an Adafruit feather with relay board and some Python based web services. The feather connects to your Wifi and listens for messages on an MQTT broker. A Linux server with Docker hosts the MQTT broker, a NiceGUI web site, and a FastAPI API service.

NOTE: The Web site and API should be secured, it is not recommended to run these apps directly on the internet as-is. The author uses Cloudflare Zero Trust for this, but that is out of scope for this project.

The UI is a very simple button in your web browser that toggles the relay:

image

Pressing the button sends an request to the API service. The API service publishes a message to the MQTT broker. The feather receives the message and triggers the relay.

Garage Door Opener notes

It is designed to interact with a garage door opener via a relay so if your garage door opener uses encryption you will have to modify one of it's controllers. The author soldered wires onto the switch contacts on his wall-mounted opener control.

About

ESP32 Relay Controller with Web Interface

License:MIT License


Languages

Language:Python 93.6%Language:Dockerfile 6.4%