valiquette / homebridge-rachio-irrigation

Provides Homebridge support for Rachio controller
MIT License
21 stars 4 forks source link

homebridge-rachio-irrigation

verified-by-homebridge
Rachio Irrigation System platform plugin for Homebridge.
Supporting

Notes on the Smart Hose Timer

The Smart Hose Timer is currently not suppoerted by Webhooks or WebSocket. Updates will rely on polling.
The plugin will only poll when there is a request from Homebridge or Homekit to get an update. API activity can be viewed in the debug log and there are configurations to tweak this. Battery support is limited to good and bad which traslated to 100% and 10%. The bridge is worthless to expose, but my plan is to use that as the device for an irrigation system where the hose timer are the zones. Hoping Rachio improves the new API

About

This plugin provides multiple options for use in HomeKit
Both option have additional switches as options for Standby mode and a Run All along with any Rachio Schedules

  1. Irrigation System Accessory with zones that are linked (default in configuration)
  2. Irrigation System Accessory with separate zones shown as a single tile
  3. Irrigation System Accessory with separate zones shown as a separate tiles (option in HomeKit)


There are plus and minus to each, so why not have options.
If you have more than one home on your Rachio account you may filter devices for a home based on the street address for the location you want to display in HomeKit.
If you are configuring more than one Homebridge instance, you will want to use a unique accessory name.
Rachio caluclated runtimes based on your zones configuration, these runtimes can be used for the inital runtimes seen in HomeKit.

Screenshots


API Key

You can acquire your API key from Rachio io.app documented here.

Notes on Webhooks

homebridge-rachio-irrigation requires webhooks to update HomeKit accessory status in real time such as a defined schedule from the Rachio app.

Only configure one webhook method at a time, if more than one is configured Webhook Relay will be used.

Port fowarding

Setting up webhooks, the easy way (if your router supports it):

Relay service

If you cannot setup port forwarding on your router (or don't want to):

The startup log will show if the configuration is correct and working.

If you see log messages like Webhook received from an unknown external id, you may set the clear_previous_webhooks flag to true to remove previous webhooks before creating or updating the webhook for this plugin. Note: this will clear all webhooks tied to your Rachio API key, so be careful if you rely on Rachio webhooks apart from this plugin.

Installation

  1. Install this plugin using: npm install -g homebridge-rachio-irrigation
  2. Suggest running as a child bridge
  3. Use plugin settings to edit config.json and add your account detail.
  4. Run Homebridge
  5. Pair to HomeKit

Config.json example with child bridge

{
    "name": "Rachio-Dev",
    "api_key": "8e600a4c-0027-4a9a-9bda-abc8d5c90350",
    "location_address": "123 Main St",
    "default_runtime": 3,
    "runtime_source": 2,
    "use_irrigation_display": true,
    "show_standby": true,
    "show_runall": true,
    "show_schedules": true,
    "external_IP_address": "76.76.73.37",
    "internal_IP_address": "127.0.0.1",
    "external_webhook_port": 12454,
    "internal_webhook_port": 27544,
    "use_basic_auth": true,
    "https": false,
    "key": "/somepath/key.pem",
    "cert": "/somepath/cert.pem",
    "user": "username",
    "password": "password",
    "delete_webhooks": false,
    "showAPIMessages": false,
    "showWebhookMessages": false,
    "valveType": 0,
    "showBridge": false,
    "showControllers": true,
    "showValves": true,
    "liveRefreshTimeout": 2,
    "liveRefreshRate": 20,
"_bridge": {
        "username": "0E:79:49:DC:71:A9",
        "port": 46062
    },
    "platform": "rachio"
}