Router
This topic describes the API calls for routing in the custom device panel SDK.
Background information
For more information about how to install the SDK and call APIs, see Getting started.
Open a route
open
Request parameters
Parameter | Type | Subparameter | Subparameter type | Description | Required |
schema | string | None | None | The routing address. | Yes |
options | object | params | object | You can enable the parameter. | No |
expectReceiveResult | boolean | Specifies whether to return parameters. | No |
Response parameters
Parameter | Type | Subparameter | Subparameter type | Description |
result | boolean | - | - | The result of the call. The value is `true`. |
Example
import { router } from 'aliyun-livinglink-sdk';
router.open('link://router/device_setting',{
params: {
iotId:'xxx'
},
expectReceiveResult: true,
}).then((res)=>{
console.log(res)
})API support
Cloud Intelligence | Private Brand | Tmall Genie |
✔︎ | ✔︎ | ✔︎ |
Exit the current container
exit
Request parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description | Required |
params | object | - | - | The parameters. | No |
Response parameters
Parameter | Parameter Type | Subparameter | Subparameter type | Description |
result | boolean | - | - | The result of the call. The value is `true`. |
Example
import { router } from 'aliyun-livinglink-sdk';
router.exit().then((res)=>{
console.log(res)
})API support
Cloud Intelligence | Private Brand | Tmall Genie |
✔︎ | ✔︎ | ✔︎ |
Go to the device settings plugin
toDeviceSetting
Request parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description | Required |
deviceIdentity | object | iotId | string | The device ID. This is the unique identifier that IoT Platform issues to the device. | Yes |
productKey | string | The ProductKey. This is part of the device certificate information. It is the globally unique identifier that IoT Platform issues when a product is created. | No | ||
skillId | int | The skill ID. | Required for the Tmall Genie app. |
Response parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description |
result | boolean | - | - | The result of the call. The value is `true`. |
Example
import { router } from 'aliyun-livinglink-sdk';
router.toDeviceSetting({
iotId:'xxx'
}).then((res)=>{
console.log(res)
})API support
Cloud Intelligence | Private Brand | Tmall Genie |
✔︎ | ✔︎ | ✔︎ |
Go to the cloud timer plugin
toCloudTimer
Request parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description | Required |
deviceIdentity | object | iotId | string | The device ID. This is the unique identifier that IoT Platform issues to the device. | Yes |
productKey | string | The ProductKey. This is part of the device certificate information. It is the globally unique identifier that IoT Platform issues when a product is created. | No | ||
skillId | int | The skill ID. | Required for the Tmall Genie app. |
Response parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description |
result | boolean | - | - | The result of the call. The value is `true`. |
Example
import { router } from 'aliyun-livinglink-sdk';
router.toCloudTimer({
iotId:'xxx'
}).then((res)=>{
console.log(res)
})API support
Cloud Intelligence | Private Brand | Tmall Genie |
✔︎ | ✔︎ | ✔︎ |
Go to the local timer plugin
toLocalTimer
Request parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description | Required |
deviceIdentity | object | iotId | string | The device ID. This is the unique identifier that IoT Platform issues to the device. | Yes |
productKey | string | The ProductKey. This is part of the device certificate information. It is the globally unique identifier that IoT Platform issues when a product is created. | No |
Response parameters
Parameter | Parameter type | Subparameter | Subparameter type | Description |
result | boolean | - | - | The result of the call. The value is `true`. |
Example
import { router } from 'aliyun-livinglink-sdk';
router.toLocalTimer({
iotId:'xxx'
}).then((res)=>{
console.log(res)
})API support
Cloud Intelligence | Private Brand | Tmall Genie |
✔︎ | ✔︎ | ✔︎ |
Go to the on-device timer plugin
toDeviceTimer
Request parameters
Parameter | Type | Subparameter | Subparameter type | Description | Required |
deviceIdentity | object | iotId | string | The device ID. This is the unique identifier that IoT Platform issues to the device. | Yes |
productKey | string | The ProductKey. This is part of the device certificate information. It is the globally unique identifier that IoT Platform issues when a product is created. | No | ||
skillId | int | The skill ID. | Required for the Tmall Genie app. |
Response parameters
Parameter | Parameter Type | Subparameter | Subparameter type | Description |
result | boolean | - | - | The result of the call. The value is `true`. |
Example
import { router } from 'aliyun-livinglink-sdk';
router.toDeviceTimer({
iotId:'xxx',
productKey:'xxx'
}).then((res)=>{
console.log(res)
})API support
Cloud Intelligence | Private Brand | Tmall Genie |
✔︎ | ✔︎ | ✔︎ |