Pisupati
(Ramana Kumar Pisupati Sai)
November 25, 2018, 5:50pm
1
I followed the steps from Dr.zzs - https://www.youtube.com/watch?v=NNW05smSNOA and flashed the 4CH device.
I can that the device has connected to the MQTT from the logs - 1543166045: New client connected from 192.168.1.75 as Sonoff_4CH (c1, k10, u’MQTT’).
I used the “SetOption19 1” and still the switches are not getting discovered by HA even after several restarts, please help.
TIA
wills106
(Will)
November 25, 2018, 6:09pm
2
Have you tried manually configuring it? I have not tried the discovery option yet.
You will want something like…
configuration.yaml
light: #or you can use switch:
- platform: mqtt
name: "Channel 1"
state_topic: "stat/sonoff4Chan/POWER1"
command_topic: "cmnd/sonoff4Chan/POWER1"
availability_topic: "tele/sonoff4Chan/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false
- platform: mqtt
name: "Channel 2"
state_topic: "stat/sonoff4Chan/POWER2"
command_topic: "cmnd/sonoff4Chan/POWER2"
availability_topic: "tele/sonoff4Chan/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false
- platform: mqtt
name: "Channel 3"
state_topic: "stat/sonoff4Chan/POWER3"
command_topic: "cmnd/sonoff4Chan/POWER3"
availability_topic: "tele/sonoff4Chan/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false
- platform: mqtt
name: "Channel 4"
state_topic: "stat/sonoff4Chan/POWER4"
command_topic: "cmnd/sonoff4Chan/POWER4"
availability_topic: "tele/sonoff4Chan/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: false
“sonoff4Chan” being what ever you named the device on the mqtt setup page on the Sonoff 4Ch
gpbenton
(Graham)
November 25, 2018, 6:12pm
3
Apparently, I can’t post the same message in two threads, so can you do this
Can you get an MQTT client such as mosquitto_sub or MQTT.FX, connect it to your broker, subscribe to topic # and paste the MQTT messages being sent.
Pisupati
(Ramana Kumar Pisupati Sai)
November 27, 2018, 4:50am
4
Adding the switches manually worked, I used the MQTT.FX tool to check the messages. I did notice that the QOS for mine was set to “0”, where do i change it to QOS1?