Api\DeviceController

api/devices PUT/PATCH Update an existing Device

put/api/devices/{id}

Headers

Authorizationstring
Content-Typestring
Acceptstring
Accept-languagestring

Request body

idinteger

Device id to update. (Required without key and hardware_id)

keystring

DEV EUI of the sensor to enable storing sensor data incoming on the api/sensors or api/lora_sensors endpoint. (Required without id and hardware_id)

hardware_idstring

Hardware id of the device as device name in TTN. (Required without id and key)

namestring

Name of the sensor

hive_idinteger

Hive that the sensor is measuring. Default: null

typestring

Category name of the hive type from the Categories table. Default: beep

deleteboolean

If true delete the sensor and all it's data in the Influx database

last_message_receivedstring

Will be converted with date('Y-m-d H:i:s', $last_message_received); before storing

firmware_versionstring

Firmware version of the Device

hardware_versionstring

Hardware version of the Device

boot_countinteger

Amount of boots of the Device

measurement_interval_minnumber

Measurement interval in minutes

measurement_transmission_rationumber

Measurements ratio of non-transmitted vs transmitted messages. If 0 or 1, every measurement gets transmitted.

ble_pinstring

Bleutooth PIN of Device: 6 numbers between 0-9

battery_voltagenumber

Last measured battery voltage

next_downlink_messagestring

Hex string to send via downlink at next connection (LoRaWAN port 6)

last_downlink_resultstring

Result received from BEEP base after downlink message (LoRaWAN port 5)

Example request

{
  "id": 1,
  "key": "consequatur",
  "hardware_id": "quia",
  "name": "enim",
  "hive_id": 19,
  "type": "dolorem",
  "delete": true,
  "last_message_received": "veniam",
  "firmware_version": "quasi",
  "hardware_version": "ipsum",
  "boot_count": 12,
  "measurement_interval_min": 0.12,
  "ble_pin": "maiores",
  "battery_voltage": 1134.467,
  "next_downlink_message": "perspiciatis",
  "last_downlink_result": "voluptatem"
}

Changes