Homey Community Forum

Sonoff 4ch (Tasmota) connection problems

I have Homey PRO and would like to control heating manifold using 2 Sonoff 4CH (Tasmota) relays.

I’ve problem with adding Sonoff 4CH devices to Homey. Sonoff app is installed. MQTT broker is installed and configured (Broker is running). Adding device I get error “MQTT connection unsuccessful” . Could anybody please help me with that?

Console:
00:00:00 CFG: Loaded from flash at FA, Count 96
00:00:00 Project tasmota Tasmota Version 8.2.0(tasmota)-STAGE
00:00:00 WIF: Connecting to AP1 Master ruuter in mode 11N as %prefix%/%topic%/-3448…
00:00:07 WIF: Connected
00:00:07 HTP: Web server active on %prefix%/%topic%/-3448 with IP address 192.168.31.171
20:53:01 RSL: tele/%prefix%/%topic%/INFO1 = {“Module”:“Sonoff 4CH”,“Version”:“8.2.0(tasmota)”,“FallbackTopic”:“cmnd/DVES_C70D78_fb/”,“GroupTopic”:“cmnd/tasmotas/”}
20:53:01 RSL: tele/%prefix%/%topic%/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:"%prefix%/%topic%/-3448",“IPAddress”:“192.168.31.171”}
20:53:01 RSL: tele/%prefix%/%topic%/INFO3 = {“RestartReason”:“Software/System restart”}
20:53:01 RSL: stat/%prefix%/%topic%/RESULT = {“POWER1”:“ON”}
20:53:01 RSL: stat/%prefix%/%topic%/POWER1 = ON
20:53:01 RSL: stat/%prefix%/%topic%/RESULT = {“POWER2”:“OFF”}
20:53:01 RSL: stat/%prefix%/%topic%/POWER2 = OFF
20:53:01 RSL: stat/%prefix%/%topic%/RESULT = {“POWER3”:“OFF”}
20:53:01 RSL: stat/%prefix%/%topic%/POWER3 = OFF
20:53:01 RSL: stat/%prefix%/%topic%/RESULT = {“POWER4”:“OFF”}
20:53:01 RSL: stat/%prefix%/%topic%/POWER4 = OFF
20:53:05 RSL: tele/%prefix%/%topic%/STATE = {“Time”:“2020-04-13T20:53:05”,“Uptime”:“0T00:00:14”,“UptimeSec”:14,“Heap”:27,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“POWER1”:“ON”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“Master ruuter”,“BSSId”:“EC:41:18:01:03:51”,“Channel”:9,“RSSI”:100,“Signal”:-39,“LinkCount”:1,“Downtime”:“0T00:00:08”}}
20:58:05 RSL: tele/%prefix%/%topic%/STATE = {“Time”:“2020-04-13T20:58:05”,“Uptime”:“0T00:05:14”,“UptimeSec”:314,“Heap”:26,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“POWER1”:“ON”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“Master ruuter”,“BSSId”:“EC:41:18:01:03:51”,“Channel”:9,“RSSI”:100,“Signal”:-41,“LinkCount”:1,“Downtime”:“0T00:00:08”}}
21:02:51 APP: Serial logging disabled
21:03:05 RSL: tele/%prefix%/%topic%/STATE = {“Time”:“2020-04-13T21:03:05”,“Uptime”:“0T00:10:14”,“UptimeSec”:614,“Heap”:26,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“POWER1”:“ON”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“Master ruuter”,“BSSId”:“EC:41:18:01:03:51”,“Channel”:9,“RSSI”:100,“Signal”:-40,“LinkCount”:1,“Downtime”:“0T00:00:08”}}
21:08:05 RSL: tele/%prefix%/%topic%/STATE = {“Time”:“2020-04-13T21:08:05”,“Uptime”:“0T00:15:14”,“UptimeSec”:914,“Heap”:26,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:0,“POWER1”:“ON”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“Master ruuter”,“BSSId”:“EC:41:18:01:03:51”,“Channel”:9,“RSSI”:100,“Signal”:-39,“LinkCount”:1,“Downtime”:“0T00:00:08”}}
21:09:19 RSL: stat/%prefix%/%topic%/RESULT = {“POWER3”:“ON”}
21:09:19 RSL: stat/%prefix%/%topic%/POWER3 = ON
21:09:21 RSL: stat/%prefix%/%topic%/RESULT = {“POWER3”:“OFF”}
21:09:21 RSL: stat/%prefix%/%topic%/POWER3 = OFF

