Dear all,
I am new to openhab and I did try sorting this bug for about 5 hours now…
I have this question: I run openhab on raspberry pi and I want to do a first smart device: Tasmota Plug Nous A1T. I followed this tutorial on integrating this: Control Tasmota flashed devices via MQTT
The problem is that the first time I did this tutorial, it all worked. Happy, I unplugged tasmota and plugged it to the socket I planned to control, and then it stopped working. After I reset the plug, and reconnect to the wifi, then it stops responding (the new IP of the plug where you configure the MQTT). Even though, I can see it connected via IP on wifi.
In MQTT explorer I see this discovery message constantly:
{“ip”:“192.168.0.127”,“dn”:“Tasmota”,“fn”:[“Tasmota”,null,null,null,null,null,null,null],“hn”:“tasmota-1-0474”,“mac”:“48551917C1DA”,“md”:“NOUS A1T”,“ty”:0,“if”:0,“ofln”:“Offline”,“onln”:“Online”,“state”:[“OFF”,“ON”,“TOGGLE”,“HOLD”],“sw”:“12.1.1”,“t”:“tasmota_1”,“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”:0,“20”:0,“30”:0,“68”:0,“73”:0,“82”:0,“114”:0,“117”:0},“lk”:0,“lt_st”:0,“sho”:[0,0,0,0],“sht”:[[0,0,0],[0,0,0],[0,0,0],[0,0,0]],“ver”:1}
If I change LWT from Offline to Online, I get this in Openhab logs:
2023-10-24 20:43:55.737 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command ‘Offline’ from channel ‘mqtt:topic:tasmota_1:power’ not supported by type ‘OnOffValue’: No enum constant org.openhab.core.library.types.OnOffType.Offline
2023-10-24 20:44:02.256 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command ‘Online’ from channel ‘mqtt:topic:tasmota_1:power’ not supported by type ‘OnOffValue’: No enum constant org.openhab.core.library.types.OnOffType.Online
when I change the command to turn off, I have this in the log:
2023-10-24 20:41:56.258 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘tasmota_1’ received command OFF
2023-10-24 20:41:56.261 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘tasmota_1’ predicted to become OFF
2023-10-24 20:41:56.265 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘tasmota_1’ changed from ON to OFF
BUT, it doesn’t change the stat/tasmota_1_POWER from Online to Offline.
If I reset tasmota (long hold on power button), then I can try reconnect it to wifi (it never connects on the first try to it, but always on the second), and write again the config of MQTT broker (after which it restarts and is not reachable via assigned IP, nor it responds to my commands from Openhab switch).
It actually once started working after this state, because I was clicking on something, and somehow something worked, but I don’t know what it is, because the next time I unplugged it, it stopped working again.
Thank you for the help!