Pause API

Now that the V3 app has been out for some time that supports the pause feature, when will the API be updated to also include this feature. I have a very strong need to pause my sprinkler system when my water filter needs to flush, with the sprinklers running there just isn’t enough water pressure remaining.

@dpbremer These were recently added :wink: You can now “pause” and “resume” the device. Trying to get this added to the external documentation, but here you go.

@PUT
@Path(“/device/resume_zone_run”)
/**

  • @api {put} /public/device/resume_zone_run
  • @apiVersion 1.0.0
  • @apiHeader (Auth) {String} Authorization Users unique access-token
  • @apiName ResumeZoneRun
  • @apiDescription Resume a zone run for device
  • @apiGroup Device
  • @apiParam {String} id Device’s unique id
  • @apiSuccessTitle (All) 204 - No content
  • @apiSuccessExample {json} Success-Response:
  • HTTP/1.1 204 No content
  • @apiErrorStructure ForbiddenError
  • @apiErrorStructure BadRequestError
  • @apiExample {curl} Example Usage:
  • curl -X PUT -H “Content-Type: application/json” -H “Authorization: Bearer 8e600a4c-0027-4a9a-9bda-dc8d5c90350d” -d ‘{ “id” : “d3e99d27-25e4-47dd-b354-1db5a84c99d7”}’ https://api.rach.io/1/public/device/resume_zone_run

*/

@PUT
@Path(“/device/pause_zone_run”)
/**

  • @api {put} /public/device/pause_zone_run
  • @apiVersion 1.0.0
  • @apiHeader (Auth) {String} Authorization Users unique access-token
  • @apiName PauseZoneRun
  • @apiDescription Pause a zone run for device
  • @apiGroup Device
  • @apiParam {String} id Device’s unique id
  • @apiParam {Number} duration Duration in seconds (Range is 0 - 3600 (1 hour) )
  • @apiSuccessTitle (All) 204 - No content
  • @apiSuccessExample {json} Success-Response:
  • HTTP/1.1 204 No content
  • @apiErrorStructure ForbiddenError
  • @apiErrorStructure BadRequestError
  • @apiExample {curl} Example Usage:
  • curl -X PUT -H “Content-Type: application/json” -H “Authorization: Bearer 8e600a4c-0027-4a9a-9bda-dc8d5c90350d” -d ‘{ “id” : “d3e99d27-25e4-47dd-b354-1db5a84c99d7”, “duration” : 3600 }’ https://api.rach.io/1/public/device/pause_zone_run

*/

:cheers:

2 Likes

Awesome! Thank you very much for sharing!

Does “pause” only work if a zone is currently running? If we’re entertaining in the backyard (as detected by a motion sensor), I’d like to “pause” (i.e., postpone) the start of the zone. That is, I don’t want to start the zone right then, but just postpone it until motion has stopped. Is this “pause” feature capable of postponing in this way, before a zone starts?

It only works for running zones.

:cheers:

Struggling a bit here. I followed the documentation and obtained my API key, which in this CURL syntax above is inserted following “Authorization Bearer…” And replaced the string following id with my person ID. I issue the command from a terminal session and do not receive a response and more importantly, the current watering is not paused. I can pause the watering with Alexa, but was looking for a way to have Curl issue the command when triggered from SmartThings.
Also, I am confused about the difference if any, between my API key which seems to always part of the Authorization Bearer string and a Device ID. I cannot seem to find out how to obtain the device (I assume controller) ID, which can be used in other commands. Thanks in advance!

DId you ever get an answer on this? I have the same question.

No I did not.

Mark Dempsey
Madempsey0907@gmail.com