MatterDeviceReport a sensor reading and detect alarm transitions

Report a sensor reading and detect alarm transitions

Edge-detects an alarm transition for a single sensor channel and emits AlarmTriggered / AlarmCleared (or NO_EVENT when unchanged).

curl -X POST "https://api.spkey.co/matter-devices/example_string/ReportSensorState" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "channel": "boolean_state",
  "matterPath": "example_string",
  "value": 3.14,
  "deviceTypeId": 123,
  "timestamp": "example_string"
}'
{
  "success": true,
  "aggregateId": "example_string",
  "version": 3.14,
  "event": {
    "type": "AlarmTriggered",
    "data": {
      "deviceId": "example_string",
      "channel": "boolean_state",
      "alarmType": "contact",
      "severity": "warning",
      "matterPath": "example_string",
      "deviceTypeId": 123,
      "rawValue": 3.14,
      "timestamp": "example_string"
    }
  }
}
POST
/matter-devices/{id}/ReportSensorState
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
idstring
Required

Matter Device ID

Content-Typestring
Required

The media type of the request body

Options: application/json
channelstring
Required

Which sensor channel this reading is for

Options: boolean_state, smoke, smoke_interconnect
matterPathstring
Required

Matter cluster/attribute path, e.g. "1/69/0"

Min length: 1
valuenumber
Required

Reported value (0/1 for boolean state, 0/1/2 for smoke)

deviceTypeIdinteger

Matter device type id (1/29/0) — required to interpret boolean_state

timestampstring

ISO timestamp of the reading

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

idstring
Required

Matter Device ID

Body

application/json
channelstring
Required

Which sensor channel this reading is for

Allowed values:boolean_statesmokesmoke_interconnect
matterPathstring
Required

Matter cluster/attribute path, e.g. "1/69/0"

valuenumber
Required

Reported value (0/1 for boolean state, 0/1/2 for smoke)

deviceTypeIdinteger

Matter device type id (1/29/0) — required to interpret boolean_state

timestampstring

ISO timestamp of the reading

Responses

successboolean
Required
aggregateIdstring
Required
versionnumber
Required
eventstring
Required

Emitted transition event, or null when the reading caused no transition