Skip to main content
Version: 1.0

Flood

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

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

Methods

Flood.SetConfig

PropertyTypeDescription

id

number

Id of the Flood component instance

config

object

Configuration that the method takes

Find more about the config properties in config section

Flood.GetConfig

PropertyTypeDescription

id

number

Id of the Flood component instance

Find the Flood.GetConfig response properties in config section

Flood.GetStatus

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

Properties:

PropertyTypeDescription

id

number

Id of the Flood component instance

Find more about the status response properties in status section

Configuration

The configuration of the Flood component allows to adjust the Flood alarm_mode. To Get/Set the configuration of the Flood component its id must be specified.

Properties:

PropertyTypeDescription

id

number

Id of the Flood component instance

name

string or null

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

alarm_mode

string or null

Configuration of sound made on alarm. Accepted values are disabled, normal, intense and rain. When cable is unplugged value is null

report_holdoff

number

Time waited before reporting flood status. For this period status must be steady. Accepted values are between 0-60 sec with step 5 sec

Status

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

Properties:

PropertyTypeDescription

id

number

Id of the Flood component instance

alarm

boolean

Alarm state

mute

boolean

Mute state

errors

array of type string

Error conditions occurred. May contain cable_unplugged, (shown if at least one error is present)

Webhook Events

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

  • flood.alarm - produced when flood alarm is triggered
  • flood.alarm_off - produced when flood alarm goes off
  • flood.cable_unplugged - produced when cable for flood detection is unplugged

Examples

Flood.SetConfig example

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

Response

{
"restart_required": false
}

Flood.GetConfig example

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

Response

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

Flood.GetStatus example

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

Response

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