2020-02-02, 10:20 AM
(2020-02-01, 06:04 PM)seandepagnier Wrote: Hi,
I've dug into the signalk stuff a bit more and closer to finding a solution for pypilopt.
Basically I can have a driver for the server which processes messages in the same format as signalk node server without any real downsides,
My biggest question is.. If pypilot connects to signalk-node, and/or provides signalk as a piped provider, how will it get subscriptions from other clients about the data it provides?
There are a lot of keys pypilot can provide that might be expensive to compute as well as transmit, so it would need the subscriptions of clients.
An interesting use case, something that hasn't come up before exactly in this form.
So would pypilot act as a Signal K client or a server? Upon connection it could advertise a list of keys it has data for. Then we could add a feature to the SK server where you can activate subscription forwarding, whereby SK server's clients' relevant subscriptions would be passed on to pypilot. With most SK clients that would be the default "all for self" subscription.
A reasonably complicated feature, as SK server would need to keep track of overlapping subscriptions, or just default to subscribing/unsubscribing to all whenever there is some client connected.
What do you think?