Hi, i’ve configured a blind on homeassistant.
the project works, but when the sonoff is restarted, the relays automatically switch to power on.
if I turn off the raspberry pi, the sonoff normally works, so it’s a communication problem at the start of the mqtt communication.
I tried to play with the retain parameters, and to disable all automations and scripts, but nothing, always starts ON
I paste the configuration:
SONOFF
sonoff log:
00:00:06 DNS: Initialized
00:00:06 HTP: Web server active on tapparellacucina-6467.local with IP address 192.168.1.100
09:46:04 MQT: stat/tapparellacucina/POWER2 = ON
09:46:04 RSL: Received Topic cmnd/tapparellacucina/POWER1, Data Size 2, Data ON
09:46:04 RSL: Group 0, Index 1, Command POWER, Data ON
09:46:04 MQT: stat/tapparellacucina/RESULT = {“POWER1”:“ON”}
09:46:04 MQT: stat/tapparellacucina/POWER1 = ON
09:46:04 RSL: Received Topic cmnd/tapparellacucina/POWER2, Data Size 2, Data ON
09:46:04 RSL: Group 0, Index 2, Command POWER, Data ON
09:46:04 MQT: stat/tapparellacucina/RESULT = {“POWER2”:“ON”}
09:46:04 MQT: stat/tapparellacucina/POWER2 = ON
09:46:04 CFG: Saved to flash at F4, Count 737, Bytes 1648
09:46:05 MQT: stat/tapparellacucina/RESULT = {“POWER1”:“ON”}
09:46:05 MQT: stat/tapparellacucina/POWER1 = ON
09:46:05 MQT: stat/tapparellacucina/RESULT = {“POWER2”:“ON”}
09:46:05 MQT: stat/tapparellacucina/POWER2 = ON
09:46:12 MQT: tele/tapparellacucina/STATE = {“Time”:“2018-04-14T09:46:12”, “Uptime”:0, “Vcc”:3.213, “POWER1”:“ON”, “POWER2”:“ON”, “Wifi”:{“AP”:1, “SSId”:“Davide WiFi”, “RSSI”:100, “APMac”:“34:21:09:01:9E:7W”}}
09:46:22 WIF: Checking connection…
09:46:22 WIF: Connected
CONFIGURATION YAML
mqtt:
broker: 192.168.1.119
port: 1883
username: username
password: ********
protocol: 3.1
switch:
###SONOFF SOGGIORNO####
- platform: mqtt
name: “Tapparella Soggiorno Apertura”
state_topic: “stat/tapparellacucina/POWER1”
command_topic: “cmnd/tapparellacucina/POWER1”
qos: 0
payload_on: “ON”
payload_off: “OFF”
retain: true
optimistic: false - platform: mqtt
name: “Tapparella Soggiorno Chiusura”
state_topic: “stat/tapparellacucina/POWER2”
command_topic: “cmnd/tapparellacucina/POWER2”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true
optimistic: false
thank you in advance who will help me