API - Rain Skip Alert


#1

Hello -

I’m trying to find out how I can pull the rain skip alerts (similar to the email ones) for my account. I’ve built a status board and I would like to have rain and other skips appear on it so that everyone is aware of when the system will operate as it should and when the system is skipping due to rain or other weather events.

I’ve looked through the API documentation and can’t seem to find a reference to it. With everything that’s in the API, I would be surprised if this is not included.

Thanks,

Squid


#2

I believe the webhooks will work for you.

:cheers:


#3

@franz

Have you been able to check into this as Weather Intelligence, Rain Delay, and Water Budget are not reporting back any data.


#4

We do not support water budget notifications in V3.

Rain Delay is working:

{
“summary” : “No scheduled waterings will run on controller Rachio-DB6769 until Thursday, September 27 11:07 AM (MDT).”,
“routingId” : “ab821917-17d1-47f0-b775-c327844f3d71”,
“icon” : “SCHEDULE”,
“timeZone” : “America/Denver”,
“eventType” : “RAIN_DELAY_EVENT”,
“type” : “RAIN_DELAY”,
“title” : “Delay Watering ON”,
“deviceId” : “ab821917-17d1-47f0-b775-c327844f3d71”,
“deviceName” : “Rachio-DB6769”,
“dateTimeForSummary” : “Thursday, September 27 11:07 AM (MDT)”,
“tierLevel” : “THREE”,
“startTime” : “2018-09-26T17:07:08.205Z”,
“subType” : “RAIN_DELAY_ON”,
“endTime” : “2018-09-27T17:07:08Z”,
“id” : “f2183af8-3e76-382e-a057-1fd848262a28”,
“iconUrl” : “https://media.rach.io/v3_dev_event_icons/delay_water”,
“category” : “DEVICE”,
“timestamp” : “2018-09-26T17:07:08.205Z”
}

{
“summary” : “Scheduled waterings will now run on controller Rachio-DB6769.”,
“routingId” : “ab821917-17d1-47f0-b775-c327844f3d71”,
“icon” : “SCHEDULE”,
“timeZone” : “America/Denver”,
“eventType” : “RAIN_DELAY_EVENT”,
“type” : “RAIN_DELAY”,
“title” : “Delay Watering OFF”,
“deviceId” : “ab821917-17d1-47f0-b775-c327844f3d71”,
“deviceName” : “Rachio-DB6769”,
“dateTimeForSummary” : “Wednesday, September 26 11:09 AM (MDT)”,
“tierLevel” : “THREE”,
“startTime” : “2018-09-26T17:09:56.082Z”,
“subType” : “RAIN_DELAY_OFF”,
“endTime” : “2018-09-26T17:09:55Z”,
“id” : “19c348d0-cc36-315c-bfcc-43e4ae7ee354”,
“iconUrl” : “https://media.rach.io/v3_dev_event_icons/delay_water”,
“category” : “DEVICE”,
“timestamp” : “2018-09-26T17:09:56.082Z”
}

Weather intelligence also seems to be working:

{
“scheduleName” : “Test WI”,
“routingId” : “ab821917-17d1-47f0-b775-c327844f3d71”,
“climateSkip” : true,
“icon” : “SCHEDULE”,
“smartCycle” : false,
“threshold” : 1.5,
“type” : “WEATHER_INTELLIGENCE”,
“title” : “Test WI Rain Skip”,
“deviceId” : “ab821917-17d1-47f0-b775-c327844f3d71”,
“observed” : 27.94,
“includeAllWeatherStations” : true,
“rainDelayEnabled” : true,
“weatherIntelligencePlus” : false,
“startTime” : “2018-09-26T18:35:00Z”,
“id” : “ade33f25-ff98-35c5-a89f-21ffe4db8db4”,
“seasonalShift” : true,
“iconUrl” : “https://media.rach.io/v3_dev_event_icons/rain_skip”,
“weatherServiceType” : “IBM”,
“scheduleId” : “48045643-5e04-4c2a-8a6b-78c32dfb5fcc”,
“predicted” : 0.0,
“timestamp” : “2018-09-26T18:36:08.747Z”,
“weatherStationId” : “KOKNORMA42”,
“stationId” : “weather station”,
“scheduleCountdown” : “DONE”,
“summary” : “Test WI was scheduled for 9/26 at 01:35 PM (CDT), but was skipped due to KOKNORMA42 which observed 27.94 mm precipitation compared to schedules’s threshold of 1.5 mm. To learn more about rain skip, select the “?” icon above.”,
“freezeDelayEnabled” : true,
“skipId” : “95a84056-377d-4abf-9a6e-3b99542852da”,
“timeZone” : “America/Chicago”,
“timeForSummary” : “01:35 PM (CDT)”,
“eventType” : “HISTORICAL_RAIN_SKIP_EVENT”,
“dateForSummary” : “9/26”,
“convertToImperial” : false,
“windDelayEnabled” : true,
“subType” : “WEATHER_INTELLIGENCE_SKIP”,
“cycleSoak” : false,
“category” : “WEATHER”,
“currentValue” : 27.94
}


