| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
A Python-based web and MQTT controller for garage doors, designed for easy integration with Home Assistant and remote operation via a web interface.
| Function | Pi GPIO Pin | Relay IN Pin |
|---|---|---|
| Open | 17 | IN1 |
| Close | 27 | IN2 |
| Stop | 22 | IN3 (if used) |
Note: Double-check your relay module's pinout and your Pi's GPIO numbering.
Use female-to-female jumper wires for Pi to relay connections.
git clone https://github.com/yourusername/rollertec.git
cd rollertec/RollertecIt is recommended to use a virtual environment:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtNote:
If you use GPIO, ensure you have the necessary permissions and libraries (e.g., RPi.GPIO).
You may need to run as sudo for GPIO access.
The main configuration file is config.json in the Rollertec directory.
It is created automatically on first run if it does not exist.
Example config.json:
{
"max_log": 5,
"open_pin": 17,
"close_pin": 27,
"stop_pin": 22,
"roller_time": 10,
"press_time": 0.5,
"stop_btn": 0,
"mqtt_broker": "localhost",
"mqtt_port": 1883,
"webserver_host": "0.0.0.0",
"webserver_port": 5000,
"remote_gpio": 0,
"gpio_address": "localhost"
}You can edit this file manually or via the web interface under the Configuration tab.
From the Rollertec directory, run:
python3 main.pyThe web interface will be available at http://<your-pi-ip>:<webserver_port>/ (default: http://localhost:5000/).
Rollertec can publish and receive commands via MQTT for integration with automation systems.
MQTT Settings in config.json:
MQTT Topics:
Example Home Assistant MQTT Discovery:
Rollertec supports Home Assistant MQTT discovery.
You may need to restart Home Assistant or manually add the cover entity.
You can integrate Rollertec with Home Assistant in two ways:
Add the following to your configuration.yaml in Home Assistant:
cover:
- platform: mqtt
name: "Garage Door"
command_topic: "homeassistant/cover/rollertec_garage/set"
state_topic: "homeassistant/cover/rollertec_garage/state"
payload_open: "OPEN"
payload_close: "CLOSE"
payload_stop: "STOP"
state_open: "open"
state_closed: "closed"
optimistic: false
qos: 1Alternatively, you can use the Home Assistant Community Store (HACS) MQTT Integration for easier setup and management.
Note:
Rollertec supports controlling GPIO pins on a remote Raspberry Pi using the pigpio library and daemon.
On the Remote Raspberry Pi (the one connected to the relay):
sudo apt-get update
sudo apt-get install pigpio python3-pigpiosudo systemctl enable pigpiod
sudo systemctl start pigpiodOn the Rollertec Controller Pi:
Example:
{
"remote_gpio": 1,
"gpio_address": "192.168.1.42"
}Restart Rollertec after making these changes.
Note:
When using remote GPIO, the Rollertec software will send relay commands over the network to the remote Pi.
MIT License.
Project maintained by allanbeth (https://github.com/allanbeth).
| Back | FazBrowse Home | New Git URL |