lexalalex
(lexalalex)
December 21, 2017, 1:44pm
1
Docker Home Assistant 0.60.0
sonoff basic with ESPEasy_R120 firmware
in the configuration.yaml are present:
mqtt:
light:
platform: mqtt
name: “sonoff1”
state_topic: “/sonoff_01/gpio/12”
command_topic: “/sonoff_01/gpio/12”
payload_on: “1”
payload_off: “0”
optimistic: false
qos: 0
retain: true
recorder:
history:
Step by step:
I turn on the switch through the dashboard HA
reboot HA
the dashboard shows that the switch is off, the history tab also shows that it is off, although it is on.
How to restore the relay state on dashboard HA?
VDRainer
(🍻)
December 21, 2017, 2:03pm
2
Not sure, because not using ESPEasy, but you can try setting the “MQTT retain message” in ESPEasy.
https://www.letscontrolit.com/wiki/index.php/ESP_Easy_web_interface#Tools_Advanced_page
Likewise, not using ESPEasy, but you need to find the equivalent of Tasmota’s “PowerRetain - Enable MQTT power retain on status update” which fixes exactly your issue.
What @VDRainer has suggested looks promising so definitely worth a try.
lexalalex
(lexalalex)
December 21, 2017, 3:32pm
4
I tried “MQTT retain message” in ESPEasy, but it’s no work(
VDRainer
(🍻)
December 22, 2017, 4:02pm
5
Same in this topic .
I don’t know if the embedded mqtt broker can work with retained messages.
Maybe you try with mosquitto ?
1 Like
lexalalex
(lexalalex)
December 22, 2017, 4:29pm
6
Yes, problem with embedded mqtt. With mosquitto works fine
1 Like
Jammyb
(James Billinge)
January 2, 2018, 9:37am
7
how do you use mosquitto?
i can’t seem to get it to start?
my sonoff just keeps flashing green and clicking on/off/on/off etc