WaterDepthSensor
1.WaterDepthSensor.getState
Get the state of Water Depth Sensor
Param | Value | Desc |
---|---|---|
method | WaterDepthSensor.getState | Get the state of Water Depth Sensor |
targetDevice | <String,Necessary> | DeviceId of the Sensor you use; |
token | <String,Necessary> | Net token of the Sensor you use; You can get it here |
Param | Value | Desc |
---|---|---|
data.state.online | <Boolean,Necessary> | Is device online |
data.state.alarm.highAlarm | <Boolean,Necessary> | True means water depth above set thresholds |
data.state.alarm.lowAlarm | <Boolean,Necessary> | True means water depth below set thresholds |
data.state.alarm.detectorError | <Boolean,Necessary> | True means the probe is in an abnormal state |
data.state.alarmSettings.standby | <Integer,Necessary> | [0 ~ 7200] seconds. |
data.state.alarmSettings.interval | <Integer,Necessary> | [10 ~ 240] minutes. |
data.state.alarmSettings.high | <Integer,Necessary> | [0 ~ 1000] pre thousand of range. |
data.state.alarmSettings.low | <Integer,Necessary> | [0 ~ 1000] pre thousand of range. |
data.state.battery | <Integer,Necessary> | Level of device's battery, 0 to 4 means empty to full |
data.state.reportInterval | <Integer,Necessary> | [10 ~ 240] minutes |
data.state.version | <String,Necessary> | Firmware Version of device |
data.reportAt | <Date,Necessary> | Time of reported |
data.deviceId | <String,Necessary> | Id of device |
2.WaterDepthSensor.setAttributes
Set attributes for water depth sensor
Param | Value | Desc |
---|---|---|
method | WaterDepthSensor.setSettings | Set settings for water depth sensor |
targetDevice | <String,Necessary> | DeviceId of the device you use; |
token | <String,Necessary> | Net token of the device you use; |
params.alarmSettings.standby | <Integer,Necessary> | [0 ~ 7200] seconds. |
params.alarmSettings.interval | <Integer,Necessary> | [10 ~ 240] minutes. |
params.alarmSettings.high | <Integer,Necessary> | [0 ~ 1000] pre thousand of range. |
params.alarmSettings.low | <Integer,Necessary> | [0 ~ 1000] pre thousand of range. |
3.Callbacks
You can receive it with Http Callback API or MQTT report topic
<Same as 1.WaterDepthSensor.getState>