Tasmota Integration: Unavailable Devices After Reboot

Yep. It’s only impatient bastards like me who want everything to come up on restart.

LOL… You are funny. :face_with_hand_over_mouth:

I would like to bid the differ though. The fact that you are willing to spend time teaching an old guy new tricks means you are definitely not impatient.

Anyway, until we come across each other again next time, stay safe.

1 Like

For me, I have homeassistant restart once a week - 4am every monday. The tasmota devices become unavailable until I setoption19 1 on each device.

I created a simple rule in tasmota to send the setoption19 1 at 4.05am every day

Rule1 on time#minute=245 do setoption19 1

rule1=on

then restart 1`to invoke the autosave. type rule0 to check the rule is in place.

Check your mosquitto (or other mqtt server) configuration. It seems it does not have a persistence file. Your rule will wear out the flash memory on your devices eventually.

Exactly. The correct solution has been posted but people just ignore it.

The flashmemory on my device is good for 40-60000 writes so I should be ok. The correct solution doesn’t work for me. ALL my other non tasmota based esp8266/32 devices just work. Tasmota based devices do not. This is a tasmota issue, surely?

No it’s not - it’s your issue

2 Likes

If you have not got anything to add, it’s best to not to be rude. Helps nobody.

The solution is to turn off MQTT integration using setoption19 0 and to use homeassistant’s tasmota integration instead. This is added in HA’s integration panel, or will be picked up automatically.

1 Like

Hi Guys,

I have uploaded the config file which keeps the Tasmota devices in Tasmota integration instead of MQTT

I’ve used your configuration backup, but after I’ve applied it, device disconnected and not responding to ping :frowning:

Restore of a unknown device is not advisable. Try to reset your device.

https://tasmota.github.io/docs/Device-Recovery/

Thank you so much!!!

I have the same issue with Tasmota devices (10.1 - but also previous releases). After the mosquitto (2.0.11-1) broker restart, HA (2021.12.1) is reporting tasmota devices “Unavailable” (Tasmota integration).

Strangely HA reports device change state when the new status is received over MQTT (so “updated 2 seconds ago”) but it’s still “Unavailable” and there is no data.
Yes, I have persistent db for mosquitto turned on. I even deleted this mosquitto db - so all old data where cleared out and Tasmota integration created again.
Setting again “SetOption19 0” on Tasmota devices does not help.
The only thing that helps is Tasmota restart, when device publishes full set of information over mqtt.

I know that initial topic was about “HA” restart - but I think in many situations HA is restart with mosquito in the docker, that’s why I still think it’s the same problem. My installation is manual - with every service working on it’s own.
Anyway, I’ve noticed that Mosquitto restart only affects sensor connected directly to the restarted MQTT server (I have few others MQTT bridged together) - those that are bridged, work fine.

I’ve made a debug session (this is mqtt debug output of the HA) for one tasmota device (grep tasmota_33889B on log output):

TASMOTA RESTART
2021-12-20 19:21:41 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/LWT: b'Offline'
2021-12-20 19:21:41 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS11, mid: 524
2021-12-20 19:21:41 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS1, mid: 525
2021-12-20 19:21:42 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATE: '', mid: 526
2021-12-20 19:21:42 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '10', mid: 527
2021-12-20 19:21:42 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '11', mid: 528
2021-12-20 19:21:42 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '1', mid: 529
2021-12-20 19:21:47 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/LWT: b'Online'
2021-12-20 19:21:47 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/RESULT: b'{"POWER":"OFF"}'
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '1', mid: 530
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '11', mid: 531
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATE: '', mid: 532
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '10', mid: 533
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS1: b'{"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"tasmota-minimal.bin","RestartReason":"Software/System restart","Uptime":"0T00:00:08","StartupUTC":"2021-12-20T18:21:41","Sleep":50,"CfgHolder":4617,"BootCount":67,"BCResetTime":"2020-03-28T20:41:15","SaveCount":2533,"SaveAddress":"F8000"}}'
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS11: b'{"StatusSTS":{"Time":"2021-12-20T19:21:49","Uptime":"0T00:00:08","UptimeSec":8,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":22,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-35,"LinkCount":1,"Downtime":"0T00:00:05"}}}'
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/STATE: b'{"Time":"2021-12-20T19:21:49","Uptime":"0T00:00:08","UptimeSec":8,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":24,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-37,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/RESULT: b'{"Time":"2021-12-20T19:21:49","Uptime":"0T00:00:08","UptimeSec":8,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":24,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-37,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:21:48 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS10: b'{"StatusSNS":{"Time":"2021-12-20T19:21:49","AM2301":{"Temperature":22.7,"Humidity":31.0,"DewPoint":4.7},"TempUnit":"C"}}'
2021-12-20 19:21:52 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/STATE: b'{"Time":"2021-12-20T19:21:52","Uptime":"0T00:00:11","UptimeSec":11,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":27,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-34,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:21:52 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/SENSOR: b'{"Time":"2021-12-20T19:21:52","AM2301":{"Temperature":22.7,"Humidity":31.0,"DewPoint":4.7},"TempUnit":"C"}'
2021-12-20 19:21:57 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tasmota/discovery/807D3A33889B/config: b'{"ip":"192.168.100.10","dn":"SwiatelkaAni","fn":["SwiatelkaAni",null,null,null,null,null,null,null],"hn":"tasmota-33889B-2203","mac":"807D3A33889B","md":"Sonoff S26","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.1.0","t":"tasmota_33889B","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":1,"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}'

Everything is ok so far...

MOSQUITTO RESTART

2021-12-20 19:22:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/LWT: b'Offline'
2021-12-20 19:22:22 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS11, mid: None
2021-12-20 19:22:22 ERROR (MainThread) [homeassistant.util.logging] Exception in availability_message_received when handling msg on 'tele/tasmota_33889B/LWT': 'Offline'
2021-12-20 19:22:22 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS1, mid: None
2021-12-20 19:22:22 ERROR (MainThread) [homeassistant.util.logging] Exception in availability_message_received when handling msg on 'tele/tasmota_33889B/LWT': 'Offline'
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '11', mid: 541
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATE: '', mid: 542
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '10', mid: 543
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/RESULT, mid: 566
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS1, mid: 567
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS10, mid: 568
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS11, mid: 569
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tele/tasmota_33889B/LWT, mid: 595
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tele/tasmota_33889B/SENSOR, mid: 596
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to tele/tasmota_33889B/STATE, mid: 597
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tasmota/discovery/807D3A33889B/config (retained): b'{"ip":"192.168.100.10","dn":"SwiatelkaAni","fn":["SwiatelkaAni",null,null,null,null,null,null,null],"hn":"tasmota-33889B-2203","mac":"807D3A33889B","md":"Sonoff S26","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.1.0","t":"tasmota_33889B","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":1,"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}'
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/LWT (retained): b'Online'
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS11, mid: 618
2021-12-20 19:22:23 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS1, mid: 619
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATE: '', mid: 630
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '10', mid: 631
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '11', mid: 647
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '1', mid: 648
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/STATE: b'{"Time":"2021-12-20T19:22:25","Uptime":"0T00:00:44","UptimeSec":44,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-35,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/RESULT: b'{"Time":"2021-12-20T19:22:25","Uptime":"0T00:00:44","UptimeSec":44,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-35,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS10: b'{"StatusSNS":{"Time":"2021-12-20T19:22:25","AM2301":{"Temperature":22.7,"Humidity":31.2,"DewPoint":4.8},"TempUnit":"C"}}'
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS11: b'{"StatusSTS":{"Time":"2021-12-20T19:22:25","Uptime":"0T00:00:44","UptimeSec":44,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":25,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-34,"LinkCount":1,"Downtime":"0T00:00:05"}}}'
2021-12-20 19:22:24 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS1: b'{"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"tasmota-minimal.bin","RestartReason":"Software/System restart","Uptime":"0T00:00:44","StartupUTC":"2021-12-20T18:21:41","Sleep":50,"CfgHolder":4617,"BootCount":68,"BCResetTime":"2020-03-28T20:41:15","SaveCount":2534,"SaveAddress":"F7000"}}'
2021-12-20 19:22:27 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/LWT: b'Offline'
2021-12-20 19:22:27 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tasmota/discovery/807D3A33889B/config: b'{"ip":"192.168.100.10","dn":"SwiatelkaAni","fn":["SwiatelkaAni",null,null,null,null,null,null,null],"hn":"tasmota-33889B-2203","mac":"807D3A33889B","md":"Sonoff S26","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.1.0","t":"tasmota_33889B","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":1,"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}'
2021-12-20 19:22:27 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS11, mid: 656
2021-12-20 19:22:27 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to stat/tasmota_33889B/STATUS1, mid: 657
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATE: '', mid: 663
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '10', mid: 664
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '11', mid: 685
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on cmnd/tasmota_33889B/STATUS: '1', mid: 686
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/STATE: b'{"Time":"2021-12-20T19:22:29","Uptime":"0T00:00:48","UptimeSec":48,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-35,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/RESULT: b'{"Time":"2021-12-20T19:22:29","Uptime":"0T00:00:48","UptimeSec":48,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-35,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:22:28 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS10: b'{"StatusSNS":{"Time":"2021-12-20T19:22:29","AM2301":{"Temperature":22.7,"Humidity":31.1,"DewPoint":4.7},"TempUnit":"C"}}'
2021-12-20 19:22:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS11: b'{"StatusSTS":{"Time":"2021-12-20T19:22:29","Uptime":"0T00:00:48","UptimeSec":48,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":25,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-33,"LinkCount":1,"Downtime":"0T00:00:05"}}}'
2021-12-20 19:22:29 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/STATUS1: b'{"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"tasmota-minimal.bin","RestartReason":"Software/System restart","Uptime":"0T00:00:48","StartupUTC":"2021-12-20T18:21:41","Sleep":50,"CfgHolder":4617,"BootCount":68,"BCResetTime":"2020-03-28T20:41:15","SaveCount":2534,"SaveAddress":"F7000"}}'

NOW the temperature/humidity is "Unavailable"

Setoption19 0

2021-12-20 19:25:10 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/tasmota_33889B/RESULT: b'{"SetOption19":"OFF"}'
2021-12-20 19:25:10 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tasmota/discovery/807D3A33889B/config: b'{"ip":"192.168.100.10","dn":"SwiatelkaAni","fn":["SwiatelkaAni",null,null,null,null,null,null,null],"hn":"tasmota-33889B-2203","mac":"807D3A33889B","md":"Sonoff S26","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.1.0","t":"tasmota_33889B","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":1,"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}'

No change - still temperature/humidity is "Unavailable" - but HA is receiving new data..

2021-12-20 19:26:52 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/STATE: b'{"Time":"2021-12-20T19:26:52","Uptime":"0T00:05:11","UptimeSec":311,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF","Wifi":{"AP":1,"SSId":"WiFi_SSID","BSSId":"26:5A:4C:1F:06:3E","Channel":11,"Mode":"11n","RSSI":100,"Signal":-33,"LinkCount":1,"Downtime":"0T00:00:05"}}'
2021-12-20 19:26:52 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on tele/tasmota_33889B/SENSOR: b'{"Time":"2021-12-20T19:26:52","AM2301":{"Temperature":22.7,"Humidity":31.1,"DewPoint":4.7},"TempUnit":"C"}'

I installed the integration and my plugs are noted as “Calex Pwr Plug by Tasmota”, and they are said to have firmware 9.1.0, which is correct when I look at the GUI for the plugs. But they have been greyed out and informaion unavailable since I installed the integration. And they never show anything but “off” as state. The info at the Tasmota website is “if it ain’t broke don’t fix it”, but is this something that can actually be fixed by updating to a new firmware?

Thanks again SirClip.
The problem is the transition of the “setoption19 1” devices with MQTT discovery and the tasmota integration.
I had some devices which become unavaible after restart one some newer ones dont. So I startet to fix it:
My setup is:
MQTT in a Docker (runnign 24/7 - no schedule reboot)
Hass.io running in a Virtual machine (tasmota integration & Tasmoadmin installed)

Folow these steps:

  1. Install MQTT Explorder on your PC and connect to your mqtt server.
  2. Find the topic : tasmota/discovery and check how many devices there are.
  3. Startup Tasmoadmin in your HA and discover all you tasmotas in your network (full ip range scan)
  4. Send the “Setoption 19 0” command to all your devices.
  5. Go to MQTT Explorer and delete the retained discovery messages. Just select the “folder” discovery and click on the trashcan on the upper right)
  6. Go back to Tasmoadmin and send the command “restart 1” to all devices.

Et voila. All tasmotas will send new discovery messages and the integration will pic them up and you can use them.
A reboot off the server, docker, mqtt or hass doesnt break the setup.

Have fun building!

2 Likes

Hi,
I was kind of sure it won’t work, since I’ve already previously deleted the Mosquitto persistent database during tests, but did it anyway and deleted just discovery topics.
No change whatsoever - but this was kind of expected, since those discovery informations where in “tasmota” topic.
Anyway, I don’t have my Tasmota devices under Mqtt integration listed in HA - so there shouldn’t be any conflict.

@all and @Sauron
I have the exact same issue on my supervised HASS.IO installation. It runs Mosquito broker as addon and all my 8 tasmota devices are using the integration in HA. SetOption19 is 0 on all of them.

Zigbee2mqtt is heavily using my broker and working with no issues on ~150 devices.

Everytime when I restart HA core , all my tasmota devices became unavailable.

I have read all posts in this thread, but which is the correct solution?

Thx

I have started a discussion over in the tasmota github: HomeAssistant Tasmota Integration: Unavailable Devices After HA core restart · arendst/Tasmota · Discussion #18412 · GitHub

I have now created an automation workaround to restart all tasmota devices on HA core start:

description: Workaround for "unavailable" status of all tasmota devices after core start
mode: single
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/klo/ampel/cmnd/restart
      payload: "1"
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/sz/irbridge2/cmnd/restart
      payload: "1"
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/bad/waschmaschine/cmnd/restart
      payload: "1"
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/bad/trockner/cmnd/restart
      payload: "1"
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/ku/spuele/cmnd/restart
      payload: "1"
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/wz/tischlampe/cmnd/restart
      payload: "1"
  - service: mqtt.publish
    data:
      qos: 0
      topic: /smarthome/sz/bedfsr/cmnd/restart
      payload: "1"
alias: Tasmota reboot devices on HA core start

Hope there comes a better solution!

Edit:
It seems it’s an integration issue.
Have created an issue over here: HomeAssistant Tasmota Integration: Unavailable Devices After HA core restart · Issue #91462 · home-assistant/core · GitHub