Sensor information & management

Patch sensor settings

Patch the settings for a specific sensor

patch/v1/sensors/{id}

Request

Path parameters

idstring required

The primary key of sensor

Example:66d025b301ebc903e80003ea

Request body

namestring

The name of the device.

scheduleMode'always' | 'when_armed'
armProfileIdsstring[] nullable
hasCustomSensitivityWhenArmedboolean

Example request

{
  "name": "Front Door",
  "lightSettings": {
    "margin": 10,
    "lowThreshold": 20,
    "highThreshold": 100
  },
  "humiditySettings": {
    "margin": 1,
    "lowThreshold": 30,
    "highThreshold": 80
  },
  "temperatureSettings": {
    "margin": 0.1,
    "lowThreshold": 20,
    "highThreshold": 25
  },
  "motionSettings": {
    "sensitivity": 50,
    "sensitivityWhenArmed": 50
  },
  "glassBreakSettings": {
    "sensitivity": 25,
    "sensitivityWhenArmed": 50
  }
}

Response

Success response

idstring required

The primary key of sensor

modelKey'sensor' required

The model key of the sensor

state'CONNECTED' | 'CONNECTING' | 'DISCONNECTED' required

Connection state of the device.

namestring required

The name of the device.

macstring required

The primary MAC address of the device.

mountType'door' | 'window' | 'garage' | 'leak' | 'none' required

Mounting type of the sensor.

isOpenedboolean nullable required

Whether the door/window/garage is opened.

openStatusChangedAtnumber nullable required

Unix timestamp when the door/window/garage was last opened or closed, nullable.

isMotionDetectedboolean required

Whether sensor is currently detecting the motion.

motionDetectedAtnumber nullable required

Unix timestamp when the last motion was detected.

scheduleMode'always' | 'when_armed' required

When armed-mode detection runs: always or only when_armed. Applies to both glass break and motion together.

armProfileIdsstring[] nullable required

When scheduleMode is when_armed, restricts armed-mode detection to these arm profile ids. Empty or null = all profiles.

hasCustomSensitivityWhenArmedboolean required

When true, glass break and motion both use their respective sensitivityWhenArmed value while the system is armed.

alarmTriggeredAtnumber nullable required

Unix timestamp when the smoke or carbon monoxide alarm was triggered, nullable.

leakDetectedAtnumber nullable required

Unix timestamp when the sensor detected a water leak, nullable.

externalLeakDetectedAtnumber nullable required

Unix timestamp when the sensor detected an external water leak, nullable.

tamperingDetectedAtnumber nullable required

Unix timestamp when the sensor detected tampering, nullable.

Example response

{
  "id": "66d025b301ebc903e80003ea",
  "state": "CONNECTED",
  "name": "Front Door",
  "mac": "24A43C3DFEB9",
  "mountType": "door",
  "batteryStatus": {
    "percentage": 95
  },
  "stats": {
    "light": {
      "value": 22.5,
      "status": "high"
    },
    "humidity": {
      "value": 22.5,
      "status": "high"
    },
    "temperature": {
      "value": 22.5,
      "status": "high"
    }
  },
  "lightSettings": {
    "margin": 10,
    "lowThreshold": 20,
    "highThreshold": 100
  },
  "humiditySettings": {
    "margin": 1,
    "lowThreshold": 30,
    "highThreshold": 80
  },
  "temperatureSettings": {
    "margin": 0.1,
    "lowThreshold": 20,
    "highThreshold": 25
  },
  "openStatusChangedAt": 1445408038748,
  "motionDetectedAt": 1445408038748,
  "motionSettings": {
    "sensitivity": 50,
    "sensitivityWhenArmed": 50
  },
  "glassBreakSettings": {
    "sensitivity": 25,
    "sensitivityWhenArmed": 50
  },
  "alarmTriggeredAt": 1445408038748,
  "leakDetectedAt": 1445408038748,
  "externalLeakDetectedAt": 1445408038748,
  "tamperingDetectedAt": 1445408038748,
  "wirelessConnectionState": {
    "signalState": {
      "signalQuality": 85,
      "signalStrength": -45
    },
    "batteryStatus": {
      "percentage": 95
    },
    "bridge": "66d025b301ebc903e80003ea"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.