Skip to main content

Sprinkler

1.Sprinkler.getState

Get Current State

BDDP

ParamValueDesc
methodSprinkler.getStateGet Current State
targetDevice<String,Necessary>DeviceId of the Sprinkler you use;
token<String,Necessary>Net token of the Sprinkler you use;

BUDP

ParamValueDesc
data.state.mode<String,Necessary>Current mode of device,["auto","manual","off"];
data.state.zoneSize<Integer,Necessary>Size of zones;
data.state.delay<Integer,Necessary>Minutes to delay;
data.state.watering<Object,Optional>Current watering state;
data.state.watering.zone<Integer,Necessary>Index of current watering zone
data.state.watering.total<Integer,Necessary>Time(Minutes) of current watering
data.state.watering.left<Integer,Necessary>Left time(Minutes) of current watering
data.setting.maxWaterTime<Integer,Necessary>Maximum watering time
data.setting.manualWater<Array<Integer>,Necessary>Water Time for Manual Mode
data.version<String,Necessary>Firmware Version of device
data.tz<Integer,Necessary>Timezone of device. -12 ~ 12

2.Sprinkler.setState

Set Sprinkler's State

BDDP

ParamValueDesc
methodSprinkler.setStateSet Sprinkler's State
targetDevice<String,Necessary>DeviceId of the Sprinkler you use;
token<String,Necessary>Net token of the Sprinkler you use;
params.state.mode<String,Optional>Current mode of device,["auto","manual","off"];
params.state.zoneSize<Integer,Optional>Size of zones;
params.state.delay<Integer,Optional>Minutes to delay;
params.setting.manualWater<Array<Integer>,Optional>Water Time for Manual Mode
params.setting.maxWaterTime<Integer,Optional>Maximum watering time

BUDP

Same as Sprinkler.getState

3.Sprinkler.setManualWater

Delay to turn on Sprinkler.

BDDP

ParamValueDesc
methodSprinkler.setManualWaterDelay to turn on Sprinkler.
targetDevice<String,Necessary>DeviceId of the Sprinkler you use;
token<String,Necessary>Net token of the Sprinkler you use;
params.state<Integer,Necessary>Start/Stop Water when in Manual Mode.["start","stop"]

BUDP

Delay to turn on Sprinkler.

4.Sprinkler.getSchedules

Get Schedule List

BDDP

ParamValueDesc
methodSprinkler.getSchedulesGet Schedule List.
targetDevice<String,Necessary>DeviceId of the Sprinkler you use;
token<String,Necessary>Net token of the Sprinkler you use;

BUDP

ParamValueDesc
data.sches<Array<Object>,Necessary>Schedules for Four Sessions. From Spring To Winter
data.sches[*].date<String,Necessary>Start date of session. "M-d" Formatted;
data.sches[*].weekmask<Integer,Necessary>Mask of enabled weekdays ;
data.sches[*].plans<Array<Object>,Necessary>Water plans of session. Up to 2.
data.sches[*].plans[*].time<String,Necessary>Time to start water for this plan. "hโ“‚๏ธs" formatted.
data.sches[*].plans[*].zones<Array<Integer>,Necessary>Water time of zones for this plan.

5.Sprinkler.setSchedules

Set Schedule

BDDP

ParamValueDesc
methodSprinkler.setSchedulesSet Schedule.
targetDevice<String,Necessary>DeviceId of the Sprinkler you use;
token<String,Necessary>Net token of the Sprinkler you use;
params.sches<ArrayMap,Necessary>
params.sches[*].date<String,Necessary>Start date of session. "M-d" Formatted;
params.sches[*].weekmask<Integer,Necessary>Mask of enabled weekdays ;
params.sches[*].plans<Array<Object>,Necessary>Water plans of session. Up to 2.
params.sches[*].plans[*].time<String,Necessary>Time to start water for this plan. "hโ“‚๏ธs" formatted.
params.sches[*].plans[*].zones<Array<Integer>,Necessary>Water time of zones for this plan.

BUDP

Same as Sprinkler.getSchedules

6.Sprinkler.getVersion

Get firmware info

BDDP

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

7.Sprinkler.startUpgrade

Start Upgrade

BDDP

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

8.Callbacks

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

BUDP

<Same as 1.Sprinkler.getState>