Sending custom commands via the Supervisor

The Supervisor has a consistent connection that can either have commands pushed to it, or poll for commands if there’s no VPN available.

It would be super useful if we were able to make use of that connection for application specific comms with the device, rather than having to have a second parallel set of infrastructure to handle that side of things. As an example we’ve currently got the balenaLink OpenVPN connection running, and then alongside that a second OpenVPN connection to our own servers, doubling the bandwidth required just for the network link. Then on top of that we’ve got MQTT running over that, alongside a websocket connection being held by the Supervisor.

In an ideal world we could send data back via the Supervisor with webhooks or similar being called when data is received, and likewise be able to send data to the Supervisor via an HTTP API that can be hooked into on the device side.

That sort of integration I think would be a big win for getting applications off the ground without needing a bunch of extra integration work.