BasicStation Remote Command and BasicStation Remote Shell features

How can I try BasicStation Remote Command and BasicStation Remote Shell new features?

In the latest release, you can use this by sending payloads to the ..../command/raw MQTT topic. The payload must be in the format as documented by the BasicStation documentation:

  "msgtype"  : "runcmd"
  "command"  : STRING,
  "arguments": [ STRING, ... ]

The response is returned on the .../event/raw MQTT topic. Note that the payload you are sending is forwarded AS-IS over the WebSocket connection. In some cases you need to use JSON, in some cases it is a binary payload. See for example for the remote shell:

After the session is established, the input data towards the shell and the output data generated by the shell and its commands are tunneled through the websocket as binary records. The first byte of the binary record is the session index since Station can maintain multiple sessions. The remaining bytes of a binary record are the input/output data. The encoding is transparent to the websocket transport.

This is all documented in the BasicStation documentation :slight_smile:

1 Like