Dimmer
1.Dimmer.getState
Get Current State
Param | Value | Desc |
---|---|---|
method | Dimmer.getState | Get Current State |
targetDevice | <String,Necessary> | DeviceId of the Dimmer you use; |
token | <String,Necessary> | Net token of the Dimmer you use; |
Param | Value | Desc |
---|---|---|
data.state | <String,Necessary> | State of device,["closed","open"]; |
data.brightness | <Integer,Necessary> | Brightness of device,[1~100]; |
data.delay.on | <Integer,Necessary> | The remain time of Delay ON;Unit of minute;0 is OFF |
data.delay.off | <Integer,Necessary> | The remain time of Delay OFF;Unit of minute;0 is OFF |
data.version | <String,Necessary> | Firmware Version of device |
data.tz | <Integer,Necessary> | Timezone of device. -12 ~ 12 |
2.Dimmer.setState
Set Dimmer's State
Param | Value | Desc |
---|---|---|
method | Dimmer.setState | Set Dimmer's State |
targetDevice | <String,Necessary> | DeviceId of the Dimmer you use; |
token | <String,Necessary> | Net token of the Dimmer you use; |
params.state | <String,Necessary> | Set state of device.["close","open"]; |
params.brightness | <Optional,Necessary> | Brightness of device,[1~100]; |
Param | Value | Desc |
---|---|---|
data.state | <String,Necessary> | State of device,["closed","open"]; |
3.Dimmer.setDelay
Delay to turn on Dimmer.
Param | Value | Desc |
---|---|---|
method | Dimmer.setDelay | Delay to turn on Dimmer. |
targetDevice | <String,Necessary> | DeviceId of the Dimmer you use; |
token | <String,Necessary> | Net token of the Dimmer you use; |
params.delayOn | <Integer,Optional> | The time you want to Delay ON;Unit of minute;0 is cancel delay; |
params.delayOff | <Integer,Optional> | The time you want to Delay OFF;Unit of minute;0 is cancel delay; |
Param | Value | Desc |
---|---|---|
data.delay.on | <Integer,Necessary> | The remain time of Delay ON;Unit of minute;0 is OFF |
data.delay.off | <Integer,Necessary> | The remain time of Delay OFF;Unit of minute;0 is OFF |
4.Dimmer.getSchedules
Get Schedule List
Param | Value | Desc |
---|---|---|
method | Dimmer.getSchedules | Get Schedule List. |
targetDevice | <String,Necessary> | DeviceId of the Dimmer you use; |
token | <String,Necessary> | Net token of the Dimmer you use; |
Param | Value | Desc |
---|---|---|
data[index].isValid | <Boolean,Necessary> | Enabled/Disabled ; |
data[index].index | <Integer,Necessary> | Index of this record ; |
data[index].on | <String,Optional> | Time to turn on; HH:mm |
data[index].off | <String,Optional> | Time to turn off; HH:mm |
data[index].week | <Integer,Necessary> | mask of effected days(Sunday to Saturday) |
5.Dimmer.setSchedules
Set Schedule
Param | Value | Desc |
---|---|---|
method | Dimmer.setSchedules | Set Schedule. |
targetDevice | <String,Necessary> | DeviceId of the Dimmer you use; |
token | <String,Necessary> | Net token of the Dimmer you use; |
params.sches | <Array<Schedule> | Map<int,Schedule>,Necessary> |
params.sches[index].isValid | <Boolean,Necessary> | Enabled/Disabled ; |
params.sches[index].index | <Integer,Necessary> | Index of this record ; |
params.sches[index].on | <String,Necessary> | Time to turn on; HH:mm |
params.sches[index].off | <String,Necessary> | Time to turn off; HH:mm |
params.sches[index].week | <Integer,Necessary> | mask of effected days(Sunday to Saturday) |
index from "0" to "5"
Same as Dimmer.getSchedules
6.Dimmer.getVersion
Get firmware info
Param | Value | Desc |
---|---|---|
method | Dimmer.getVersion | Get firmware info; |
targetDevice | <String,Necessary> | DeviceId of this device; |
token | <String,Necessary> | Net Token of this device; |
Param | Value | Desc |
---|---|---|
data.version | <String,Necessary> | Current Version; |
data.newVersion.versionId | <String,Optional> | Id of the newest version; |
data.newVersion.versionCode | <String,Optional> | Code of the newest version; |
data.newVersion.fileSize | <String,Optional> | File Size of the newest version; |
7.Dimmer.setDeviceAttributes
Set dimmer's attributes
Param | Value | Desc |
---|---|---|
method | Dimmer.setDeviceAttributes | Set dimmer's attributes; |
targetDevice | <String,Necessary> | DeviceId of this device; |
token | <String,Necessary> | Net Token of this device; |
params.led.status | <String,Optional> | Status LED ["on","off"]; |
params.led.level | <String,Optional> | Brightness LED ["on","off"]; |
params.gradient.on | <Integer,Optional> | Gentle on in seconds [0-20]; |
params.gradient.off | <Integer,Optional> | Gentle off in seconds [0-20]; |
params.calibration | <Integer,Optional> | Dimming Calibration low [0-99] |
params.calibrationHigh | <Integer,Optional> | Dimming Calibration high [0-99]; |
Param | Value | Desc |
---|---|---|
data.deviceAttributes.led.status | <String,Necessary> | Status LED ["on","off"]; |
data.deviceAttributes.led.level | <String,Necessary> | Brightness LED ["on","off"]; |
data.deviceAttributes.gradient.on | <Integer,Necessary> | Gentle on in seconds [0-20]; |
data.deviceAttributes.gradient.off | <Integer,Necessary> | Gentle off in seconds [0-20]; |
data.deviceAttributes.calibration | <Integer,Necessary> | Dimming Calibration low [0-99] |
data.deviceAttributes.calibrationHigh | <Integer,Necessary> | Dimming Calibration high [0-99]; |
8.Dimmer.startUpgrade
Start Upgrade
Param | Value | Desc |
---|---|---|
method | Dimmer.startUpgrade | Start Upgrade |
targetDevice | <String,Necessary> | DeviceId of this device; |
token | <String,Necessary> | Net Token of this device; |
params.versionId | <String,Necessary> | Version Id you want to upgrade; |
Param | Value | Desc |
---|---|---|
data.isStarted | <Boolean,Necessary> | Is upgrading started; |
9.Dimmer.getActivityLogs
Used to retrieve device activity records through search parameters or retrieval key.
caution
"DEVICE.HISTORICAL_DATA.READ" permission is required to access this interface
Param | Value | Desc |
---|---|---|
method | Dimmer.getActivityLogs | Get device's activity records |
targetDevice | <String,Necessary> | DeviceId of the device you use; |
token | <String,Necessary> | Net token of the device you use; You can get it here |
params.search | <Object,Optional> | Retrieve records through search parameters. |
params.search.startDate | <String,Necessary> | Specify the start date of the search scope, with "YYYY-MM-DD" formatted |
params.search.endDate | <String,Necessary> | Specify the end date of the search scope, with "YYYY-MM-DD" formatted |
params.retrievalKey | <string,Optional> | Retrieve records through retrieval key. |
Param | Value | Desc |
---|---|---|
data.logs | <Array,Necessary> | Records of device activity logs |
data.logs[*].id | <Array,Necessary> | Id of record |
data.logs[*].time | <Date,Necessary> | Time of record |
data.logs[*].data | <Object,Necessary> | Data of record |
data.retrievalKeys | <Object,Optional> | When search results are not fully returned in this data packet, retrieval keys will be provided for retrieving other results. |
data.retrievalKeys.next | <Object,Necessary> | It indicates that there is more data available and can be retrieved through this key. |
10.Callbacks
You can receive it with Http Callback API or MQTT report topic
<Same as 1.Dimmer.getState>