homebridge-xfinityhome

A homebridge plugin to control your Xfinity Home security system.

Usage no npm install needed!

<script type="module">
  import homebridgeXfinityhome from 'https://cdn.skypack.dev/homebridge-xfinityhome';
</script>

README

homebridge-XfinityHome

Homebridge-XfinityHome

Still under heavy development

Xfinity Home plugin for Homebridge.

Installation

Automatic Installation

  1. Install Homebridge: sudo npm i -g homebridge --unsafe-perm
  2. Download this plugin: sudo npm i -g homebridge-xfinityhome
  3. Follow Setup
  4. Continue setup using Config-Ui-X
  5. Restart Homebridge

Manual Installation

  1. Install Homebridge: sudo npm i -g homebridge --unsafe-perm
  2. Download this plugin: sudo npm i -g homebridge-xfinityhome
  3. Follow Setup
  4. Enter credentials to your config.json file.
  5. Restart Homebridge

Setup

  1. Follow the instructions on screen
  2. Use the credentials from above, to fill into Homebridge. (Config template below):
"platforms": [
        {
            "platform": "iControl",
            "name": "Xfinity Home",
            "system": "XFINITY_HOME",
            "email": "email@email.com",
            "password": "password_here",
            "pin": "1234",
            "path": "/OPTIONAL/your/absolute/path/persist,
            "refresh_token": "refresh token that you got by using a proxy on your phone"
            "panel_accessories": true,
            "light_accessories": true,
            "contact_accessories": true,
            "motion_accessories": true,
            "device_info": false,
        }
    ]

Path parameter (optional):

Can be an absolute path or relative path - in most cases if you have a spot you know works, just use the absolute path to that folder. If you do not provide a "path" parameter it will default to the relative execution path.

Refresh Token (optional):

Due to recent updates from Comcast on their OAuth flow, it initially looks like it will be tricky to get a full login flow working again. As such I have updated the plugin to accept a refresh token in the configuration which can be captured using a proxy (like proxyman) to intercept the refresh token when your phone app is initially starting up (I was able to see it when booting up the app that was already logged in).

I am not sure how much time I will spend on finding other workarounds or ways forward... as the refresh tokens are very reliable once you have one. The trick is to have a SEPARATE account that Homebridge uses so that the refresh token will not be replaced when you log in to your app with that same account. If there is a need I can point out more helpful instructions for intercepting the tokens, and appologize there is not more that can be done at this time.

Once the refresh token has been used to log in, it can be removed from the config so the internally cached refresh token will be used.

click here for how to find the refresh token using proxyman

Not yet done:

  • Alarm being set off to trigger homekit alarm "triggered" state.
  • Optional ability to add Camera's.

Supports:

  • Alarm Panel (does not yet trigger alarm state in homekit - haven't set my alarm off to test yet)
  • Door / Window sensors (gives live open / close state)
  • "Lights" (outlets) - when these are in dimmable mode homekit will show a dimmer, when in on/off mode you will only get a switch.
  • Motion sensors - these only trigger motion notices when the alarm is set for away mode

Does not support:

  • Camera's - coming soon (hopefully)

Credits:

Original by wylanswets