Skip to main content

DoorSensor

1.DoorSensor.getLastReport

1.Get Last reported state

BDDP

ParamValueDesc
methodDoorSensor.getLastReportGet Last reported state
targetDevice<String,Necessary>DeviceId of this device;
token<String,Necessary>Net Token of this device;

BUDP

ParamValueDesc
data.battery<String,Necessary>Battery,Low/Normal
data.state<String,Necessary>Current State,Open/Close
data.reportTime<Timestamp,Necessary>Report time
data.reportType<String,Necessary>Report type,Report/StatusChange/Alert

2.DoorSensor.getVersion

Get firmware info

BDDP

ParamValueDesc
methodDoorSensor.getVersionGet firmware info;
targetDevice<String,Necessary>DeviceId of this device;
token<String,Necessary>Net Token of this device;

BUDP

ParamValueDesc
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;

3.DoorSensor.startUpgrade

Start Upgrade

BDDP

ParamValueDesc
methodDoorSensor.startUpgradeStart 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;

BUDP

ParamValueDesc
data.isStarted<Boolean,Necessary>Is upgrading started;

4.Callbacks

You can receive it with Http Callback API or MQTT report topic

BUDP

ParamValueDesc
data.battery<String,Necessary>Battery,Low/Normal
data.state<String,Necessary>Current State,Open/Close