v1

latestOpenAPI 3.0.32026-07-171140286.6 KB
Api\DeviceController

api/devices POST Create or Update a Device

post/api/devices

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

Device name

hive_idinteger

Hive that the sensor is measuring. Default: null

typestring

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

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)

create_ttn_deviceboolean

If true, create a new LoRaWAN device in the BEEP TTN console. If succesfull, create the device.

app_keystring

BEEP base LoRaWAN application key that you would like to store in TTN

Example request

{
  "id": 13,
  "key": "voluptates",
  "hardware_id": "quia",
  "name": "occaecati",
  "hive_id": 6,
  "type": "dolorum",
  "last_message_received": "quod",
  "firmware_version": "aliquam",
  "hardware_version": "eos",
  "boot_count": 3,
  "measurement_interval_min": 5696055.393,
  "ble_pin": "rerum",
  "battery_voltage": 1502985.31,
  "next_downlink_message": "illo",
  "last_downlink_result": "dignissimos",
  "create_ttn_device": true,
  "app_key": "fuga"
}