Closed ph1l closed 7 years ago
Exception: More than one vessel present, and no self
published...
The current server publishes all data in the vessels.*
subtree, so it will avoid self
if its in the root. Not sure how it would do that in a delta. @tkurki ? It can easily be added to the full format but thats not often used....the value is available in the hello message, which was the first message sent on connection
{"self":"urn:mrn:signalk:uuid:6fb32f5b-7bd3-47a6-9e41-032a15faca55",
"version":"v1.0.0",
"timestamp":"2016-11-11T22:45:38.459Z"
}
I think the main use case for this is being able to retrieve self id explicitly via http for whatever purposes one might need it.
Fixed this in Node server https://github.com/SignalK/signalk-server-node/issues/111
Not sure how it would do that in a delta.
Didn't get this - as I see it this is about full & http api, not delta.
I think my problem here is that the java-server doesn't publish the self property in the rest api.
I start up and load the initial data from the REST API and then fire off a thread to do websocket delta processing. If my background websocket thread hasn't processed the hello message, which actually does require a self
property, I am not guaranteed to have a self property, unless I block on seeing a hello message.
should my client block on a hello message? maybe.. to know the websocket is connected, ne?
Well, I think that the spec says (a bit amibiguously maybe) that the rest api should provide self: http://signalk.org/specification/master/keys/#self
Here the appropriate action would be to add this functionality to the java server.
I think that with every move we should move towards more spec compliance and less towards workarounds for specific server implementation details.
And I am not saying that Node server is 100% compliant, just that this should be the general direction.
We have already added a Hello in iKommunicate Deltas when a socket is opened and will be adding the RestAPI self call as well but it is not implemented yet.
We agree that work arounds should be avoided and will do our best to get iKommunicate spec compliant ASAP
Well, to be fair, the spec does not mark self
as required. So, technically, this does not break compliance with the spec.
I will add it to the REST API
Added in JIT-DEPLOY-34
as specified here: https://github.com/SignalK/specification/blob/master/schemas/signalk.json#L12, a signalk server shoud publish the self propery containing the uuid of the vessel on which the server is running.