Device Configuration Commands
Overview
Thingsee PRESENCE is configured remotely through the Service API (GraphQL) — named commands with built-in validation and automatic encoding.
This page documents the available commands and provides ready-to-use examples. For detailed parameter explanations, tuning guidance, and configuration scenarios, see Configuration.
If you operate your own gateways and send raw mesh commands, see the CBOR Downlink Reference for the binary command specification.
Service API Commands
The Service API provides named configuration commands that handle CBOR encoding, delivery, and validation automatically. Use these through the Service API (GraphQL).
Available Commands
| Command | Purpose | Parameters |
|---|---|---|
SetDeviceConfiguration | Configure PIR behavior | mode, threshold, enableLed, passiveReportInterval |
GetDeviceConfiguration | Read current PIR configuration | — |
SetReportInterval | Set active reporting frequency | reportInterval |
GetReportInterval | Read current report interval | — |
SetDeviceConfiguration
Configures PIR sensor behavior: operating mode, sensitivity, LED indicator, and idle reporting interval.
Parameters:
| Parameter | Type | Range | Default | Description |
|---|---|---|---|---|
mode | Integer | 1–2 | 2 | Operating mode: 1 = Occupancy, 2 = Visitor counter |
threshold | Integer | 80–1060 | 150 | PIR detection sensitivity (lower = more sensitive) |
enableLed | Integer | 0–1 | 0 | LED indicator on detection (0 = off, 1 = on) |
passiveReportInterval | Integer | 300–86400 | 3600 | Idle reporting interval in seconds |
Set occupancy mode with default sensitivity:
mutation {
setDeviceConfiguration(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
mode: 1
threshold: 150
enableLed: 0
passiveReportInterval: 3600
}
) {
success
}
}
Set visitor counter with high sensitivity:
mutation {
setDeviceConfiguration(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
mode: 2
threshold: 100
enableLed: 0
passiveReportInterval: 7200
}
) {
success
}
}
GetDeviceConfiguration
Reads the current PIR configuration from the device.
query {
getDeviceConfiguration(
vendorSerial: "TSPR04-xxxxxxxx"
) {
mode
threshold
enableLed
passiveReportInterval
}
}
SetReportInterval
Sets how often the sensor reports measurements during active periods.
Parameters:
| Parameter | Type | Range | Default | Description |
|---|---|---|---|---|
reportInterval | Integer | 10–86400 | 60 | Active reporting interval in seconds |
mutation {
setReportInterval(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
reportInterval: 60
}
) {
success
}
}
GetReportInterval
Reads the current report interval.
query {
getReportInterval(
vendorSerial: "TSPR04-xxxxxxxx"
) {
reportInterval
}
}
Quick Configuration Recipes
Desk Occupancy Monitoring
Binary occupied/vacant status with hourly heartbeats:
mutation {
setDeviceConfiguration(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
mode: 1
threshold: 800
enableLed: 0
passiveReportInterval: 3600
}
) {
success
}
}
Doorway Visitor Counting
Count movements every 60 seconds:
mutation {
setDeviceConfiguration(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
mode: 2
threshold: 150
enableLed: 0
passiveReportInterval: 3600
}
) {
success
}
}
mutation {
setReportInterval(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
reportInterval: 60
}
) {
success
}
}
Installation Testing
Enable LED and fast reporting to verify sensor placement:
mutation {
setDeviceConfiguration(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
mode: 2
threshold: 150
enableLed: 1
passiveReportInterval: 3600
}
) {
success
}
}
mutation {
setReportInterval(
input: {
vendorSerial: "TSPR04-xxxxxxxx"
reportInterval: 10
}
) {
success
}
}
After testing, disable LED (enableLed: 0) and increase reportInterval to production values to conserve battery.
For more configuration scenarios and detailed parameter tuning, see Configuration.