Giter VIP home page Giter VIP logo

homebridge-yeelighter's Introduction

Welcome to homebridge-yeelighter ๐Ÿ‘‹

Version License: MIT Twitter: cellcortex

Yeelight support for Homebridge: https://github.com/nfarina/homebridge with particular focus on supporting the special features of ceiling lights.

There are many plugins for Yeelight already. This one is unique (so far) in supporting the background light that some yeelights have and also has a diffent approach to the moonlight mode (exposed as just another range for brightness).

If a light supports a background light, it will show up as a secondary service in the light accessory. If a light supports moonlight mode, the brightness will be adjusted so that the lower 50% are reserved for moonlight brightness and the upper 50% are using the "normal" mode. While this makes it simple to control the moonlight mode, it has the small drawback that setting the color-temperature will only work when in the normal light mode. I could not find an API to set the color temperature of the moonlight.

๐Ÿ  Homepage

Prerequisites

  • node >=10.0.0
  • homebridge >=0.2.0

Installation

You might want to update npm through: $ sudo npm -g i npm@latest

Install homebridge through: $ sudo npm -g i homebridge

Follow the instructions on GitHub to create a config.json in ~/.homebridge, as described;

Install the homebridge-hue plugin through: $ sudo npm -g i homebridge-yeelighter

Edit ~/.homebridge/config.json and add the yeelighter platform provided by homebridge-yeelighter, see Configuration;

Configuration

In homebridge's config.json you need to specify homebridge-yeelighter as a platform plugin. Furthermore, you need to specify what you want to expose to HomeKit. The simplest form is show below. This will enable the plugin and add all lights with their detected configuration to homekit.

"platforms": [
  {
    "platform": "Yeelighter",
    "name": "Yeelighter",
    "timeout": 5000,
    "interval": 60000
  }
]

The plugin supports setting the configuration through homebridge-config-ui-x.

You can use the override array to override the automatic configuration of the lights. An example for disabling the light with id 0x00000000deadbeef and enabling moonlight and disabling background for 0x0000000012345678:

"platforms": [
  {
    "platform": "Yeelighter",
    "name": "Yeelighter",
    "override": [
      {
        "id": "0x00000000deadbeef",
        "ignored": true
      },
      {
        "id": "0x0000000012345678",
        "background": false,
        "nightLight": true
      }
    ]
  }
]

Optional per light configuration:

  • id: string (mandatory) - the id of the light (as reported in the device config of homebridge)
  • name?: string (optional) - the name to be used in log messages
  • color?: boolean (optional) - this light is full RGB color
  • backgroundLight?: boolean (optional) - this light has a secondary color mood light
  • nightLight?: boolean (optional) - this light supports moonlight mode
  • log?: boolean (optional) - enalbe detailed logging for this light
  • offOnDisconnect?: boolean (optional) - switch the light off in homekit when it disconnects (this is for people with old-school wall switches)
  • colorTemperature?: { min: number, max: number } (optional) - colorTemperature limits in kelvin

Setting up the lights

Make sure to enable "LAN control" for the lights you want to control. This is done in the Yeelight app either when setting up the light or in the lights settings which hide behind the โ - button.

There are existing configurations for a number of lights. If your light is not supported, it will hopefully fall back to a decent fallback configuration. You can use the settings to fine-tune it. In those cases, it would be great if you could open a ticket in the issues page including the homebridge logs for the light being setup so the configuration can be added for future users.

Author

๐Ÿ‘ค Thomas Kroeber

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a โญ๏ธ if this project helped you!

homebridge-yeelighter's People

Contributors

cellcortex avatar heldr avatar dependabot[bot] avatar 98827ddb7e5a2c2e261912a23d9251d6 avatar josiasmontag avatar nmac427 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.