You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the plugin allows the user to specify which SignalK paths are to be published, they are all published to topic signalk/delta. This pushes the responsibility for disambiguating vessel sources to the subscribing clients. They have to listen to everything, even vessels that they are not interested in.
Suggestion: publish to signalk/{vessel}/delta where {vessel} is the MMSI or UID of the SignalK server. Or, even better, publish to path-specific topics, such as signalk/{vessel}/delta/navigation.position. Then the client can target exactly what it needs.
One way to achieve by path and optional by source subscription would be NOT to map value paths to hierarchical MQTT topics but simply two levels: per the previous example: vessels/<id>/navigation.position/n2k-sample-data.160. This would allow subsciptions to
all values for a path for a vessel, from any source with vessels/<id>/navigation.position/+
all values for a path for any vessel, from any source with vessels/+/navigation.position/+
all values from a source on a vessel: vessels/<id>/+/n2k-sample-data.160
but not allow hierarchical subscriptions, like all navigation values for vessel x.
We could also do a hybrid: first 2 value path levels as hierarchy, like vessels/<id>/batteries/1/capacity.remaining/sourceId. This would allow subscribing to all values for a device where the id is in the path, like a battery. Not very intuitive though.
Option 1 is the important one. Option 2 could happen when you're pretty confident only one vessel will be on the broker and don't want to be bothered looking up the <id>. Option 3 seems unlikely, or at least not a priority.
Sources are good at different things. A GPS sensor like the ZG100 will give you 2 m accuracy, but it sucks as a compass. So, it would be less of a priority for me to say, "Give me everything from the ZG100."
The notation navigation.position[n2k-sample-data.160] is the one suggested in the SK docs. I think it's clunky, but it does exist.
The text was updated successfully, but these errors were encountered:
continuing the discussion from Issue #46...
While the plugin allows the user to specify which SignalK paths are to be published, they are all published to topic
signalk/delta
. This pushes the responsibility for disambiguating vessel sources to the subscribing clients. They have to listen to everything, even vessels that they are not interested in.Suggestion: publish to
signalk/{vessel}/delta
where{vessel}
is the MMSI or UID of the SignalK server. Or, even better, publish to path-specific topics, such assignalk/{vessel}/delta/navigation.position
. Then the client can target exactly what it needs.@tkurki Suggests
Option 1 is the important one. Option 2 could happen when you're pretty confident only one vessel will be on the broker and don't want to be bothered looking up the
<id>
. Option 3 seems unlikely, or at least not a priority.Sources are good at different things. A GPS sensor like the ZG100 will give you 2 m accuracy, but it sucks as a compass. So, it would be less of a priority for me to say, "Give me everything from the ZG100."
The notation
navigation.position[n2k-sample-data.160]
is the one suggested in the SK docs. I think it's clunky, but it does exist.The text was updated successfully, but these errors were encountered: