node-red-contrib-homekit-bridged
node-red-contrib-homekit-bridged copied to clipboard
[Feature Request]: Bridge UUID based on persistent data
According to Hap docs some fields should be persistent through the life of an Accessory (or Bridge).
It is why it was also planned to use those fields' id creation:
Looks like this is not implemented for Bridge. Implementation must be backward compatible.
https://github.com/NRCHKB/node-red-contrib-homekit-bridged/blob/8fb726767bb9e94ce4b70f46ff0e30750eb3bafc/src/lib/HAPHostNode.ts#L79-L91
I finally understand what you mean. As I do not see any possibility to check wether a node has just been added or if it was in the flow already, how about introducing a flag in the config like useHapConformIdentifier
that defaults to true
and is invisible in the user interface? That way, the property should be true
for any new nodes that were added after an update of nrchkb and null
for the legacy ones. As an alternative the version number at the time of a nodes creation could be added, but I wonder if that makes the code less readable and if there is really a second use case for a property like that.
It is second case in the last time :) And more cases are coming as big features will land soon. Breaking compatibility is not an option until it is related to general stability.
So I believe adding version field (which we already have available in UI side :) ) is a good idea. This field could be either hidden or read only for user knowledge.