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

@uboness/homebridge-dirigera

v0.1.19

Published

IKEA DIRIGERA Homebridge Plugin

Downloads

69

Readme

Homebridge Plugin for IKEA DIRIGERA Hub

!! Experimental !!

Currently supports the following device types:

  • light
  • blinds
  • leak sensor
  • motion sensor
  • outlet
  • contact sensor

Settings

Multiple hubs can be configured, where each hub entry has the following settings:

  • host (required) - specifies the host/IP of the DIRIGERA hub on your local network
  • token (optional, yet highly recommended) - specifies the authentication token to the hub. If not specified, the startup will be halted until you press on the pairing button of the hub. Then the authentication token will be resolved and printed in the logs - it is reommended to copy this token and store it in the settings, to avoid the creation of multiple tokens. Also, this way Homebridge won't halt during restart.
  • name (optional) - will be set as the name of the hub (in the logs). When not set, the name is resolved from the hub itself.

A typical record in the Homebridge config should look like this:

{
  "hubs": [
    {
      "host": "<ip>",
      "token": "<auth_token>",
      "name": "Living Room"
    }
  ],
  "platform": "Dirigera"
}

!!! DANGER - USE AT OWN RISK !!!!

Sometimes you may find the need to pair non-ikea accessories with Dirigera. In these scenarios, since these are non-native accessories, Dirigera might recognize them as different accessory/service types. For example, a switch may be recognized as lights. If this happens, you can "force" the plugin to expose certain services as other services. For that, you'd need to follow the following steps:

  1. Configure dirigera as normal and let homebridge pick up the devices as always.
  2. Choose the device you'd like to change by looking its ID in the logs. You want to look for a line that looks like this:
[Dirigera] [Roof] registering [light][c3a531cf-bc23-4786-b465-72bf9415a588_2] device [My Switch]

!!! Read carefully the following step - DO NOT PREMATURELY RESTART HB if you wish to avoid ssh'ing into your device to fix it !!!

  1. now, add the following "devices" field to the hub configuration (DO NOT RESTART HOMEBRIDGE YET):
{
    "host": "...",
    "token": "...",
    "name": "...",
    "devices": {
        "c3a531cf-bc23-4786-b465-72bf9415a588_2": {
            "asSwitch": true
        }
    }
}
  1. Now that you have this configuration (AND YOU DID NOT RESTART YET), copy the whole hub configuration, save it somewhere and remove this hub definition form the configuration.
  2. Now you can restart - this will completely remove all accessories that were previously created for this hub.
  3. After restart, edit the config.json again and add back the hub definition you modified earlier.
  4. Restart homebridge. Your device should not be published as a switch

Why all this hassle? Once HB registered your device as one service type, it is cached, and it cannot change it anymore. The device first needs to be unregistered before it's registered again as a different service. Since I'm too lazy right now to code the appropriate logic to do this un-registration automatically. I offer you a brut force approach which works for me (until it doesn't).