Skip to main content
Version: 1.0

Smoke

The Smoke component handles the monitoring of device's smoke sensors. Smoke components are identified with smoke:<id> in objects containing multiple component payloads.

The Smoke component uses Smoke as RPC namespace and implements the minimal component interface:

Methods

Smoke.SetConfig

PropertyTypeDescription

id

number

Id of the Smoke component instance

config

object

Configuration that the method takes

Find more about the config properties in config section

Smoke.GetConfig

PropertyTypeDescription

id

number

Id of the Smoke component instance

Find the Smoke.GetConfig response properties in config section

Smoke.GetStatus

PropertyTypeDescription

id

number

Id of the Smoke component instance

Find more about the status response properties in status section

Smoke.Mute

This method mute alarm of the associated smoke sensor.

PropertyTypeDescription

id

number

Id of the Smoke component instance

Configuration

To Get/Set the configuration of the Smoke component its id must be specified.

Properties:

PropertyTypeDescription

id

number

Id of the Smoke component instance

name

string or null

Name of the Smoke instance. name length should not exceed 64 chars

Status

The status of the Smoke component represents the alarm and mute state of the associated smoke sensor. To obtain the status of the Smoke component its id must be specified.

Properties:

PropertyTypeDescription

id

number

Id of the Smoke component instance

alarm

boolean

Alarm state

mute

boolean

Mute state

Webhook Events

There are two events related to the Smoke component that can trigger webhooks:

  • smoke.alarm - produced when smoke alarm is triggered
  • smoke.alarm_off - produced when smoke alarm goes off
  • smoke.alarm_test - produced when alarm test is invoked

Examples

Smoke.SetConfig example

http://192.168.33.1/rpc/Smoke.SetConfig?id=0&config={"name":"Smoke0"}

Response

{
"restart_required": false
}

Smoke.GetConfig example

http://192.168.33.1/rpc/Smoke.GetConfig?id=0

Response

{
"id": 0,
"name": null
}

Smoke.GetStatus example

http://192.168.33.1/rpc/Smoke.GetStatus?id=0

Response

{
"id": 0,
"alarm": true,
"mute": false
}

Smoke.Mute example

http://192.168.33.1/rpc/Smoke.Mute?id=0

Response

null