tonesto7 / homebridge-hubitat-tonesto7

Hubitat Homebridge Plugin
108 stars 34 forks source link
homebridge homebridge-hubitat-tonesto7 homebridge-plugin homekit hubitat

homebridge-hubitat-tonesto7

verified-by-homebridge npm npm npm GitHub repo size

GitHub issues GitHub pull requests

CodeFactor Grade Known Vulnerabilities

GitHub Workflow Status (branch)

Donate

About

V2 of this plugin is a complete rewrite of the homebridge-hubitat-tonesto7 plugin using modern Javascript structure with classes, promises, and arrow functions.

GitHub tag (latest SemVer)

Credits

Big thanks for @Areson for his help/motivation in rewriting this. Another shout out to @nh.schotfam for your help on the optimizations for hubitat.

I also wanted to mention the following projects I referenced for inspiration for a few minor items and fixes:

Change Log:

Hubitat App:

Homebridge Plugin:

Direct Updates from Hubitat

When properly setup, you should see something like this in your Homebridge startup immediately after the PIN:

[11/25/2019, 4:44:46 PM] [Hubitat-v2] Devices to Remove: (0) []
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Devices to Update: (40)
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Devices to Create: (0) []
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Total Initialization Time: (2 seconds)
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Unknown Capabilities: ["Power Source"]
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Hubitat DeviceCache Size: (40)
[11/25/2019, 4:44:46 PM] [Hubitat-v2] WebServer Initiated...
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Sending StartDirect Request to Hubitat | SendToLocalHub: (false)
[11/25/2019, 4:44:46 PM] [Hubitat-v2] Direct Connect Enabled and Listening on 10.0.0.163:8000

Installation

Installation comes in two parts:

1. Hubitat App Installation

Option 1: Automated Install

Option 2: Import from GitHub URL

2. Hubitat App Configuration

3. Homebridge Plugin Installation:

NOTICE: I highly recommend using homebridge-config-ui-x to manage your homebridge instance, plugin and configs. This will allow you to use the web based form to configure this plugin.

  1. Install homebridge using: npm i -g homebridge (For Homebridge Install: Homebridge Instructions)
  2. Install Hubitat plugin using: npm i -g homebridge-hubitat-tonesto7
  3. Update your configuration file using the config generator inside the Hubitat App as the template to copy/paste into platform section of the Homebridge config.json.

Config.json Settings Example

Example of all settings. Not all settings are required. Read the breakdown below.

   {
      "platform": "Hubitat-v2",
      "name": "Hubitat-v2",
      "app_url_local": "http://10.0.0.40/apps/api/",
      "app_url_cloud": "https://cloud.hubitat.com/api/561d981e-f986-4f7f-941d-5d43d1d0e0e1/apps/",
      "app_id": 436,
      "app_platform": "Hubitat",
      "use_cloud": true,
      "access_token": "1888d2bc-7792-1114-9f32-e4724e388a26",
      "communityUserName": "tonesto7",
      "direct_ip": "10.0.0.15",
      "direct_port": 8000,
      "temperature_unit": "F",
      "validateTokenId": false,
      "adaptive_lighting": true,
      "adaptive_lighting_offset": 0,
      "excluded_capabilities": {
         "HUBITAT-DEVICE-ID-1": [
            "Switch",
            "Temperature Measurement"
         ]
      },
      "logConfig": {
         "debug": false,
         "showChanges": true
      }
   }

Frequently Asked Question:

Q: Can this support Axis Blinds? A: Maybe, it can support any device that has the windowShade capability and/or level attributes.

Known Issues:

DONATIONS:

PayPal Donations