npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-homekit-control

v0.2.7

Published

Homebridge Homekit Control allows you to control HomeKit-enabled Devices directly from within HomeBridege. (Based on previous versions develped by MartinPham and frank.bauer)

Downloads

152

Readme

Homebridge HomeKit Control

verified-by-homebridge npm downloads donate

HomeKit Control lets you control Apple HomeKit Exclusive accessories through Homebridge, This is especially useful to gain all the benefits of Homebridge alongside controlling them using other services and plugins through Homebridge, such as:

  • Google Assistant (using homebridge-gsh plugin)
  • Amazon Alexa (using homebridge-alexa plugin)
  • and many more...

Supported Devices

The Plugin currently supports the following Services provided by WLAN-based HomeKit enabled devices:

  • Switch
  • Outlet
  • Motion Sensors
  • Temperatur Sensors
  • Humidity Sensors
  • CO2 Sensors
  • Carbon Monoxid Sensors
  • Air Quality Sensors
  • Ambient Light Sensors
  • Light Bulbs
  • Battery/Charging State
  • Garage Door Opener (Thanks to vmummer)

Please note that BLE is currently not supported, as it seems to be unstable when multiple BLE-enabled Plugins are installed. All supported sensors on any configured device are automatically discovered and added when Homebridge starts up.

Install

sudo npm i -g homebridge-homekit-control

Pairing Devices

To pair your devices with Homebridge HomeKit Control, follow these steps:

  1. Discover Devices:

    homekitPair
    • You could also: homekitPair [network] [interface], for example: homekitPair -i wlan0
  2. Select the device you want to pair, and enter the pairing code (including -, example 123-45-678).

  3. Enter a filename to save pairing information in JSON format.

  4. In the JSON file, you'll find the following information:

    {
        "id": "device id",
        "name": "device name",
        "address": "device ip",
        "port": device-port,
        "pairingData": {
            "AccessoryPairingID": "xxx",
            "AccessoryLTPK": "xxx",
            "iOSDevicePairingID": "xxx",
            "iOSDeviceLTSK": "xxx",
            "iOSDeviceLTPK": "xxx"
        },
        "accessories": {
            "accessories": [...]
        }
    }
  5. Note down the "id", "name", "address", "port" and "pairingData" from the JSON file.

  6. Go to Plugins page and Click on the SETTINGS button under Homebridge Homekit Control and fille out the information we noted from the JSON file in the previous steps

    • For further information, please refer to the Config section for details.

Config

This Plugin supports the Configuration Interface in Homebridge UI (homebridge-config-ui-x). Simply add a new Device and paste the values you obtained above.

Here are some additional configuration parameters, not obtained by the Device Pairing:

  • services.enableHistory (boolean): true will enable fakeGato for compatible Sensors. This will allow you to view a history in the EVE-App
  • services.historyInterval (optional, numeric): Determins the Interval used to take readings. The valus range is [30, 600]. The default value is 600
  • services.proxyAll(optional, boolean): By default we only proxy tested services and characteristics from your devices. When this mode is enabled, all available services and characteristics are proxied. Be carefull when activating, this may cause damage to your devices. The default value is false
  • services.uniquePrefix(optional, string): When a device is added to multiple HomeBridge instances in the same network, you will need to provide a unique prefix. Otherwise Eve-App will get confused.

Example

{
    "platforms": [
        {
            "platform": "HomekitControl",
            "services": [
                {
                    "id": "device id",
                    "name": "device name",
                    "address": "device ip",
                    "port": "device port",
                    "enableHistory": false,
                    "pairingData": {
                        "AccessoryPairingID": "xxx",
                        "AccessoryLTPK": "xxx",
                        "iOSDevicePairingID": "xxx",
                        "iOSDeviceLTSK": "xxx",
                        "iOSDeviceLTPK": "xxx"
                    }
                }
            ]
        }
    ]
}

How to fix Known Errors:

if you get the error M2: Error: 6:

  1. Add the device to your Homekit
  2. Once the device is added and connected to your Wifi network
  3. Remove device from your Home
  4. Device should still be connected to your Wifi (check it from your router's connected clients)
  5. Run the homekitPair command in your Homebridge and enter the pin
  6. And voila, you get the JSON

Tested Accesories

(!!! Use at your own risk !!!)

  • Quingping Air Monitor Lite (Cleargrass Luftdetektor Lite, Cleargrass Air Monitor Lite)
  • Nanoleaf Aurora / Light Panels
  • Gardena Smart Control Hub
    • Gardena Smart Irrigation Control
    • Gardena Smart Sensor II

Please let me know if you use this plugin and got it to work with a new HomeKit-Accesory that is not listed above

Building for developers

The project was converted to the build system from https://github.com/homebridge/homebridge-plugin-template. Visual Studio Code is set up to lint on save.

Using npm run dev will launch the develop environment, where your code is automatically compiled on save and the local homebridge server is automatically restarted.

The command npm rund build will trigger the compilation of your project manually.