Mosquitto - MQTT - Tasmota

Hi I’ve been fiddling about with this for 2 days and still no joy.
I did have mqtt working previously but hasn’t been needed again until now.
I have Home Assistant running on a virtual machine.
Mosquitto is installed.
I have installed Tasmoda on a nodemcu8266 and currently set as a 4 channel switch.
Mosquitto detects it but does not discover the switches.
Tasmota Version 8.3.1.2

Log from Mosquitto Broker

[21:24:41] INFO: Setup mosquitto configuration
[21:24:41] WARNING: SSL not enabled - No valid certs found!
[21:24:42] INFO: Found local users inside config
[21:24:43] INFO: Initialize Hass.io Add-on services
[21:24:43] INFO: Initialize Home Assistant discovery
[21:24:43] INFO: Start Mosquitto daemon
1591647883: Loading config file /share/mosquitto/acl.conf
1591647883: mosquitto version 1.6.3 starting
1591647883: Config loaded from /etc/mosquitto.conf.
1591647883: Loading plugin: /usr/share/mosquitto/auth-plug.so
1591647883: |-- *** auth-plug: startup
1591647883:  ├── Username/password checking enabled.
1591647883:  ├── TLS-PSK checking enabled.
1591647883:  └── Extended authentication not enabled.
1591647883: Opening ipv4 listen socket on port 1883.
1591647883: Opening ipv6 listen socket on port 1883.
1591647883: Opening websockets listen socket on port 1884.
1591647883: Warning: Mosquitto should not be run as root/administrator.
1591647890: New connection from 192.168.1.68 on port 1883.
[INFO] found keith on local database
1591647892: New client connected from 192.168.1.68 as DVES_026179 (p2, c1, k30, u'keith').
1591647931: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1591647933: New client connected from 172.30.32.1 as auto-02E633F6-29CF-5C4B-7DC7-8E7237852655 (p2, c1, k60, u'homeassistant').
1591647972: Socket error on client DVES_026179, disconnecting.
1591647979: New connection from 192.168.1.68 on port 1883.
1591647979: New client connected from 192.168.1.68 as DVES_026179 (p2, c1, k30, u'keith').
1591648092: Socket error on client DVES_026179, disconnecting.
1591648102: New connection from 192.168.1.68 on port 1883.
1591648102: New client connected from 192.168.1.68 as DVES_026179 (p2, c1, k30, u'keith').
1591648161: Socket error on client DVES_026179, disconnecting.
1591648172: New connection from 192.168.1.68 on port 1883.
1591648172: New client connected from 192.168.1.68 as DVES_026179 (p2, c1, k30, u'keith').
1591648276: Socket error on client DVES_026179, disconnecting.
1591648283: New connection from 192.168.1.68 on port 1883.
[INFO] found keith on local database
1591648284: New client connected from 192.168.1.68 as DVES_026179 (p2, c1, k30, u'keith').


Hi’ @KeithUK1

Have you enabled HA autodiscovery by issuing a setoption19 1 command in the Tasmota console ?
All my Tasmota devices with switches, sensors etc. dont show up in HA unless i force autodiscovery.

Ciao !

Thanks for your response, yes i have SetOption19 1 in the console.

For god’s sake no one can read that. Do NOT post photos of text. Copy - paste, it’s been around for many years.

Do you have discovery turned on in home assistant?

Yes, discovery is turned on.

looks like its having problems to connect although that might be i been restarting it.
as text…:slight_smile:

