Closed krital closed 5 years ago
Thanks for the PR, but I won’t merge it as it is.
Signal K object valued properties like coordinates and current (ocean, not electrical) are just that: the value is an object. They are like that in deltas and in the full model. As you say: to be consistent they should be similar across transports.
Especially location is like that: if a client wants for example to update the vessel position on the map it should be able to subscribe to location updates, not individual coordinate components. Or if the client wants to store all location updates in a database it should not need to collate the incoming messages from two queues.
But mostly this is about being consistent over transports unless there are extremely compelling reasons to do otherwise, which is not the case here I think.
Please try to make independent PRs for independent changes - the other changes I agree with. Could you please do new PRs for them?
I have no instructions in this repo, but please read https://github.com/SignalK/specification/blob/master/CONTRIBUTING.md#pull-request-and-commit-messages for general guidelines. For example the title of this PR does not really tell what it is about - if we want to generate a changelog from pr titles they need to spell out what the change is.
https://chris.beams.io/posts/git-commit/ is also good stuff.
Hi Teppo, I guess after our meeting there is no need to proceed with this but we can apply changes to the new version?
yes, let's continue in #7
Hi Teppo,
The following changes are proposed:
I understand you have some reservations on this because lat / lon for example only make sense together. However for consistency we should have the same type of values on all topics and be compact over the wire. The topic name provides the context of the value in the payload and an MQTT subscriber can subscribe to as many or as few topics as required, potentially using wildcard topic strings.
This had me going for a while.. When you publish a message with a payload of String or Number but have no active subscribers everything is fine. If you have any subscriptions though they get disconnected each time an MQTT message with a Number as a payload is streamed to them with the following stack:
Not sure if this is by design or a Mosca bug but as we are several versions behind current perhaps we should try and update first before sending them a PR.
When receiving a delta with AIS data and try to convert the path to an MQTT topic, the : character is not allowed and causes errors / disconnections. We are now also converting that to the MQTT topic name delimiter /