I recently added a Shelly 1 relay to my garage door opener. At first it was okay, but I wasn’t able to see the state of the garage, which is kind of unsettling if something were to happen, and the garage door were to open in the middle of the day while I’m at the office. So I added a reed switch to the Shelly, and converted over to MQTT. Now everything is working well, the garage door icon in Lovelace shows its state, and everything is good.
Except, whenever I reboot the Home Assistant VM , the garage door opens on its own.
Does anyone know what’s going on? Probably a misconfiguration, but I don’t see it.
I’m using the Mosquitto broker from the HA Add-on store. Initially I had a problem where when I rebooted Home Assistant Core (from the supervisor menu), it wouldn’t know the state of the garage door. But I solved that by adding ‘retain: true’ on both the Shelly 1 and Home Assistant cover configuration.
Any idea why this is happening?
Here is the cover configuration:
# Garage Door
cover:
- platform: mqtt
name: "Garage Door"
position_topic: "shellies/shelly1-garage/input/0"
command_topic: "shellies/shelly1-garage/relay/0/command"
availability_topic: "shellies/shelly1-garage/online"
retain: true
payload_open: "on"
payload_close: "on"
payload_stop: "on"
position_open: 0
position_closed: 1
payload_available: "true"
payload_not_available: "false"
Here is the Mosquitto configuration
logins: []
anonymous: false
customize:
active: false
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false