Tasmota switch 'unavailable' after migration to native Tasmota integration

Hi,

I used to have my tasmota switches setup with mqtt discovery (setoption19 1).
As the MQTT discovery is deprecated, I’m attempting to move them to tasmota (setoption19 0).

Tasmota integration does discover the switch and all associated sensors, however these are all ‘unavailable’.

I can’t make them work… What is wrong, what do I need to do?

Go to your entities section and select the entity which is unavailable. Enable the entity and Update. Have to wait 30 seconds for it to become available from memory.

Hi,

My entities are enabled, but still showing ‘Unavailable’

So when you select an unavailable entity does it show like in my first picture? All I did was enable the entity and Update. It then becomes available like you see in the second picture. Just tried on another device and it works for me. Also, what’s the version of Tasmota you have on the device?

As displayed in my screenshot I got many enabled entities and 8 disabled (highlighted by the link et bottom of second screenshot).

So my enabled entities show up as Unavailable… And yes I waited for the update from the device. Actually they have been unavailable for the last 24h… Teleperiod is configured to default 300 on the device.

I’m running Tasmota 9.5 and 10.0 on the devices.
I’ve put “SetOption19 0” and “SetOption30 0” on the device, hence I would expect my switch to be available, but it is not

Might be something else then. You probably tried clearing cache and restarting too. Out of ideas. Nothing on the Tasmota GitHub with others going through the same issue maybe? Sorry couldn’t be more help. Hope you sort it out?

Restart the device in the web console and see if it throws any errors at you too. Something should show there. Good luck.

Console does not show anything as expected…

