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-milight-hub

v2.0.0

Published

Homebridge plugin for Milight Hub hosted on ESP8266

Downloads

17

Readme

homebridge-milight-hub

This allows HomeKit (Siri) to control your MiLights using Homebridge and DIY Milight Hub hosted on ESP8266 (or equivalent).

This plugin is intended to be used with DIY Milight Hub RF to Wifi setup. If you already have Milight 2.4G RF Bridge, then you should directly use homebridge-milight plugin.

Installation

To begin, you will need the following:

  1. A working installation of Homebridge. Homebridge is a nifty software platform running on any computer or even a Raspberry Pi and allows you to integrate with smart home devices that do not support the HomeKit protocol.

  2. A working setup of Milight Hub on an ESP8266 IoT SOC (NodeMCU, etc.)

If you have the above two working, then the rest is as simple as installing this plugin and configuring the lights.

Installing using Homebridge Config GUI

The Homebridge Config UI X support of this plugin makes it super easy to install and configure this plugin. If you have Homebridge Config UI installed, the following steps will get you started:

  1. Open your Homebridge Config UI page in your browser (usually http://homebridge.local) and navigate to the "Plugins" section on top navigation area
  2. In the prominent search box within plugin section, search for "Milight Hub" and you would see one listed from the author @shamasis. Click "install".
  3. It should complete installation and present you with a settings screen. Use the instructions on the settings screen to configure your Milights.

Installing without Homebridge Config UI

Within your homebridge system, install the plugin using the command:

npm install homebridge-milight-hub -g;

Once the plugin is installed, edit homebridge config.json to include the following within platforms section. The following are the minimum required configuration parameters:

  • The "platform" property must have "Milight Hub" as value
  • There should be a "hub" property with it's value pointing to the URL of your hub (usually http://milight-hub.local.)
{
  "platforms": [{
    "platform": "Milight Hub",
    "hub": "http://milight-hub.local",
    "devices": [ ]
  }]
}

Configuring bulbs in config

The "devices" section in the config will be the place where you will define each bulb. The config of one bulb would need a "displayName" to name the bulb and few other configuration values.

{
  "displayName": "Kitchen Walkway Lamp",
  "deviceId": "0x1019",
  "remoteType": "rgb_cct",
  "deviceGroup": 1
}
  • "deviceId" is the numeric identifier of the bulb as paired with the remote.
  • "remoteType" can be the remote type Milight Hub is to emulate, such as "fut089" (default), "rgb", etc
  • "deviceGroup" is the numeric representation of what group you want to put this bulb in. (Setting this to 0 would trigger all bulbs with same deviceId.)

Repeat this for as many bulbs as you have.

Using automatic bulb discovery from the hub.

If you are directly using the Milight Hub's web interface to device devices, those can be automatically brought over to HomeKit by setting the "autoDiscoverDevices": true in the platform config.

{
  "platforms": [{
    "platform": "Milight Hub",
    "hub": "http://milight-hub.local",
    "autoDiscoverDevices": true
  }]
}

Usage

Once the plugin is installed and Homebridge restarted, the bulb should appear within the Home app of your iOS devices.

Important usage information

  • This plugin requires you to restart Homebridge to apply any config change
  • Using the IP Address of the hub in config improves performance
  • This hub maintain's it's own state of the bulbs. In case you see them out of sync, make changes (such as toggle power) on Home App and it shoud re-sync.