Tasmota: 6.3.0.17 changes to Home Assistant discovery topic... old topic not being cleared.

Created on 17 Dec 2018  路  5Comments  路  Source: arendst/Tasmota

IMPORTANT NOTICE
If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.

FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED

Describe the bug
_A clear and concise description of what the bug is._

6.3.0.17 now appears to use the last 6 characters of the mac address in the MQTT topic when publishing the availability of the device. Previously the main topic for the device was used in creating the MQTT message..

With this change the old retained MQTT message is not removed from the broker. This causes a duplicate devices to be created in home assistant. This new device has a new entity ID which causes issues with any automation etc.

6.3.0.15 message
qos : 0, retain : true, cmd : publish, dup : false, topic : homeassistant/light/PowderRoomLight_1/config, messageId : , length : 315,

6.3.0.17 message
qos : 0, retain : true, cmd : publish, dup : false, topic : homeassistant/light/183562_LI_1/config, messageId : , length : 315,

I can manually clear the old message by publishing an empty retained message on the original hass topic. For 1 or 2 devices this is ok... but I had to create a node-red flow to clear down all of the duplicate devices.

_Also, make sure these boxes are checked [x] before submitting your issue - Thank you!_

  • [X ] _Searched the problem in issues and in the wiki_
  • [X ] _Hardware used_ : KS602
  • [x ] _Development/Compiler/Upload tools used_ :atom:
  • [ ] _If a pre-compiled release or development binary was used, which one?_ :
  • [X ] _You have tried latest release or development binaries?_ :
  • [X ] _Provide the output of command_status 0 :
STATUS 0 OUTPUT HERE - DO NOT DELETE THE MARKERS ABOVE AND BELOW THIS LINE

00:07:54 CMD: status 0
00:07:54 MQT: PowderRoomLight/stat/STATUS = {"Status":{"Module":1,"FriendlyName":["Powder Room Light"],"Topic":"PowderRoomLight","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":8,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":1}}
00:07:54 MQT: PowderRoomLight/stat/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"PowderRoom","OtaUrl":"http://10.0.168.24:88/tasmoadmin/firmwares/firmware.bin","RestartReason":"Software/System restart","Uptime":"0T19:31:55","StartupUTC":"2018-12-16T09:35:59","Sleep":1,"BootCount":22,"SaveCount":228,"SaveAddress":"F5000"}}
00:07:54 MQT: PowderRoomLight/stat/STATUS2 = {"StatusFWR":{"Version":"6.3.0.17(sonoff)","BuildDateTime":"2018-12-15T22:08:45","Boot":4,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
00:07:54 MQT: PowderRoomLight/stat/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["XXXX-A","XXXX-B"],"TelePeriod":120,"SetOption":["400A8029","558180C0","00000220"]}}
00:07:54 MQT: PowderRoomLight/stat/STATUS4 = {"StatusMEM":{"ProgramSize":480,"Free":520,"Heap":18,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"1440C8","FlashMode":3,"Features":["00000809","0FC0A794","24018001","2102179C","000013D1"]}}
00:07:54 MQT: PowderRoomLight/stat/STATUS5 = {"StatusNET":{"Hostname":"PowderRoomLight-5474","IPAddress":"10.0.168.68","Gateway":"10.0.168.1","Subnetmask":"255.255.255.0","DNSServer":"10.0.168.1","Mac":"B4:E6:2D:18:35:62","Webserver":2,"WifiConfig":5}}
00:07:54 MQT: PowderRoomLight/stat/STATUS6 = {"StatusMQT":{"MqttHost":"10.0.168.24","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_183562","MqttUser":"DVES_USER","MqttType":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
00:07:54 MQT: PowderRoomLight/stat/STATUS7 = {"StatusTIM":{"UTC":"Mon Dec 17 05:07:54 2018","Local":"Mon Dec 17 00:07:54 2018","StartDST":"Sun Mar 11 02:00:00 2018","EndDST":"Sun Nov 04 03:00:00 2018","Timezone":99,"Sunrise":"07:46","Sunset":"16:42"}}

To Reproduce
_Steps to reproduce the behavior:_

Expected behavior
_A clear and concise description of what you expected to happen._

remove the old MQTT message from when changing the discovery topic structure.

Screenshots
_If applicable, add screenshots to help explain your problem._

Additional context
_Add any other context about the problem here._

(Please, remember to close the issue when the problem has been addressed)

troubleshooting

All 5 comments

Using Retain for Tasmota is not recommended. See wiki how to setup HA for use with Tasmota
https://github.com/arendst/Sonoff-Tasmota/wiki/Home-Assistant

Thank you for the reply.

But you did not understand the issue.

The retained message is created by Tasmota and is not user configurable.

HA support changed in latest release. It is explainend in wiki

Closing this issue as it has been answered.

Support Information

See Wiki for more information.
See Chat for more user experience.

@andrethomas2 Please reopen issue.

The issue (Tasmota not removing retained messages it created after it has created new messages) has not been resolved or responded to.

Was this page helpful?
0 / 5 - 0 ratings