Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
/ mqtt-door Public archive

Report the status of, and control the garage doors over MQTT

License

Notifications You must be signed in to change notification settings

shmick/mqtt-door

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mqtt-door

Use gpiozero to read the state of the magnetic reed sensors on the doors and control the doors via relays connected to GPIO pins

Use paho-mqtt to publish MQTT status messages and subscribe to command messages

The door contacts are GE Overhead Panel Door Magnetic Contact

The relay board is found on eBay. Search for 4-Channel Optic-Isolated Relay Module H/L Trigger 3.3V-5V Arduino / Raspberry PI

MQTT Status

topic = stat/garage/NAME
payload = {"state": "STATE"}

MQTT Command

topic = cmnd/garage/NAME 
payload = open or close

Home Assistant Sensor

sensor garage_north:
  - platform: mqtt
    name: "Garage North"
    state_topic: "stat/garage/north"
    value_template: "{{ value_json.state }}"

Home Assistant Cover

cover garage_north:
  - platform: mqtt
    name: "Garage North"
    device_class: garage
    state_topic: "stat/garage/north"
    command_topic: "cmnd/garage/north"
    payload_open: "OPEN"
    payload_close: "CLOSE"
    state_closed: '{"state": "closed"}'
    state_open: '{"state": "open"}'
    qos: 1
    retain: false