Watering Methods
Used to change the watering state of a Skydrop controller.
Table of Contents #
- GET /controllers/{controller_id}/water.state
- POST /controllers/{controller_id}/water.all
- POST /controllers/{controller_id}/zones/{zone_num}/water.zone
- POST /controllers/{controller_id}/water.stop
- GET /controllers/{controller_id}/last.next.water
- GET /controllers/{controller_id}/{start_day}/week.watering.history
- GET /controllers/{controller_id}/watering.forecast
GET /controllers/{controller_id}/water.state #
Retrieve the watering state of the given controller.
Query Fields
controller-id (string)
- The public id for the controller
Example Request
$.ajax({ type: 'GET', url: '[api url]/controllers/{controller-id}/water.state', contentType: "application/json" });
Response
success (boolean)
- The state of the callzone_states (array)
- An array of all zones and their states
POST /controllers/{controller_id}/water.all #
Start watering all zones, starting with the first zone.
Query Fields
controller-id (string)
- The public id for the controller
Example Request
$.ajax({ type: 'POST', url: '[api url]/controllers/{controller-id}/water.all', contentType: "application/json" });
Response
success (boolean)
- The success of the call
POST /controllers/{controller_id}/zones/{zone_num}/water.zone #
Start watering a single zone.
Query Fields
controller-id (string)
- The public id for the controllerzone_num (string)
- The zone number
Example Request
$.ajax({ type: 'POST', url: '[api url]/controllers/{controller-id}/water.zone/{zone_num}', contentType: "application/json" });
Response
success (boolean)
- The success of the call
POST /controllers/{controller_id}/water.stop #
Tells the given controller to stop watering
Query Fields
controller-id (string)
- The public id for the controller
Example Request
$.ajax({ type: 'POST', url: '[api url]/controllers/{controller-id}/water.stop', });
Response
success (boolean)
- The success of the call
GET /controllers/{controller_id}/last.next.water #
Gets the controllers next and last Smart watering schedule
Query Fields
controller-id (string)
- The public id for the controller
Example Request
$.ajax({ type: 'GET', url: '[api url]/controllers/{controller-id}/last.next.water', });
Response
smart_watering (array)
- The previous and scheduled smart waterings for each zone
smart_watering: [ { last_watering: "string" or false if never been watered, next_watering: "string", zone_id: int } ]
GET /controllers/{controller_id}/{start_day}/week.watering.history #
Gets the controllers watering statistics for the specified week
Query Fields
controller-id (string)
- The public id for the controllerstart_day (string)
- The first day of the desired week in MM-DD-YYYY format
Example Request
$.ajax({ type: 'GET', url: '[api url]/controllers/{controller-id}/{start_day}/week.watering.history', });
Response
object
- The controller's watering statistics for the week specified
{ start_date: string, end_date: string, zones: array, total_gallons: int, total_liters: double, times_watered: int }
GET /controllers/{controller_id}/watering.forecast #
Gets the forecast watering for the next week
Query Fields
controller-id (string)
- The public id for the controller
Example Request
$.ajax({ type: 'GET', url: '[api url]/controllers/{controller-id}/watering.forecast', });
Response
array
- Each day's expected watering forecast for the coming week
[ { date_time: date, prec: double, // day precipitation icon: string, // icon indicating general weather condition for the day temp: int, // high temperature temp_low: int, // low temperature sprinkled: double, // forecast inches of watering date_abr: string, // day of week abbreviation date_day: string, // numeric day of month zones: array // array of zones to be watered } ]