Linkage Configuration Interface
Query what triggers the specified object type has (IF)
- API intent: query.ifttt.trigger
- Description: This interface is used to query the automatic condition configuration supported by the specified object model, including condition name and parameters. Object model can be queried on the Console-Device Resources page. The conditional configuration of the trigger can be used to create automation and conditional sets.
- Request parameters
Name |
Type |
Is required? |
Description |
models |
Array |
Yes |
Object model(such as: device, scene) |
{
"intent": "query.ifttt.trigger",
"data": {
"models": [
"lumi.gateway.acn01",
"lumi.gateway.aqhm01"
]
}
}
Name |
Type |
Description |
triggerDefinitionId |
String |
Trigger definition id |
triggerName |
String |
Trigger name |
model |
String |
Object model |
params |
Array(Object) |
Automation parameters, see params description for details |
params description
Name |
Type |
Description |
paramId |
String |
Parameter id |
paramType |
int |
Parameter type: can be used for parameter value verification. 0: int 1: float 2: string 3: time |
paramEnum |
String |
Parameter enumeration |
paramName |
String |
Parameter Name |
maxValue |
double |
Maximum value |
minValue |
double |
Minimum value |
defaultValue |
String |
Default value |
paramUnit |
String |
Parameter unit |
step |
double |
Step size |
{
"code": 0,
"message": "Success",
"msgDetails": "",
"requestId": "",
"result": [
{
"triggerDefinitionId": "TD.lumi.gateway.light_is_on",
"triggerName": "Night light is on",
"model": "lumi.gateway.acn01"
},
{
"triggerDefinitionId": "TD.lumi.gateway.light_is_off",
"triggerName": "Night light is off\t",
"model": "lumi.gateway.acn01"
},
{
"triggerDefinitionId": "TD.lumi.gateway.illumination_more_than",
"triggerName": "Above assigned illuminance",
"model": "lumi.gateway.acn01",
"params": [
{
"paramType": 0,
"minValue": 0.0,
"paramUnit": "Lux",
"defaultValue": "10",
"maxValue": 80.0,
"step": 1.0,
"paramId": "PD.illumination"
}
]
},
{
"triggerDefinitionId": "TD.lumi.gateway.illumination_less_than",
"triggerName": "Below assigned illuminance",
"model": "lumi.gateway.acn01",
"params": [
{
"paramType": 0,
"minValue": 1.0,
"paramUnit": "Lux",
"defaultValue": "10",
"maxValue": 80.0,
"step": 1.0,
"paramId": "PD.illumination"
}
]
}
]
}
Query what actions the specified object type has (Then)
- API intent: query.ifttt.action
- Description: This interface is used to query the action configuration supported by the specified object model, including action name and parameters. Object model can be queried on the Console-Device Resources page. The execution action configuration can be used to create automations and scenarios.
- Request parameters
Name |
Type |
Is required? |
Description |
models |
Array |
Yes |
Object model(such as: device, scene) |
{
"intent": "query.ifttt.action",
"data": {
"models": [
"lumi.gateway.acn01"
]
}
}
Name |
Type |
Description |
actionDefinitionId |
String |
Action definition id |
actionName |
String |
Action name |
model |
String |
Object model |
params |
Array |
Automation parameters, see params description for details |
params description
Name |
Type |
Description |
paramId |
String |
Parameter id |
paramType |
int |
Parameter type: can be used for parameter value verification. 0: int 1: float 2: string 3: time |
paramEnum |
String |
Parameter enumeration |
paramName |
String |
Parameter Name |
maxValue |
double |
Maximum value |
minValue |
double |
Minimum value |
defaultValue |
String |
Default value |
paramUnit |
String |
Parameter unit |
step |
double |
Step size |
{
"code": 0,
"message": "Success",
"msgDetails": "",
"requestId": "",
"result": [
{
"actionDefinitionId": "AD.lumi.gateway.open_corridor_light",
"model": "lumi.gateway.acn01",
"actionName": "Turn on night light"
},
{
"actionDefinitionId": "AD.lumi.gateway.close_corridor_light",
"model": "lumi.gateway.acn01",
"actionName": "Turn off night light"
},
{
"actionDefinitionId": "AD.lumi.gateway.music",
"model": "lumi.gateway.acn01",
"params": [
{
"paramType": 0,
"minValue": 0.0,
"paramUnit": "local",
"defaultValue": "10000",
"maxValue": 0.0,
"step": 1.0,
"paramId": "PD.musicIndex",
"paramEnum": "{\"Police car sound 1\":0,\"Police car sound 2\":1,\"Safety accident sound\":2,\"Missile countdown\":3,\"Ghost calls\":4,\"Sniper rifle\":5,\"Battle sound\":6,\"Air Alert\":7,\"barking\":8,\"Doorbell sound\":10,\"Knock door sound\":11,\"Funny sound\":12,\"Clock sound\":13,\"Arming Sound\":14,\"Disarming Sound\":15,\"Mi Mix\":20,\"Enthusiastic\":21,\"Guitar Classic\":22,\"Ice World Piano\":23,\"Leisure Time\":24,\"Childhood\":25,\"Morning StreamIet\":26,\"Music Box\":27,\"Orange\":28,\"Thinker\":29}"
},
{
"paramType": 2,
"minValue": 0.0,
"paramUnit": "local",
"defaultValue": "40",
"maxValue": 100.0,
"step": 1.0,
"paramId": "PD.vol",
"paramEnum": ""
}
],
"actionName": "Play assigned ringtone"
},
{
"actionDefinitionId": "AD.lumi.gateway.stop_ringtone_light",
"model": "lumi.gateway.acn01",
"actionName": "Stop ringtone and flickering light"
}
]
}