Skip to content

Sending Commands to Devices

These routes allow users to manage device commands for devices identified by their EUI. Users can retrieve previously issued commands, including their status, timestamps, network details, and payload information, or send new commands to a specific device. The available commands depend on the device type and are defined in the device command reference.

GET /user/device/command/{eui}

This route retrieves all commands sent to a specific device identified by its EUI. Each entry includes details about the command, such as the issuing user, timestamp, status, network, confirmation flag, port, and payload in multiple formats (Base64, hex, and ASCII).

  • Example response:
{
  "errors": [],
  "debug": [],
  "meta": [],
  "data": [
    {
      "uid": 418,
      "time_stamp": "2022-03-15 07:01:24",
      "status": "Scheduled",
      "network": "Swisscom",
      "devEUI": "5A9F1B7D2C8E4F31",
      "confirmed": 1,
      "port": 220,
      "payload_base64": "QVQrR1BTQ1lDPTg2NDAwMDAwAA==",
      "payload_hex": "41542b4750534359433d383634303030303000",
      "payload_ASCII": "AT+GPSCYC=86400000"
    },
    {
      "uid": 419,
      "time_stamp": "2022-03-15 07:01:37",
      "status": "Scheduled",
      "network": "Swisscom",
      "devEUI": "5A9F1B7D2C8E4F31",
      "confirmed": 0,
      "port": 220,
      "payload_base64": "QVRaAA==",
      "payload_hex": "41545a00",
      "payload_ASCII": "ATZ"
    },
    {
      "uid": 607,
      "time_stamp": "2022-04-14 09:15:36",
      "status": "Created",
      "network": "Swisscom",
      "devEUI": "5A9F1B7D2C8E4F31",
      "confirmed": 1,
      "port": 220,
      "payload_base64": "QVQrR1BTVFJJRz0zAA==",
      "payload_hex": "41542b475053545249473d3300",
      "payload_ASCII": "AT+GPSTRIG=3"
    },
    {
      "uid": 608,
      "time_stamp": "2022-04-14 09:16:07",
      "status": "Created",
      "network": "Swisscom",
      "devEUI": "5A9F1B7D2C8E4F31",
      "confirmed": 1,
      "port": 220,
      "payload_base64": "QVQrR1BTSE9MRD0zNjAwMDAwAA==",
      "payload_hex": "41542b475053484f4c443d3336303030303000",
      "payload_ASCII": "AT+GPSHOLD=3600000"
    },
    {
      "uid": 609,
      "time_stamp": "2022-04-14 09:16:15",
      "status": "Created",
      "network": "Swisscom",
      "devEUI": "5A9F1B7D2C8E4F31",
      "confirmed": 0,
      "port": 220,
      "payload_base64": "QVRaAA==",
      "payload_hex": "41545a00",
      "payload_ASCII": "ATZ"
    }
  ],
  "success": true
}

POST /user/device/command/{eui}

This API route allows you to send a command to a specific device identified by its EUI. For a list of supported commands, see the Command Reference