Trouble Receiving Events For Device Entity,

Here is the curl command I’m using.

curl -X GET -H “Content-Type: application/json” -H "Authorization: Bearer :TOKEN " https://api.rach.io/1/public/device/:DeviceID/event?startTime=1449002895000&endTime=1451508495000

I keep getting {“error”:“endTime can not be null.”,“code”:“301”}

Also, is there a way to get the current status of a zone. As in whether or not a particular is running? Not that the schedule is running, but individual zone status?

Any help is appreciated.

I bet it is the syntax and endTime is getting cut off. Try using single quotes for 'http… ’

curl -X GET -H “Content-Type: application/json” -H “Authorization: Bearer my_token” ‘https://api.rach.io/1/public/device/my_device_id/event?startTime=1414818000000&endTime=1415739608103

Currently no but don’t think it would be too difficult to add.

We have this endpoint to retrieve zone information. Thoughts on adding something like isWatering to the response?

What is the use case for this?

Thanks!

:cheers:

Thank you the single quotes, that did the trick.

As for isWatering

The framework for our integration’s rely on real time status. This allows us to send notifications or trigger events based on status changes. This piece of information would help our system integrate better with Rachio.

In this case, would you have to poll every zone on the device frequently to watch for status change?

:cheers:

Yes, unless the device info json with all the zone’s info had it. Then only 1 call for all zones. How often would be too often?

I think the best way to do this for now is to use this endpoint:

This will show you the current schedule running along with zone information.

Thanks!

:cheers: