Sprinkler
1.Sprinkler.getState
Get Current State
Param | Value | Desc |
---|---|---|
method | Sprinkler.getState | Get Current State |
targetDevice | <String,Necessary> | DeviceId of the Sprinkler you use; |
token | <String,Necessary> | Net token of the Sprinkler you use; |
Param | Value | Desc |
---|---|---|
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
Param | Value | Desc |
---|---|---|
method | Sprinkler.setState | Set 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 |
Same as Sprinkler.getState
3.Sprinkler.setManualWater
Delay to turn on Sprinkler.
Param | Value | Desc |
---|---|---|
method | Sprinkler.setManualWater | Delay 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"] |
Delay to turn on Sprinkler.
4.Sprinkler.getSchedules
Get Schedule List
Param | Value | Desc |
---|---|---|
method | Sprinkler.getSchedules | Get Schedule List. |
targetDevice | <String,Necessary> | DeviceId of the Sprinkler you use; |
token | <String,Necessary> | Net token of the Sprinkler you use; |
Param | Value | Desc |
---|---|---|
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
Param | Value | Desc |
---|---|---|
method | Sprinkler.setSchedules | Set Schedule. |
targetDevice | <String,Necessary> | DeviceId of the Sprinkler you use; |
token | <String,Necessary> | Net token of the Sprinkler you use; |
params.sches | <Array | Map,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. |
Same as Sprinkler.getSchedules
6.Sprinkler.getVersion
Get firmware info
Param | Value | Desc |
---|---|---|
method | Sprinkler.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.Sprinkler.startUpgrade
Start Upgrade
Param | Value | Desc |
---|---|---|
method | Sprinkler.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; |
8.Callbacks
You can receive it with Http Callback API or MQTT report topic
<Same as 1.Sprinkler.getState>