Making Century gate motor a little smarter using ESP8266. The controller publishes mqtt messages for all status codes and triggers courtesy light as well as override. And for fun it has a tiny light sensor for morning and evening light automation with Home Assistant.
As basic as it gets.
- Flash ESP with MicorPython. Currently I'm using version 1.14
- Rename config_example.py to config.py and configure your WIFI and MQTT broker settings.
- Push all Python files to ESP and ready to go.
- In case of timing variations between models, adjust ALERT_INERTVAL_TIME which is the time between alert signals.
cmd.py contains helper functions to speed up work on webrepl.
sensor:
- platform: mqtt
name: "Gate Status"
state_topic: "stats/gate/gate/status"
force_update: true
- platform: mqtt
name: "Gate Alert"
state_topic: "stats/gate/alert/status"
force_update: true
- platform: mqtt
name: "Gate Sunlight"
state_topic: "stats/gate/sunlight/status"
force_update: true
script:
trigger_gate_floodlight:
alias: Trigger Gate Light
sequence:
- service: mqtt.publish
data:
topic: "cmnd/gate/floodlight/trigger"