Tasmota Unavailable in Home Assistant

I have several lights and switches using Tasmota firmware and communicating with Home Assistant over MQTT. A couple of times all my tasmota devices show as unavailable.
This is not a discovery issue after HA reboot as I already have automation’s in setup to discover them after HA reboot and that works fine.
The devices still seem to communicate with one another (example my switch sends a message to the light to turn on) but HA is showing they are unavailable and cannot communicate with them.
To fix this particular problem I had to log into the tasmota devices themselves and reboot them manually. Once the device rebooted, then HA was able to see them again and I could operate the devices in HA’s interface.
Has anyone experienced a problem like this or know how to fix?

Tasmota console SetOption19 1 aka autodiscovery activated?
Best, JR

Yes, setoption19 is On.

What version of tasmota are you running ?

Running 8.1.0 on all devices.

You could try a discovery messages on restart of HA

 - data:
     payload: 'setoption19 1'
     topic: tasmotas/cmnd/backlog
   service: mqtt.publish

I have an automation setup that discovers them after I restart HA. With this issue I’m not sure when exactly they are going unavailable for HA. It seems like I went to bed, they were working and woke up they were not. Next time it happens I’ll try to find logs. I’m pretty sure though that when I checked HA logs it just said that they couldn’t be found or were unresponsive.

So I noticed something today.
I updated my HA to version 107. After the upgrade my tasmota devices are showing unavailable again HOWEVER, it only seems to be the light bulbs. All the devices that are switches are working as expected. I’ve tried changing my automation that discovers devices after a reboot but nothing seems to be picking these back up.
I’m waiting to manually restart the light bulbs to test any suggestions. HA does not have any logs pertaining to tasmota or mqtt integrations.

When I restart HA and watch the logs in the tasmota console I see HA is sending a message and the device is responding. Not sure why then it still shows unavailable.

16:47:19 MQT: Received Topic "basement_office_light/cmnd/state", Data Size 0, Data ""
16:47:19 SRC: MQTT
16:47:19 CMD: Group 0, Index 1, Command "STATE", Data ""
16:47:19 MQT: basement_office_light/tele/STATE = {"Time":"2020-03-19T16:47:19","Uptime":"2T02:57:35","UptimeSec":183455,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF","Dimmer":100,"Color":"00000000FF","HSBColor":"0,0,0","Channel":[0,0,0,0,100],"CT":500,"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"NoT","BSSId":"xx:xx:xx:xx:xx:xx","Channel":11,"RSSI":64,"Signal":-68,"LinkCount":1,"Downtime":"0T00:00:20"}}
16:47:19 MQT: basement_office_light/tele/HASS_STATE = {"Version":"8.1.0(tasmota)","BuildDateTime":"2019-12-25T12:33:25","Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Module":"Lohas RGBWW","RestartReason":"Software/System restart","Uptime":"2T02:57:35","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:20","MqttCount":2,"BootCount":66,"SaveCount":745,"IPAddress":"192.168.4.91","RSSI":"64","LoadAvg":19}
16:47:19 MQT: basement_office_light/stat/RESULT = {"Version":"8.1.0(tasmota)","BuildDateTime":"2019-12-25T12:33:25","Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Module":"Lohas RGBWW","RestartReason":"Software/System restart","Uptime":"2T02:57:35","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:20","MqttCount":2,"BootCount":66,"SaveCount":745,"IPAddress":"192.168.4.91","RSSI":"64","LoadAvg":19}

Any update on the issue … I’m facing the same issue

Perhaps try latest Tasmota and the Tasmota integration in HA? I never see these issues (although I have no Tasmota Lights)

I have 5 tasmota based devices and if homeassistant is restarted they all become unavailable until so19 1 command is issued. 32bit tasmota devices are also affected. I thought the so19 option would be saved, but then I realised it’s homeassistant that is dropping the devices, not tasmota.

I had a lot of issues with this, but setting a static IP in my router settings seemed to fix the issue for me.

I’m experiences similar issue last week and then begin to upgrade all my tasmota to 9.5.0 release.

Following the new tasmota integrations stop all `SetOption19 0’ and then running Tasmota Integrations. Puff the entire device appear and its now FAST appearence without any delay after restart. Recommend for those of you who run TASMOTA. Many other options available like lights/switch etc…

I was having similar issues. It turns out I didn’t have MQTT Turned on and that is required for the Tasmota integration as explained in the docs. Go into the Tasmota Device’s web interface and enable MQTT (configure->other), also make sure Configure->Configure MQTT has the correct MQTT host and password. Also make sure your MQTT broker is running on your server. Finally go into the console and do the SetOption19 1 (if MQTT is not turned on this won’t be able to be set).

Hopefully this fixes it.

IF NOT:

Install something like MQTT Explorer (Windows desktop app, https://mqtt-explorer.com/) on your computer, login to your MQTT server, and delete the MQTT topics for your devices.

Disable and then enable your MQTT integration in Home Assistant integrations (making sure that the auto discover is enabled in your integration).

Then check back in Home Assistant in the Tasmota integration and the unavailable notices should go away and all your MQTT topics should populate.

This worked for me and got my tasmota devices discovered. I had to do all the stemps above.