#5

Hi @franz,

I use the following code to register the webhooks. I’m able to get zone start/stop events, but I never saw the WEATHER_INTELLEGENCE events coming in.

public static final String APIURL_BASE = “https://api.rach.io/1/public/”;
public static final String APIURL_DEV_POST_WEBHOOK = “notification/webhook”; // Register WebHook for Device

public static final String WHE_DEVICE_STATUS = "5"; // "Device status event has occurred"
public static final String WHE_RAIN_DELAY = "6"; // "A rain delay event has occurred"
public static final String WEATHER_INTELLIGENCE = "7"; // A weather intelligence event has has occurred
public static final String WHE_WATER_BUDGET = "8"; // A water budget event has occurred
public static final String WHE_SCHEDULE_STATUS = "9";
public static final String WHE_ZONE_STATUS = "10";
public static final String WHE_RAIN_SENSOR_DETECTION = "11"; // physical rain sensor event has coccurred
public static final String WHE_ZONE_DELTA = "12"; // A physical rain sensor event has occurred
public static final String WHE_DELTA = "14"; // "An entity has been inserted, updated, or deleted"

    String jsonData = "{ " +
            "\"device\":{\"id\":\"" + deviceId + "\"}, " +
            "\"externalId\" : \"" + externalId + "\", " +
            "\"url\" : \"" + callbackUrl + "\", " +
            "\"eventTypes\" : [" +
            "{\"id\" : \"" + WHE_DEVICE_STATUS + "\"}, " +
            "{\"id\" : \"" + WHE_RAIN_DELAY + "\"}, " +
            "{\"id\" : \"" + WEATHER_INTELLIGENCE + "\"}, " +
            "{\"id\" : \"" + WHE_WATER_BUDGET + "\"}, " +
            "{\"id\" : \"" + WHE_ZONE_DELTA + "\"}, " +
            "{\"id\" : \"" + WHE_SCHEDULE_STATUS + "\"}, " +
            "{\"id\" : \"" + WHE_ZONE_STATUS + "\"}, " +
            "{\"id\" : \"" + WHE_RAIN_SENSOR_DETECTION + "\"}, " +
            "{\"id\" : \"" + WHE_DELTA + "\"} " +
            "]" +
            "}";
    httpApi.httpPost(APIURL_BASE + APIURL_DEV_POST_WEBHOOK, jsonData);

any idea?


#6

What does this return?

:cheers:


#7

[{“id”:5,“name”:“DEVICE_STATUS_EVENT”,“type”:“WEBHOOK”},
“id”:10,“name”:“ZONE_STATUS_EVENT”,“type”:“WEBHOOK”},
“id”:6,“name”:“RAIN_DELAY_EVENT”,“type”:“WEBHOOK”},
“id”:7,“name”:“WEATHER_INTELLIGENCE_EVENT”,“type”:“WEBHOOK”},
“id”:9,“name”:“SCHEDULE_STATUS_EVENT”,“type”:“WEBHOOK”},
“id”:11,“name”:“RAIN_SENSOR_DETECTION_EVENT”,“type”:“WEBHOOK”},
“id”:8,“name”:“WATER_BUDGET”,“type”:“WEBHOOK”},
{“id”:12,“name”:“ZONE_DELTA”,“type”:“WEBHOOK”},
{“id”:14,“name”:“DELTA”,“type”:“WEBHOOK”}]


#8

Those look correct. Are you sure you have your listening endpoint setup correctly and that there were weather intelligence events? According to my post above things seem to be working correctly.

:cheers:


#9

I‘m receiving zone start/stop events, schedule informarion etc., so the endpoint should work correctly.

The default handlung is to dump the event for unknown event types, but I see nothing in the log nor the expected events while the Rachio app showed them.

Is there a server side event history?


#10

After webhook registration the following events are returned for the given deviceId:
[
{“id”:“f4271405-218d-43a8-bc9b-xxxxxxxx”,
“url”:“http://mmi-home.xxxx.de:xxxxx/rachio/webhook”,
“eventTypes”:[
{“name”:“ZONE_STATUS”,“type”:“WEBHOOK”},
{“name”:“WEATHER_INTELLIGENCE”,“type”:“WEBHOOK”},
{“name”:“SCHEDULE_STATUS”,“type”:“WEBHOOK”},
{“name”:“RAIN_DELAY”,“type”:“WEBHOOK”},
{“name”:“DELTA”,“type”:“WEBHOOK”},
{“name”:“DEVICE_STATUS”,“type”:“WEBHOOK”},
{“name”:“ZONE_DELTA”,“type”:“WEBHOOK”}
],
“externalId”:“29ab161e38984bdce13fb978xxxxxxxx”
},
]

so should be active incl. WEATHER_INTELLIGENCE and RAIN_DELAY; WATER_BUDGET is not listed, but that’s ok if it’s no longer supported by the V3 API.