Siren
1.Siren.getState
Get the state of siren
| Param | Value | Desc |
|---|---|---|
| method | Siren.getState | Get the state of siren. |
| targetDevice | <String,Necessary> | DeviceId of the siren you use; |
| token | <String,Necessary> | Net token of the siren you use;You can get it here |
| Param | Value | Desc |
|---|---|---|
| data.state | <String,Necessary> | State of device,["normal","alert","off"]; |
| data.soundLevel | <Integer,Necessary> | Volume of siren; |
| data.battery | <Integer,Necessary> | Battery level of device; |
| data.powerSupply | <Integer,Necessary> | Duration of alert;["battery","usb"] |
| data.alarmDuation | <Integer,Necessary> | Duration of alert; |
2.Siren.setState
Set the state of siren
| Param | Value | Desc |
|---|---|---|
| method | Siren.setState | Set the state of siren. |
| targetDevice | <String,Necessary> | DeviceId of the siren you use; |
| token | <String,Necessary> | Net token of the siren you use;You can get it here |
| params.state.alarm | <Boolean,Necessary> | Set state of device. true means start alert and false means stop alert; |
| Param | Value | Desc |
|---|---|---|
| data.state | <String,Necessary> | State of device,["normal","alert","off"]; |