07:51:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:20:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"72","Signal (dBm)":"-64","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
07:51:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T07:51:28","Uptime":"0T10:20:13","UptimeSec":37213,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":72,"Signal":-64,"LinkCount":1,"Downtime":"0T00:00:06"}}
07:56:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:25:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"72","Signal (dBm)":"-64","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
07:56:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T07:56:28","Uptime":"0T10:25:13","UptimeSec":37513,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":72,"Signal":-64,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:01:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:30:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"72","Signal (dBm)":"-64","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
08:01:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:01:28","Uptime":"0T10:30:13","UptimeSec":37813,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":72,"Signal":-64,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:06:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:35:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"72","Signal (dBm)":"-64","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
08:06:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:06:28","Uptime":"0T10:35:13","UptimeSec":38113,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":70,"Signal":-65,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:11:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:40:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"70","Signal (dBm)":"-65","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
08:11:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:11:28","Uptime":"0T10:40:13","UptimeSec":38413,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":70,"Signal":-65,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:16:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:45:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"64","Signal (dBm)":"-68","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
08:16:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:16:28","Uptime":"0T10:45:13","UptimeSec":38713,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:21:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:50:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"64","Signal (dBm)":"-68","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
08:21:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:21:28","Uptime":"0T10:50:13","UptimeSec":39013,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:26:18 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T10:55:03","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"68","Signal (dBm)":"-66","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":1,"LoadAvg":19}
08:26:28 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:26:28","Uptime":"0T10:55:13","UptimeSec":39313,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":68,"Signal":-66,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:27:04 MQT: Attempting connection...
08:27:05 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:27:16 MQT: Attempting connection...
08:27:16 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:27:27 MQT: Attempting connection...
08:27:27 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:27:38 MQT: Attempting connection...
08:27:38 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:27:49 MQT: Attempting connection...
08:27:49 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:28:00 MQT: Attempting connection...
08:28:00 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:28:11 MQT: Attempting connection...
08:28:11 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:28:22 MQT: Attempting connection...
08:28:22 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:28:33 MQT: Attempting connection...
08:28:33 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:28:44 MQT: Attempting connection...
08:28:44 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:28:55 MQT: Attempting connection...
08:29:00 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:29:11 MQT: Attempting connection...
08:29:11 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:29:22 MQT: Attempting connection...
08:29:22 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:29:33 MQT: Attempting connection...
08:29:33 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:29:44 MQT: Attempting connection...
08:29:44 MQT: Connect failed to 192.168.1.236:1883, rc -2. Retry in 10 sec
08:29:55 MQT: Attempting connection...
08:29:57 MQT: Connected
08:29:57 MQT: tele/tasmota_026179/LWT = Online (retained)
08:29:57 MQT: cmnd/tasmota_026179/POWER = 
08:31:25 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T11:00:10","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"68","Signal (dBm)":"-66","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":2,"LoadAvg":19}
08:31:35 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:31:35","Uptime":"0T11:00:20","UptimeSec":39620,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":68,"Signal":-66,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:36:25 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T11:05:10","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"68","Signal (dBm)":"-66","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":2,"LoadAvg":19}
08:36:35 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:36:35","Uptime":"0T11:05:20","UptimeSec":39920,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":22,"MqttCount":2,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":68,"Signal":-66,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:41:25 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T11:10:10","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"68","Signal (dBm)":"-66","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":2,"LoadAvg":19}
08:41:35 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:41:35","Uptime":"0T11:10:20","UptimeSec":40220,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":68,"Signal":-66,"LinkCount":1,"Downtime":"0T00:00:06"}}
08:46:25 MQT: tele/tasmota_026179/HASS_STATE = {"Version":"8.3.1.2(54ab264-tasmota)","BuildDateTime":"2020-06-06T21:02:22","Module or Template":"4 Channel","RestartReason":"Software/System restart","Uptime":"0T11:15:10","Hostname":"tasmota_026179-0377","IPAddress":"192.168.1.68","RSSI":"66","Signal (dBm)":"-67","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:06","MqttCount":2,"LoadAvg":19}
08:46:35 MQT: tele/tasmota_026179/STATE = {"Time":"2020-06-09T08:46:35","Uptime":"0T11:15:20","UptimeSec":40520,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"CottageWireless24_EXT","BSSId":"CC:40:D0:4F:97:13","Channel":1,"RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:06"}}

this is from Tasmota console

I recommend using mosquitto_sub or some other debugging tool to see what is being received by your broker.