Tasmota Integration not detecting devices

Hello,

I have followed Home Assistant - Tasmota page and set up the Tasmota integration in my HA (2021.7.4).

  • My Mosquitto (MQTT broker) is correctly configured and working.
  • I have a bunch of Tasmota devices working already using the “MQTT discovery”.
  • I am trying to migrate one of the devices to “SetOption19 0”. But the new Tasmota integration is just not detecting this device.
  • On the Tasmota device, the following is the console log soon after reboot. I have also added output of status 0.
00:00:00.001 HDW: ESP8285
00:00:00.050 CFG: Loaded from flash at F9, Count 43
00:00:00.056 QPC: Count 1
00:00:00.060 SER: Set to 8N1 9600 bit/s
00:00:00.110 Project tasmota sonoff-living-fan-2 Version 9.5.0(tasmota)-2_7_4_9(2021-06-17T08:26:35)
00:00:00.549 WIF: Connecting to AP1 Channel 11 BSSId 1C:3B:F3:DC:82:AC in mode 11n as sonoff-living-fan-2-5108...
00:00:03.757 WIF: Connected
00:00:04.009 HTP: Web server active on sonoff-living-fan-2-5108 with IP address 192.168.2.206
11:33:53.021 MQT: Attempting connection...
11:33:53.035 MQT: Connected
11:33:53.038 MQT: tele/sonoff-living-fan-2/LWT = Online (retained)
11:33:53.040 MQT: cmnd/sonoff-living-fan-2/POWER = 
11:33:53.050 MQT: tele/sonoff-living-fan-2/INFO1 = {"Info1":{"Module":"Sonoff iFan03","Version":"9.5.0(tasmota)","FallbackTopic":"cmnd/DVES_D573F4_fb/","GroupTopic":"cmnd/tasmotas/"}}
11:33:53.054 MQT: tele/sonoff-living-fan-2/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"sonoff-living-fan-2-5108","IPAddress":"192.168.2.206"}}
11:33:53.057 MQT: tele/sonoff-living-fan-2/INFO3 = {"Info3":{"RestartReason":"Software/System restart"}}
11:33:53.059 MQT: stat/sonoff-living-fan-2/RESULT = {"POWER1":"OFF"}
11:33:53.062 MQT: stat/sonoff-living-fan-2/POWER1 = OFF
11:33:54.483 QPC: Reset
11:33:57.417 MQT: tele/sonoff-living-fan-2/STATE = {"Time":"2021-08-01T11:33:57","Uptime":"0T00:00:11","UptimeSec":11,"Heap":29,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","FanSpeed":0,"Wifi":{"AP":1,"SSId":"Anjan & Shruthi Home","BSSId":"1C:3B:F3:DC:82:AC","Channel":11,"Mode":"11n","RSSI":80,"Signal":-60,"LinkCount":1,"Downtime":"0T00:00:05"}}
11:11:54.732 CMD: status 0
11:11:54.741 MQT: stat/sonoff-living-fan-2/STATUS = {"Status":{"Module":71,"DeviceName":"sonoff-living-fan-2","FriendlyName":["Living-Fan-2"],"Topic":"sonoff-living-fan-2","ButtonTopic":"0","Power":6,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0}}
11:11:54.747 MQT: stat/sonoff-living-fan-2/STATUS1 = {"StatusPRM":{"Baudrate":9600,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin.gz","RestartReason":"Software/System restart","Uptime":"2T23:38:08","StartupUTC":"2021-08-01T10:33:46","Sleep":50,"CfgHolder":4617,"BootCount":11,"BCResetTime":"2021-08-01T10:55:50","SaveCount":100,"SaveAddress":"F8000"}}
11:11:54.752 MQT: stat/sonoff-living-fan-2/STATUS2 = {"StatusFWR":{"Version":"9.5.0(tasmota)","BuildDateTime":"2021-06-17T08:26:35","Boot":31,"Core":"2_7_4_9","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8285","CR":"399/699"}}
11:11:54.757 MQT: stat/sonoff-living-fan-2/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Anjan & Shruthi Home",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C8000100060000005A0A000000000000","00020080","00006000","00000000"]}}
11:11:54.768 MQT: stat/sonoff-living-fan-2/STATUS4 = {"StatusMEM":{"ProgramSize":607,"Free":396,"Heap":23,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"144051","FlashFrequency":40,"FlashMode":3,"Features":["00000809","8FDAC787","04368001","000000CF","010013C0","C000F981","00004004","00001000","00000020"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37,45","Sensors":"1,2,3,4,5,6"}}
11:11:54.775 MQT: stat/sonoff-living-fan-2/STATUS5 = {"StatusNET":{"Hostname":"sonoff-living-fan-2-5108","IPAddress":"192.168.2.206","Gateway":"192.168.2.254","Subnetmask":"255.255.255.0","DNSServer":"8.8.8.8","Mac":"C8:2B:96:D5:73:F4","Webserver":2,"WifiConfig":4,"WifiPower":17.0}}
11:11:54.780 MQT: stat/sonoff-living-fan-2/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.2.204","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_D573F4","MqttUser":"sonoff-living-fan-2","MqttCount":3,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
11:11:54.786 MQT: stat/sonoff-living-fan-2/STATUS7 = {"StatusTIM":{"UTC":"2021-08-04T10:11:54","Local":"2021-08-04T11:11:54","StartDST":"2021-03-28T02:00:00","EndDST":"2021-10-31T03:00:00","Timezone":"+01:00","Sunrise":"05:28","Sunset":"20:24"}}
11:11:54.790 MQT: stat/sonoff-living-fan-2/STATUS10 = {"StatusSNS":{"Time":"2021-08-04T11:11:54"}}
11:11:54.797 MQT: stat/sonoff-living-fan-2/STATUS11 = {"StatusSTS":{"Time":"2021-08-04T11:11:54","Uptime":"2T23:38:08","UptimeSec":257888,"Heap":23,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":3,"POWER1":"OFF","FanSpeed":2,"Wifi":{"AP":1,"SSId":"Anjan & Shruthi Home","BSSId":"1C:3B:F3:DC:82:AC","Channel":11,"Mode":"11n","RSSI":98,"Signal":-51,"LinkCount":1,"Downtime":"0T00:00:05"}}}
  • I have searched around endlessly to figure out why this new native Tasmota integration is not working. But it seems to “just work” for everyone else.

  • Am I right in assuming that the Tasmota device is supposed to send a message on “tasmota/discovery/…” topic to notify HA about itself? (The prefix mentioned in the screenshot above)
  • In the Tasmota Console logs and in MQTT Explorer (separate app), I don’t see any messages on such a topic. Screenshot below.

Does this mean that Tasmota is not doing something it is supposed to do?

I have restarted HA many times, but still the same result. Could someone help me please?

Tasmota MQTT configuration screen:

Thanks!

What version do your tasmota device’s have ?

The latest 9.5.0 version of Tasmota. (You can see the version mentioned in the Console log I attached at the top of my original post)

@francisp - Hope you were notified about my response to your question.

Is there anybody who has any suggestions on what I could be doing wrong?

One thing I can think off. In the tasmota console, issue

setoption19 1
setoption19 0

This might resend the discovery messages.

4 Likes

Thanks @francisp . I have done that multiple times, actually. No luck.

I just noticed this screenshot

image

Did you create a user sonoff-living-fan-2 on your mqtt broker?

Yes @francisp . Mosquitto (the MQTT broker) uses the Home Assistant users for the MQTT users.

Hi,
there is a user for every device? Who or what created this user? And any of this HA user is also an user in MQTT?
I don’t believe that this is as it is meant to be… at least it’s not as it is with my MQTT and Tasmota.


I use an external MQTT but the concept is IMO the same: a new = one new user

And this user and its password is used in the devices MQTT parameter dialog and in the Tasmota integration.

@Joerg - yes, I created these users, and yes, I created one user for each device which connects to the MQTT broker.

It would probably be fine to share the same user for all MQTT devices. But I don’t see anything wrong with what I am doing either, and I also don’t think that having multiple users could be the reason for the problem I am reporting. Or are you suggesting that it could be the reason?

Yes it is. I am not sure if this is the reason, but it’s for sure unnecessary work.
Since your devices just want to provide information to your MQTT and Tasmota wants to read this information, I don’t see a need for different users. You dont use different WLAN logins either for the devices, or?
And I am not sure if user A can read the information user B got from its device.

Why not trying with the same user name and password on two devices? Use the same user you use to connect Tasmota to MQTT. When this is done use Setoption19 1 and after that Setoption19 0 again on both devices.
They should migrate from the list of devices in MQTT to Tasmota immediately.

@Joerg - actually, it is considered security best practice to use a separate user for each IoT device. Refer here.

Finally, the problem has been solved. Thanks to barbudor on the Tasmota discussion forum.

The problem was with mosquitto ACLs I had set up and totally forgot that they were active.

If I could have set the mosquitto logs to “debug”, I could have probably seen the “publish denied” messages in the logs. But I could not figure out how to set the mosquitto logging level in Home Assistant.

Everything works now. Thanks for the help everybody!

2 Likes

Difficult to find such things :slight_smile:

Well… maybe if you use an external MQTT in internet.
If someone is able to get access to your Tasmota flashed devices or to your internal MQTT Server you have a bigger problem, right?
And yes: I have seen Tasmota devices accidentally exposed to internet and I was able to steer them.

Here we are - took me 3 minutes to find one:



The device is named Tür/Tor (door/gate). What do you think, shall I help a bit and update it?

I face exactly the same issue, however I did not create any ACL file (unless it was created automatically without my knowledge)\

How can I check that ?
I flashed my Plug with Tasmota firmware, Tasmota integration is not discovering …

1 Like

In my case, an mqtt broker had to be configured and running (which I already have but aren’t using yet). Then I could add mqtt parameters to the configuration on the device, setoption19 1, and verify it showed up in the mqtt broker (Mosquitto in this case). Then setoption19 0 and reload the Integrations page in the browser and the device was finally listed in the Tasmota integration.
No amount of setoption19 switching, integration reloading, rebooting, or device “upgrading” worked before this. I’m not sure why. I have 2 other Tasmota devices that I didn’t have to go through this with.

1 Like

Sorry this is not going to help the people still struggling, but I did want to post that toggling

setoption19 1
setoption19 0

worked for me. Anyone else here for the same reason, give it a try first. Thanks for the help and good luck to those still having issues.

EDIT: I’m running Tasmota 11.0.0 and HA 2022.2.9

1 Like

Hello @Posreg en @thegman I have the exact same issue.
Did all the steps, Mosquito reinstalled, Tasmota installed, SetOption19 0 and all the other steps and also NO ACL file or what so ever. Tasmota integrationis not discovering.

I do hope someone call point me in a direction, that would be great!

Hi,
Just popped in to say I had the same issue. I use tasmota and MQTT for many devices, this one was showing in tasmota but not in HA via tasmota plugin.

Had to manually issue commands setoption19 1, then
setoption19 0 in tasmota device console to get it to show. Once I did, showed up straight away.

Thanks all