dali2mqtt icon indicating copy to clipboard operation
dali2mqtt copied to clipboard

Lamp delation

Open AdamN1 opened this issue 3 years ago • 4 comments

fallows conversation from https://github.com/dgomes/dali2mqtt/issues/39#issuecomment-834496089

Abandoned devices: we should no longer publish them to the discovery topic. In HA there is yet to exist an API to remove devices... currently you need to use the UI

Will you to accept PR with code for deleting missing lamps(remove from device.yaml)? By deleting I'm mean cleaning mqtt on the broker by the dali2mqtt. I know it's hack but it will help mqtt entity in the HA to stay clean.

AdamN1 avatar May 07 '21 17:05 AdamN1

@dgomes ??

AdamN1 avatar Apr 17 '22 10:04 AdamN1

and how will you distinguish those ?

I think we should move away from retained topics and publish the topics upon home assistant restart

dgomes avatar Apr 17 '22 20:04 dgomes

and how will you distinguish those ?

We can get list from mqtt server and compare records in topic.

I think we should move away from retained topics and publish the topics upon home assistant restart

I don't think that I understand what you mean

AdamN1 avatar Apr 18 '22 07:04 AdamN1

discovery topics need to be there only during HA start, you don't need to "store" them in the MQTT broker using the retain flag.

Each time HA starts it already publishes a message, dali2mqtt should subscribe to that message and publish all the lamps without retain flag, in this way there is no need to clear topics as they are never retained.

dgomes avatar Apr 18 '22 08:04 dgomes