09:23:17.389 QPC: Reset
09:23:18.402 MQT: home/Livingroom/Camera/STATE = {"Time":"2021-10-27T09:23:18","Uptime":"0T00:00:09","UptimeSec":9,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":28,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"Titi-2.4","BSSId":"C4:E9:84:7B:4B:F6","Channel":11,"Mode":"11n","RSSI":22,"Signal":-89,"LinkCount":1,"Downtime":"0T00:00:03"}}
09:23:18.430 MQT: home/Livingroom/Camera/SENSOR = {"Time":"2021-10-27T09:23:18","ENERGY":{"TotalStartTime":"2021-04-22T11:44:32","Total":9.343,"Yesterday":0.081,"Today":0.038,"Period": 0,"Power": 2,"ApparentPower": 6,"ReactivePower": 6,"Factor":0.36,"Voltage":269,"Current":0.024}}
09:23:19.402 APP: Boot Count 21913
09:23:19.739 CFG: Saved to flash at FB, Count 26201, Bytes 4096
09:23:23.455 MQT: tasmota/discovery/24A160290B9B/config = {"ip":"192.168.0.135","dn":"Camera","fn":["Camera",null,null,null,null,null,null,null],"hn":"Camera","mac":"24A160290B9B","md":"Neo Coolcam 16","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.0.0","t":"Camera","ft":"home/Livingroom/Camera","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} (retained)
09:23:23.463 MQT: tasmota/discovery/24A160290B9B/sensors = {"sn":{"Time":"2021-10-27T09:23:23","ENERGY":{"TotalStartTime":"2021-04-22T11:44:32","Total":9.343,"Yesterday":0.081,"Today":0.038,"Power": 2,"ApparentPower": 7,"ReactivePower": 6,"Factor":0.34,"Voltage":269,"Current":0.025}},"ver":1} (retained)
09:23:32.777 WIF: Checking connection...
09:24:12.760 WIF: Checking connection...
09:24:18.372 MQT: home/Livingroom/Camera/STATE = {"Time":"2021-10-27T09:24:18","Uptime":"0T00:01:09","UptimeSec":69,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"Titi-2.4","BSSId":"C4:E9:84:7B:4B:F6","Channel":11,"Mode":"11n","RSSI":20,"Signal":-90,"LinkCount":1,"Downtime":"0T00:00:03"}}
09:24:18.402 MQT: home/Livingroom/Camera/SENSOR = {"Time":"2021-10-27T09:24:18","ENERGY":{"TotalStartTime":"2021-04-22T11:44:32","Total":9.343,"Yesterday":0.081,"Today":0.038,"Period": 0,"Power": 3,"ApparentPower": 6,"ReactivePower": 6,"Factor":0.39,"Voltage":269,"Current":0.024}}

We clearly see the Tasmota discovery, which I knew worked as I saw all sensors showing in HA… But it doesn’t explain why they remain unavailable.
Log clearly shows the states being published to the MQTT topic defined and advertised in the discovery packet.

I don’t see the device connecting at the console.

Your boot count is HUGE

This is the full log (I cut a part previously):

00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at F4, Count 26200
00:00:00.057 QPC: Count 1
00:00:00.061 ROT: Mode 1
00:00:00.062 SRC: Restart
00:00:00.064 Project tasmota - Camera Version 10.0.0(tasmota)-2_7_4_9(2021-10-19T08:23:49)
00:00:00.216 WIF: Checking connection...
00:00:00.217 WIF: Attempting connection...
00:00:00.553 WIF: Connecting to AP1 <my-AP> Channel 11 BSSId C4:**:**:**:4B:** in mode 11n as Camera...
00:00:01.753 WIF: Checking connection...
00:00:01.754 WIF: Connected
00:00:02.006 HTP: Web server active on Camera with IP address 192.168.0.135
00:00:02.264 HTP: Main Menu
00:00:02.498 NTP: Synch time...
00:00:02.523 RTC: UTC 2021-10-27T08:23:13, DST 2021-03-28T02:00:00, STD 2021-10-31T03:00:00
09:23:13.000 NTP: Synched
09:23:14.045 MQT: Attempting connection...
09:23:14.105 MQT: Connected
09:23:14.109 MQT: home/Livingroom/Camera/LWT = Online (retained)
09:23:14.112 MQT: home/Livingroom/Camera/cmnd/POWER = 
09:23:14.113 MQT: Subscribe to home/Livingroom/Camera/cmnd/#
09:23:14.115 MQT: Unsubscribe from homeassistant/status
09:23:14.120 MQT: home/Livingroom/Camera/INFO1 = {"Info1":{"Module":"Neo Coolcam 16","Version":"10.0.0(tasmota)","FallbackTopic":"cmnd/Camera_fb/","GroupTopic":"home/Livingroom/Camera/cmnd/"}}
09:23:14.129 MQT: home/Livingroom/Camera/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"Camera","IPAddress":"192.168.0.135"}}
09:23:14.142 MQT: home/Livingroom/Camera/INFO3 = {"Info3":{"RestartReason":"Software/System restart"}}
09:23:14.151 MQT: home/Livingroom/Camera/RESULT = {"POWER":"ON"}
09:23:14.157 MQT: home/Livingroom/Camera/POWER = ON
09:23:15.271 HTP: Console
09:23:17.389 QPC: Reset
09:23:18.402 MQT: home/Livingroom/Camera/STATE = {"Time":"2021-10-27T09:23:18","Uptime":"0T00:00:09","UptimeSec":9,"Heap":28,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":28,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"Titi-2.4","BSSId":"C4:E9:84:7B:4B:F6","Channel":11,"Mode":"11n","RSSI":22,"Signal":-89,"LinkCount":1,"Downtime":"0T00:00:03"}}
09:23:18.430 MQT: home/Livingroom/Camera/SENSOR = {"Time":"2021-10-27T09:23:18","ENERGY":{"TotalStartTime":"2021-04-22T11:44:32","Total":9.343,"Yesterday":0.081,"Today":0.038,"Period": 0,"Power": 2,"ApparentPower": 6,"ReactivePower": 6,"Factor":0.36,"Voltage":269,"Current":0.024}}
09:23:19.402 APP: Boot Count 21913
09:23:19.739 CFG: Saved to flash at FB, Count 26201, Bytes 4096
09:23:23.455 MQT: tasmota/discovery/24A160290B9B/config = {"ip":"192.168.0.135","dn":"Camera","fn":["Camera",null,null,null,null,null,null,null],"hn":"Camera","mac":"24A160290B9B","md":"Neo Coolcam 16","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"10.0.0","t":"Camera","ft":"home/Livingroom/Camera","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} (retained)
09:23:23.463 MQT: tasmota/discovery/24A160290B9B/sensors = {"sn":{"Time":"2021-10-27T09:23:23","ENERGY":{"TotalStartTime":"2021-04-22T11:44:32","Total":9.343,"Yesterday":0.081,"Today":0.038,"Power": 2,"ApparentPower": 7,"ReactivePower": 6,"Factor":0.34,"Voltage":269,"Current":0.025}},"ver":1} (retained)
09:23:32.777 WIF: Checking connection...
09:23:52.783 WIF: Checking connection...
09:24:12.760 WIF: Checking connection...
09:24:18.372 MQT: home/Livingroom/Camera/STATE = {"Time":"2021-10-27T09:24:18","Uptime":"0T00:01:09","UptimeSec":69,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Wifi":{"AP":1,"SSId":"Titi-2.4","BSSId":"C4:E9:84:7B:4B:F6","Channel":11,"Mode":"11n","RSSI":20,"Signal":-90,"LinkCount":1,"Downtime":"0T00:00:03"}}
09:24:18.402 MQT: home/Livingroom/Camera/SENSOR = {"Time":"2021-10-27T09:24:18","ENERGY":{"TotalStartTime":"2021-04-22T11:44:32","Total":9.343,"Yesterday":0.081,"Today":0.038,"Period": 0,"Power": 3,"ApparentPower": 6,"ReactivePower": 6,"Factor":0.39,"Voltage":269,"Current":0.024}}

Not sure why your device is

after it connects. I’ve never seen that on any of my devices.

So this problem just started when you tried adding the device with the integration? Do you have other devices with the same problem?

Any of my existing devices that I migrate from MQTT discovery to Tasmota discovery has the same issue…

Maybe report an issue. You’ll get it sorted there. Your device firmware; have you updated that recently ?

I managed to replicate your issue, I think?
You didn’t by any chance change the Client Id or Full topic.
I just did on one of my devices and it becomes Unavailable.

Yes indeed. Talking on the Discord chat I found out that the FullTopic configured does not work…

I would have anticipated that the discovery packet would tell tasmota where to look for data, but that does not like that it seems.

Reverting to defaults makes the states available again and they update properly.

On top, it seems that “MQTT Client” value cannot be the same as “Topic”… don’t know why, but it seems to be that way…

Yeah good you got it sorted. I think @digiblur had a video about the initial setup of Tasmota devices and it said not to touch that. Now we know why. :wink:

Your boot count for that device is a concern. I have close to 50 Tasmota devices running for close to a year now. The highest I see is 93. All the best and take care :+1:

Hi, I’ve the same problem after upgrading my tasmota son off device to 13.3.0.
I’ve deleted it and re-added many times. It gets discovered and all the entities created, but all the sensors and the control are unavailable.

Any ideas please