Subscribe

Returns device messages as they are sent and received

Send the uuid of the device you'd like to subscribe to

var ws = new WebSocket("wss://meshblu.octoblu.com/ws/v2");

ws.send(JSON.stringify([
  "subscribe",
  {
    "uuid":"26de691f-8068-4cdc-907a-4cb5961a1aba"
  }
]));

🚧

Broadcast Messages

If you are not the owner of a device you will only receive broadcast messages, that is messages that are sent to devices:"*"

πŸ“˜

All Device Messages

Device owners will receive all messages sent and received by the subscribed device

Subscribe by type

You can limit the types of messages you subscribe to by using the types parameter.

Valid types include:

  • broadcast - broadcast messages sent by the device
  • received - messages received by the device
  • sent - messages sent by the device

Default is all types.

var ws = new WebSocket("wss://meshblu.octoblu.com/ws/v2");

ws.send(JSON.stringify([
  "subscribe",
  {
    "uuid":"26de691f-8068-4cdc-907a-4cb5961a1aba",
    "types": ["sent", "received"]
  }
]));