Mosquitto restart turn off tasmota relay


I’ve delete database on mosquitto, restart mosquitto but same problem. On restart mosquitto or restart pi my tasmota turn off relay. My installation is hassbian.

I’ve this configuration on HA:

- platform: mqtt
  name: "Tv Sala Jantar"
  icon: mdi:television
  state_topic: "stat/salajantar/POWER"
  command_topic: "cmnd/salajantar/power"
  availability_topic: "tele/salajantar/LWT"
  payload_available: "Online"
  payload_not_available: "Offline"
  qos: 1
  payload_on: "ON"
  payload_off: "OFF"
  retain: true

On tasmota:

10:24:30 CMD: backlog status
10:24:30 MQT: stat/salajantar/STATUS = {"Status":{"Module":18,"FriendlyName":["wemos_salajantar"],"Topic":"salajantar","ButtonTopic":"salajantar","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":1}}

Where is the problem?
thanks for help.

try it with retain: false and see if this influences the behavior. You have to delete the retained message (or the mosquitto db) before testing.

See this video from the hook up
It explains all the retain and stuff that is probably the cause of your issue.

1 Like

I’ve changed topic tasmota, problem solved.

It may have solved the problem now but if you don’t fix the underlying problem it will likely crop back up again on the new tasmota topic.


I view video and eliminate all retain on HA and publish topic blank for delete old topic.
Now test this if resolve situation.