I don’t see an “MQTT Host” value there.

MQTT host is Sonoff 4ch IP, right? But nothing changed and same error message.

No, it’s the IP of the MQTT broker.

Where do I get it?

If you run the broker on Homey, it’s Homey’s IP address.

Done. I add screenshot from console. Seems that is not working?

Correct. I believe “rc 5” means “incorrect credentials”, so check if your MQTT username and password are correct on both sides.

I double checked and credentials are same on both sides (Tasmota configuration and MQTT broker side - user and pass are correct). I re-inserted credentails and MQTT broker pop-up message says “No setting has been changed”. What else I can do?

Are you allowing unencrypted connections to the broker?

Yes, “also allow unsecure connections” is enabled.

Console show it’s working now:

00:00:00 CFG: Loaded from flash at F8, Count 114
00:00:00 Project tasmota Tasmota Version 8.2.0(tasmota)-STAGE
00:00:00 WIF: Connecting to AP1 Master ruuter in mode 11N as %prefix%/%topic%/-3448…
00:00:07 WIF: Connected
00:00:07 HTP: Web server active on %prefix%/%topic%/-3448 with IP address 192.168.31.171
14:06:41 MQT: Attempting connection…
14:06:41 MQT: Connected
14:06:41 MQT: tele/%prefix%/%topic%/LWT = Online (retained)
14:06:41 MQT: cmnd/%prefix%/%topic%/POWER =
14:06:41 MQT: tele/%prefix%/%topic%/INFO1 = {“Module”:“Sonoff 4CH”,“Version”:“8.2.0(tasmota)”,“FallbackTopic”:“cmnd/DVES_C70D78_fb/”,“GroupTopic”:“cmnd/tasmotas/”}
14:06:41 MQT: tele/%prefix%/%topic%/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:"%prefix%/%topic%/-3448",“IPAddress”:“192.168.31.171”}
14:06:41 MQT: tele/%prefix%/%topic%/INFO3 = {“RestartReason”:“Software/System restart”}
14:06:41 MQT: stat/%prefix%/%topic%/RESULT = {“POWER1”:“ON”}
14:06:41 MQT: stat/%prefix%/%topic%/POWER1 = ON
14:06:41 MQT: stat/%prefix%/%topic%/RESULT = {“POWER2”:“OFF”}
14:06:41 MQT: stat/%prefix%/%topic%/POWER2 = OFF
14:06:41 MQT: stat/%prefix%/%topic%/RESULT = {“POWER3”:“OFF”}
14:06:41 MQT: stat/%prefix%/%topic%/POWER3 = OFF
14:06:41 MQT: stat/%prefix%/%topic%/RESULT = {“POWER4”:“OFF”}
14:06:41 MQT: stat/%prefix%/%topic%/POWER4 = OFF
14:06:45 MQT: tele/%prefix%/%topic%/STATE = {“Time”:“2020-04-14T14:06:45”,“Uptime”:“0T00:00:14”,“UptimeSec”:14,“Heap”:27,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:1,“POWER1”:“ON”,“POWER2”:“OFF”,“POWER3”:“OFF”,“POWER4”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“Master ruuter”,“BSSId”:“EC:41:18:01:03:51”,“Channel”:5,“RSSI”:100,“Signal”:-43,“LinkCount”:1,“Downtime”:“0T00:00:08”}}

Still I get this message when adding device

Can you show a screenshot of the MQTT configuration page in Tasmota?

Here it is

Your topic is wrong, it should contain a (unique) name for the device (without spaces, slashes or percent signs). Something like “sonoff-4ch”.

“Full Topic” is correct.

1 Like

Thank you for your help. Now I managed to add the device. Can you alse advise which is best way to set up virtual thermostat. I have Xiaomi temperature sensor and these are already added to Homey.

Thank you very much.

Sorry, I don’t use virtual thermostat myself so can’t really help there :woozy_face:

Ok. Can you recommend which is best way to control floor heating manifold using sonoff 4ch and Xiaomi thermostat (both are Homey compatiple)?

No, I don’t automate the heating of my home :stuck_out_tongue: Perhaps there are other topics on this forum that may be of help.