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:
Smoke.GetConfig
to obtain the component's configurationSmoke.SetConfig
to update the component's configurationSmoke.GetStatus
to obtain the component's statusSmoke.Mute
to mute alarm of the associated smoke sensor
Methods
Smoke.SetConfig
Property | Type | Description |
---|---|---|
| number | Id of the Smoke component instance |
| object | Configuration that the method takes |
Find more about the config properties in config section
Smoke.GetConfig
Property | Type | Description |
---|---|---|
| number | Id of the Smoke component instance |
Find the Smoke.GetConfig response properties in config section
Smoke.GetStatus
Property | Type | Description |
---|---|---|
| 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.
Property | Type | Description |
---|---|---|
| number | Id of the Smoke component instance |
Configuration
To Get/Set the configuration of the Smoke component its id
must be specified.
Properties:
Property | Type | Description |
---|---|---|
| number | Id of the Smoke component instance |
| string or null | Name of the Smoke instance. |
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:
Property | Type | Description |
---|---|---|
| number | Id of the Smoke component instance |
| boolean | Alarm state |
| 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 triggeredsmoke.alarm_off
- produced when smoke alarm goes offsmoke.alarm_test
- produced when alarm test is invoked
Examples
Smoke.SetConfig example
- Smoke.SetConfig HTTP GET Request
- Smoke.SetConfig Curl Request
- Smoke.SetConfig Mos Request
http://192.168.33.1/rpc/Smoke.SetConfig?id=0&config={"name":"Smoke0"}
curl -X POST -d '{"id":1,"method":"Smoke.SetConfig","params":{"id":0,"config":{"name":"Smoke0"}}}' http://${SHELLY}/rpc
mos --port ${PORT} call Smoke.SetConfig '{"id":0,"config":{"name":"Smoke0"}}'
Response
- Smoke.SetConfig HTTP GET Response
- Smoke.SetConfig Curl Response
- Smoke.SetConfig Mos Response
{
"restart_required": false
}
{
"id": 1,
"src": "shellyplussmoke-441793cc9d30",
"params": {
"restart_required": false
}
}
{
"restart_required": false
}
Smoke.GetConfig example
- Smoke.GetConfig HTTP GET Request
- Smoke.GetConfig Curl Request
- Smoke.GetConfig Mos Request
http://192.168.33.1/rpc/Smoke.GetConfig?id=0
curl -X POST -d '{"id":1,"method":"Smoke.GetConfig","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Smoke.GetConfig '{"id":0}'
Response
- Smoke.GetConfig HTTP GET Response
- Smoke.GetConfig Curl Response
- Smoke.GetConfig Mos Response
{
"id": 0,
"name": null
}
{
"id": 1,
"src": "shellyplussmoke-441793cc9d30",
"params": {
"id": 0,
"name": null
}
}
{
"id": 0,
"name": null
}
Smoke.GetStatus example
- Smoke.GetStatus HTTP GET Request
- Smoke.GetStatus Curl Request
- Smoke.GetStatus Mos Request
http://192.168.33.1/rpc/Smoke.GetStatus?id=0
curl -X POST -d '{"id":1,"method":"Smoke.GetStatus","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Smoke.GetStatus '{"id":0}'
Response
- Smoke.GetStatus HTTP GET Response
- Smoke.GetStatus Curl Response
- Smoke.GetStatus Mos Response
{
"id": 0,
"alarm": true,
"mute": false
}
{
"id": 1,
"src": "shellyplussmoke-441793cc9d30",
"params": {
"id": 0,
"alarm": true,
"mute": false
}
}
{
"id": 0,
"alarm": true,
"mute": false
}
Smoke.Mute example
- Smoke.Mute HTTP GET Request
- Smoke.Mute Curl Request
- Smoke.Mute Mos Request
http://192.168.33.1/rpc/Smoke.Mute?id=0
curl -X POST -d '{"id":1,"method":"Smoke.Mute","params":{"id":0}}' http://${SHELLY}/rpc
mos --port ${PORT} call Smoke.Mute '{"id":0}'
Response
- Smoke.Mute HTTP GET Response
- Smoke.Mute Curl Response
- Smoke.Mute Mos Response
null
{
"id": 1,
"src": "shellyplussmoke-441793cc9d30",
"params": null
}
null