Replies: 2 comments
-
You can use the signalk-path-mapper plugin. |
Beta Was this translation helpful? Give feedback.
-
As Scott said your immediate problem can be solved with the path mapper plugin. If that feels hacky we could always push the mapping from ids to human oriented labels to the integration layer (N2K, other switching systems). While it is useful that paths are human readable and understandable one can make also the argument that debugging an integration would benefit more from the path using ids than one more layer of indirection. For human oriented stuff like switch labeling we should look into using metadata, which would allow multiple attributes when path is just a single label value. Stuff like I have to say I am not really keen on a mechanism that would send all updates for a path multiple times. So I for one am not yet convinced that this would be worth the added complexity. |
Beta Was this translation helpful? Give feedback.
-
The problem:
electrical.bank.1.switches.10 is not easy to work with as a name.
*nix solved this by using symlinks. Multiple names pointing to the same inode.
ln -s electrical.bank.1.switches.10 electrical.lights.toilet
Trying to make an additional entry will probably become problematic as there's no single source of truth.
Keeping the original with a lookup table for aliases is a way to counter this.
Possible way to implement:
On value read/write the lookupTable can be used to read/write the actual value.
On delta updates, the lookup table can be checked for a matching value to get the key to send as well.
Beta Was this translation helpful? Give feedback.
All reactions