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-yeelight-wifi

v3.0.1

Published

Homebridge plugin for YeeLight bulbs & lamps.

Downloads

146

Readme

Homebridge YeeLight Wi-Fi

YeeLight plugin for Homebridge supporting Wi-Fi lighting devices.

This allows you to control your YeeLight Wi-Fi devices, such as the YeeLight Bulb, Stripe, Ceiling Lights, Star Lamp, etc. with HomeKit and Siri.

Implements Yeelight WiFi Light Inter-Operation Specification.

Requirements

  • Node.js >= 7.6.0
  • Avahi

Installation

  1. Install homebridge, sudo npm install -g homebridge
  2. Install this plugin using, npm install -g homebridge-yeelight-wifi

Setting up devices

Devices that already have the API enabled should be autodiscovered without any other actions on your part.

However, out of the factory, the YeeLight devices do come with the API disabled, and you will have to enable it for them to work with Homebridge. To do so, go to settings and enable Developer Mode.

Configuration (minimal)

Add the following to your homebridge config:

{
  "platforms": [
    {
      "platform": "yeelight",
      "name": "Yeelight"
    }
  ]
}

Configuration (Optional)

The following parameters can be changed in case you need to change the defaults. The blacklist key can be an array of capabilities you do not want to expose to HomeKit or true to not expose the device at all.

{
  "bridge": {
    "name": "Raspberry Pi"
  },
  "accessories": [{}],
  "platforms": [
    {
      "platform": "yeelight",
      "name": "Yeelight",
      "transitions": {
        "power": 400,
        "brightness": 400,
        "color": 400,
        "temperature": 400
      },
      "connection": {
        "retries": 5,
        "timeout": 100
      },
      "multicast": {
        "interface": "0.0.0.0"
      },
      "defaultValue": {
        "aed78s": {
          "name": "Kitchen",
          "blacklist": ["set_hsv"]
        }
      }
    }
  ]
}

Motivation

When I got my first YeeLight bulb, there was already a homebridge plugin supporting it, however, it did not deal with transient failures. Frequently I would turn on a lamp, it would report it as On but no sign of light could be seen. Manually turning the lamp off and on would solve the issue but was a nuisance.

This plugin was born to solve this issue and end up being a complete rewrite fixing a lot of other bugs and minor problems and also implementing a cleaner architecture.

This plugin keeps track of all your commands until a successful response is received from the lamp. It implements exponential backoff to retry commands to which no response was received or a failure was reported by the lamp.

It also keeps track of known lamps and will continue to ocasionally look for them if they suddenly disappear. This is useful when you accidentally power off a lamp and later turn it on.

Bugs and feature requests

Please report any issues you might find, on GitHub.

Feature requests and specially pull requests are very welcome.

Developing

During development run Homebridge locally in debug mode using the following command:

yarn start

This will run testing instance of Homebridge in the plugin directory, so it won't mess up your normal Homebridge installation.

Add it as a separate bridge in the Home.app (+ Add Accessory).

After you're done with development, you can remove the bridge from Home.app: Home -> 🏠 -> Hubs & Bridges. Choose "Yeelight Platform Development" and then "Remove Bridge From Home".