ChirpStack
v0.1.1Manage and live-debug LoRaWAN devices on a ChirpStack v4 network server over its gRPC API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
device_list
List devices in an application (optionally filtered by a search string).
| Parameter | Type | Description |
|---|---|---|
application_id * | string | |
limit | integer | |
offset | integer | |
search | string |
device_get
Get a device with its current activation (session) and, if include_keys, its OTAA root keys. include_keys also reveals the session keys in `activation`.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
include_keys | boolean |
device_create
Create a device. Set OTAA keys afterwards with device_set_keys, or ABP session with device_activate.
| Parameter | Type | Description |
|---|---|---|
application_id * | string | |
dev_eui * | string | |
device_profile_id * | string | |
name * | string | |
description | string | |
is_disabled | boolean | |
join_eui | string | |
skip_fcnt_check | boolean | |
tags | ||
variables |
device_update
Update only the given fields of a device; omitted fields keep their current values. Supplying `tags` replaces the whole tag map. Supplying `variables` replaces the whole variable map.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
application_id | ||
description | ||
device_profile_id | ||
is_disabled | ||
join_eui | ||
name | ||
skip_fcnt_check | ||
tags | ||
variables |
device_delete
Delete a device and everything ChirpStack stores about it.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string |
device_set_keys
Create or replace the OTAA root keys. LoRaWAN 1.0.x devices use nwk_key only (their AppKey goes in nwk_key).
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
nwk_key * | string | |
app_key | string |
device_activate
ABP-activate a device (or reset an OTAA session). For LoRaWAN 1.0.x pass nwk_s_enc_key only; the other two network keys default to it.
| Parameter | Type | Description |
|---|---|---|
app_s_key * | string | |
dev_addr * | string | |
dev_eui * | string | |
nwk_s_enc_key * | string | |
a_f_cnt_down | integer | |
f_cnt_up | integer | |
f_nwk_s_int_key | string | |
n_f_cnt_down | integer | |
s_nwk_s_int_key | string |
device_deactivate
Drop the device session; an OTAA device must re-join before it can communicate.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string |
device_flush_dev_nonces
Forget used DevNonces so a device whose join-requests are rejected as replays can join again.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string |
device_enqueue
Queue a downlink. Give the payload as data_hex, data_base64, or object (encoded by the profile codec). Class A devices receive it after their next uplink.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
f_port * | integer | |
confirmed | boolean | |
data_base64 | ||
data_hex | ||
expires_in_s | ||
object |
device_queue_get
Show downlinks waiting for (or pending confirmation from) a device.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string |
device_queue_flush
Discard every queued downlink for a device.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string |
device_metrics
Link quality (RSSI, SNR, packets per frequency/DR, errors) plus codec-defined device metrics. Defaults to the last 24 hours.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
aggregation | string | |
end | ||
start |
server_info
Check the connection and the API key. Version and regions are only available to user sessions in ChirpStack, so they may be null/empty with an API key.
capture_start
Start a background capture of a device's events/frames or a gateway's frames. Returns a session_id; read incrementally with capture_read. Sessions idle for 30 minutes are dropped.
| Parameter | Type | Description |
|---|---|---|
target * | string | |
kind | string |
capture_read
Read captured items with seq > since_seq. Remember last_seq and pass it back next time. Check stream_state for reconnects. Each item carries `live`: false means ChirpStack replayed it from before the session started, true means it happened while the session was open.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
limit | integer | |
since_seq | integer |
capture_stop
Stop a capture session and discard its buffer.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
capture_list
List capture sessions, including ones stopped by a terminal error (`stream_state` starts with `stopped:`).
wait_for_event
Block until the device emits a live event (optionally of the given types: up, join, ack, txack, log, status, location) or the timeout (max 60 s) passes. Only events newer than the moment of the call count (`live`); the events ChirpStack replays from its history never satisfy the wait, whatever their arrival timing. Use device_recent_events for those.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
event_types | ||
timeout_s | number |
device_recent_events
One-shot look at the last few events (or frames) ChirpStack still holds for a device - typically the last 10.
| Parameter | Type | Description |
|---|---|---|
dev_eui * | string | |
kind | string |
application_list
List applications of a tenant.
| Parameter | Type | Description |
|---|---|---|
tenant_id * | string | |
limit | integer | |
offset | integer | |
search | string |
application_get
Get an application.
| Parameter | Type | Description |
|---|---|---|
application_id * | string |
application_create
Create an application in a tenant.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
tenant_id * | string | |
description | string | |
tags |
application_update
Update only the given fields of an application. Supplying `tags` replaces the whole tag map.
| Parameter | Type | Description |
|---|---|---|
application_id * | string | |
description | ||
name | ||
tags |
application_delete
Delete an application and all of its devices.
| Parameter | Type | Description |
|---|---|---|
application_id * | string |
application_list_device_tags
List the distinct device tag keys and values used inside an application.
| Parameter | Type | Description |
|---|---|---|
application_id * | string |
profile_list
List device profiles of a tenant.
| Parameter | Type | Description |
|---|---|---|
tenant_id * | string | |
limit | integer | |
offset | integer | |
search | string |
profile_get
Get a device profile including its payload codec script.
| Parameter | Type | Description |
|---|---|---|
profile_id * | string |
profile_create
Create a device profile from a dict of DeviceProfile fields (snake_case; enums by name, e.g. region "EU868", mac_version "LORAWAN_1_0_3", reg_params_revision "A"). Required: tenant_id, name, region, mac_version, reg_params_revision.
| Parameter | Type | Description |
|---|---|---|
profile * | object |
profile_update
Merge the given DeviceProfile fields into an existing profile; other fields are kept. Map and repeated fields you supply (e.g. tags, measurements) replace the whole field; omitted fields are kept.
| Parameter | Type | Description |
|---|---|---|
changes * | object | |
profile_id * | string |
profile_delete
Delete a device profile (fails while devices still use it).
| Parameter | Type | Description |
|---|---|---|
profile_id * | string |
profile_set_codec
Replace only the payload codec of a profile. For runtime JS, script is required and must define decodeUplink(input) and may define encodeDownlink(input); use runtime NONE to turn the codec off. Iterate here while watching uplinks with capture_read.
| Parameter | Type | Description |
|---|---|---|
profile_id * | string | |
runtime * | string | |
script | string |
profile_list_vendors
List vendors from the imported device-profile catalogue.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer |
profile_list_adr_algorithms
List the ADR algorithms available on this server.
gateway_list
List gateways (all tenants when tenant_id is empty and the key is a global admin key).
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer | |
search | string | |
tenant_id | string |
gateway_get
Get a gateway with its last-seen time and location.
| Parameter | Type | Description |
|---|---|---|
gateway_id * | string |
gateway_create
Register a gateway; location is set only when coordinates are given.
| Parameter | Type | Description |
|---|---|---|
gateway_id * | string | |
name * | string | |
tenant_id * | string | |
altitude | ||
description | string | |
latitude | ||
longitude | ||
stats_interval | integer | |
tags |
gateway_update
Update only the given fields of a gateway. Supplying `tags` replaces the whole tag map.
| Parameter | Type | Description |
|---|---|---|
gateway_id * | string | |
altitude | ||
description | ||
latitude | ||
longitude | ||
name | ||
stats_interval | ||
tags |
gateway_delete
Delete a gateway.
| Parameter | Type | Description |
|---|---|---|
gateway_id * | string |
gateway_metrics
RX/TX packet counts per frequency, DR and status, plus duty-cycle usage. Defaults to the last 24 hours.
| Parameter | Type | Description |
|---|---|---|
gateway_id * | string | |
aggregation | string | |
end | ||
start |