I’m developing the openHAB binding for the Rachio controllers. Using a Java servlet I have events / webhooks running. This is no problem in general, but lack of the JSON format makes debugging stretchy - you need to wait on special events before you could analyze the JSON string and see the event types + attributes. Rachio support promised that the V3 API documentation includes that information, but it does not, or at least I was not able to find it. Be ware: Rachio changed the V3 JSON format significantly compared to V2!
Currently I’m fighting with Rachio’s support of https-based webhooks. After turning on Jetty debugging I saw that the request is coming, but the certificate could not be validated. Jetty displays a “alert: certificate unknown”. I tried https://mqtt.rach.io in the browser, which has the same result. I saw that the chain is still including Symantec certificates, which are no longer valid and would explain the problem. However, Rachio support commented that tis URL is not used by the webhook interface?
So for the first steps make sure that you are using a http (not https) webhook. It supports a private port by adding :xxxx and a URI path (e.g. http://mydomain.com:xxxx/rachio-webhook). The servlet could be registered specifically for this URI. Make sure that your firewall is forwarding this request to your smart home device. Don’t know yet if the https callback URL also supports the :xxxx notation.
Questions to Rachio:
- Which certificate is used for the included certificate on the https call?
- What is the format of ALL event JSONs?
- Is there a reason why different timestamp formats are used in the JSON format?
- The JSON format contains many redundant information. Is there recommendation, which attributes to use?