sensor

Connect new sensor

post/sensors/

Request

  • Base URL
    https://api.angelcam.com/v1
  • Auth
    • OAuth 2
      Authorization codehttps://my.angelcam.com/oauth/authorize/, token URL https://my.angelcam.com/oauth/token/
      PasswordToken URL https://api.angelcam.com/oauth/token/
      Scopessensor_manage
    • or API key in header Authorization
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Request body

namestring required

Sensor name

type'motion' | 'camera_motion' | 'door_window' | 'smoke' | 'fire' | 'glass_break' | 'shock_vibration' | 'water' | 'perimeter_entry' required

Sensor type

placement'indoors' | 'outdoors'

Sensor placement

manufacturerstring

Sensor manufacturer

modelstring

Sensor model

notestring

Any note related to sensor

enabledboolean

Defaults to True. Indicates if sensor is enabled or not. If disabled then all events from the sensor are ignored.

override_armingboolean

Defaults to False. If enabled, an event received from the sensor will always trigger an incident regardless of the arming settings.

camerainteger

Camera ID sensor is bind to

enable_cloud_recording_for'PT30S' | 'PT1M' | 'PT2M' | 'PT5M' duration

Duration of event Recording triggered by an event from this sensor. This setting is applied only if sensor has an assigned camera with active Cloud Recording.

incident_delaystring duration

A delay before RTS incident is triggered. If the location is disarmed during this period, no incident is forwarded. However the video from the binded camera is recorded. PT0S means no delay and PT3M is the max.

Example request

{
  "name": "My brand new sensor",
  "type": "smoke"
}

Response

Newly created sensor object

idinteger required

Sensor ID

userinteger required

User ID

namestring required

Sensor name

type'motion' | 'camera_motion' | 'door_window' | 'smoke' | 'fire' | 'glass_break' | 'shock_vibration' | 'water' | 'perimeter_entry' required

Sensor type

placement'indoors' | 'outdoors' required

Sensor placement

manufacturerstring required

Sensor manufacturer

modelstring required

Sensor model

notestring required

Any note related to sensor

hashstring required

Event API hash (a unique token for each sensor)

emailstring required

Unique email address that can be used to receive events from this sensor by Angelcam

enabledboolean required

Defaults to True. Indicates if sensor is enabled or not. If disabled then all events from this sensor are ignored.

override_armingboolean required

Defaults to False. If enabled, an event received from the sensor will always trigger an incident regardless of the arming settings.

camerainteger required

Camera ID sensor is bind to

enable_cloud_recording_for'PT30S' | 'PT1M' | 'PT2M' | 'PT5M' duration required

Duration of event Recording triggered by an event from this sensor. This setting is applied only if sensor has an assigned camera with active Cloud Recording.

incident_delaystring duration required

A delay before RTS incident is triggered. If the location is disarmed during this period, no incident is forwarded. However the video from the binded camera is recorded. PT0S means no delay and PT3M is the max.

created_atstring required

DateTime when sensor was created

updated_atstring required

DateTime when sensor was last updated

events_count_iftttinteger required

Total count of events received from this sensor via IFTTT

events_count_emailinteger required

Total count of events received from this sensor via email

events_count_apiinteger required

Total count of events received from this sensor via API

Example response

{
  "id": 34,
  "user": 4,
  "name": "Front door sensor",
  "type": "motion",
  "placement": "indoors",
  "manufacturer": "SensorsX",
  "model": "XTF-666",
  "note": "Testing this sensor",
  "hash": "dy3ovys2ol",
  "email": "dy3ovys2ol@angel.cam",
  "enabled": true,
  "override_arming": false,
  "camera": 32,
  "enable_cloud_recording_for": "PT1M",
  "incident_delay": "PT0S",
  "created_at": "2019-09-24T13:16:23.899357+02:00",
  "updated_at": "2019-09-24T13:16:23.899384+02:00",
  "events_count_ifttt": 0,
  "events_count_email": 0,
  "events_count_api": 5
}

Changes

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