Domoticz, MQTT and Sonoff basic with Tasmota: help Topic is solved

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Domoticz, MQTT and Sonoff basic with Tasmota: help

Post by MichelFrance »

Hello,
I am running: Domoticz Version: 2022.1 on an ubuntu server and Sonoff Basic R1 and R2 with Tasmota 11.1.0.
The server also runs a MQTT server (mosquitto) and Zigbee2MQTT.

In Domoticz I created a new hardware "MQTT Auto Discovery Client Gateway with LAN interface" with Auto Discovery Prefix = homeassistant and the Zigbee devices are well recognized and are working.

But the Sonoff devices are not recognized.

Nothing in Domoticz log, but spying MQTT, I discovered that the Tasmota-Sonoff starts with this message:

Code: Select all

tasmota/discovery/B4E62D24ED35/config {"ip":"192.168.1	...
So, I created a new hardware "MQTT Auto Discovery Client Gateway with LAN interface" with Auto Discovery Prefix = tasmota

Still no Sonoff detected in Domoticz, but now some messages in the log:

Code: Select all

2022-06-09 15:02:08.104 Status: MQTT Broker tasmota: discovered: 323bb295-78c5-43da-841d-6abab3f6f234/323bb295-78c5-43da-841d-6abab3f6f234 (unique_id: 323bb295-78c5-43da-841d-6abab3f6f234)
2022-06-09 15:02:08.204 Error: MQTT Broker tasmota: MQTT_Discovery: Something other then 'config' received on discovery topic! (discovery/B4E62D24ED35/sensors/{"sn":{"Time":"2022-06-09T14:02:08"},"ver":1})!
2022-06-09 15:02:08.204 Error: MQTT Broker tasmota: MQTT_Discovery: Invalid/Unhandled data received! (Topic: discovery/B4E62D24ED35/sensors, Message: {"sn":{"Time":"2022-06-09T14:02:08"},"ver":1})
and the corresponding MQTT spying:

Code: Select all

tele/tasmota_24ED35/LWT Online
cmnd/tasmota_24ED35/POWER (null)
tele/tasmota_24ED35/INFO1 {"Info1":{"Module":"GenericMB","Version":"11.1.0(tasmota)","FallbackTopic":"cmnd/DVES_24ED35_fb/","GroupTopic":"cmnd/tasmotas/"}}
tele/tasmota_24ED35/INFO2 {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-24ED35-3381","IPAddress":"192.168.1.105"}}
tele/tasmota_24ED35/INFO3 {"Info3":{"RestartReason":"Power On","BootCount":18}}
stat/tasmota_24ED35/RESULT {"POWER":"ON"}
stat/tasmota_24ED35/POWER ON
domoticz/in {"idx":489,"nvalue":1,"svalue":"","Battery":100,"RSSI":10}
tele/tasmota_24ED35/STATE {"Time":"2022-06-09T14:02:03","Uptime":"0T00:00:10","UptimeSec":10,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"Lejardindesfleurs","BSSId":"28:D1:27:81:00:E2","Channel":6,"Mode":"11n","RSSI":100,"Signal":-19,"LinkCount":1,"Downtime":"0T00:00:04"}}
tasmota/discovery/B4E62D24ED35/config {"ip":"192.168.1.105","dn":"Tasmota","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"tasmota-24ED35-3381","mac":"B4E62D24ED35","md":"GenericMB","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"11.1.0","t":"tasmota_24ED35","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"ver":1}
tasmota/discovery/B4E62D24ED35/sensors {"sn":{"Time":"2022-06-09T14:02:08"},"ver":1}
domoticz/in {"idx":489,"nvalue":0,"svalue":"","Battery":100,"RSSI":10}
stat/tasmota_24ED35/RESULT {"POWER":"OFF"}
stat/tasmota_24ED35/POWER OFF
tele/tasmota_24ED35/STATE {"Time":"2022-06-09T14:07:03","Uptime":"0T00:05:10","UptimeSec":310,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":24,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"Lejardindesfleurs","BSSId":"28:D1:27:81:00:E2","Channel":6,"Mode":"11n","RSSI":100,"Signal":-28,"LinkCount":1,"Downtime":"0T00:00:04"}}

What is going bad? Someone to help me? Link to a good tutorial to interface Sonoff basic/tasmota to Domoticz?
Any suggestion?

Thanks in advance
M.
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Re: Domoticz, MQTT and Sonoff basic with Tasmota: help

Post by MichelFrance »

Answer to myself:
it works with "MQTT Client Gateway with LAN interface" and a dummy switch with od configured in Tasmota.

I'd like to have it work with auto discovery if possible, so this topic is not full closed. Any idea?
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz, MQTT and Sonoff basic with Tasmota: help

Post by waltervl »

Did you use Tasmota
SetOption19 1
To set tasmota device to MQTT Autodiscover protocol?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Re: Domoticz, MQTT and Sonoff basic with Tasmota: help

Post by MichelFrance »

Thank you!
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Domoticz, MQTT and Sonoff basic with Tasmota: help

Post by waltervl »

MichelFrance wrote: Friday 10 June 2022 7:37 Thank you!
You are welcome ;-) I suppose you got it working now?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
MichelFrance
Posts: 17
Joined: Tuesday 19 November 2019 16:28
Target OS: Linux
Domoticz version: 2023.1
Location: France
Contact:

Re: Domoticz, MQTT and Sonoff basic with Tasmota: help

Post by MichelFrance »

Yes!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest