At the moment the MQTT device discovery payload:
Is a map corresponding to a single device, would it be possible to support a payload where the top level can be a list of devices.
The device structure wouldn’t be changed, it would just be that the top level would be a list containing multiple of the existing structure. The problem I have is that the MQTT broker (Mosquito in my case) only supports publishing of a single death message when the connection drops.
I am using the same connection to register multiple devices, hence I can only unregister one device per connection. I can work around this by creating multiple connections to the broker and registering each device on a separate connection, however this is unnecessary overhead. I understand I can publish multiple entities per device - and I am using this, but I have a MQTT bridge which is proxying for multiple devices hence, I need separate devices.
If it was possible to register multiple devices with a single payload, I would be able publish a single death message to remove them all.