All Projects → sahilchaddha → homebridge-yeelight-platform

sahilchaddha / homebridge-yeelight-platform

Licence: MIT license
Homebridge plugin for Yeelight Lights supporting Scenes/Moods/Color Flow/Custom Presets/Music Flow/Night Mode

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to homebridge-yeelight-platform

Homebridge Dafang
Homebridge Plugin for Xiaomi Dafang / Wyze Cam IP Camera => Hey Siri, Start Video Recording
Stars: ✭ 176 (+232.08%)
Mutual labels:  homebridge, homebridge-plugin, xiaomi, homekit, siri
homebridge-deebot
Homebridge plugin to integrate ECOVACS Deebot devices into HomeKit.
Stars: ✭ 39 (-26.42%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
awesome-homebridge
Popular list of Homebridge Plugins
Stars: ✭ 106 (+100%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
homebridge-wink3
Homebridge plugin for wink.com
Stars: ✭ 53 (+0%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
homebridge-dyson-fan
A Homebridge plugin for controlling a Dyson fan.
Stars: ✭ 17 (-67.92%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
Homebridge Platform Wemo
Homebridge plugin to control Wemo devices.
Stars: ✭ 173 (+226.42%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
homebridge-magichome-platform
Homebridge Plugin for MagicHome LED Strips with Preset Scene Automation Support (Cycle Color/Fade/Strobe)
Stars: ✭ 46 (-13.21%)
Mutual labels:  homebridge, homebridge-plugin, scene, preset
Homebridge Govee
Homebridge plugin to control Govee devices supported by the official Govee API.
Stars: ✭ 33 (-37.74%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
Homebridge Mi Hygrothermograph
Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
Stars: ✭ 179 (+237.74%)
Mutual labels:  homebridge, homebridge-plugin, xiaomi, homekit
Homebridge Ewelink
Homebridge plugin to control eWeLink devices with original firmware.
Stars: ✭ 208 (+292.45%)
Mutual labels:  homebridge, homebridge-plugin, homekit, siri
homebridge-securitysystem
Homebridge plugin that creates a security system accessory that can be triggered by HomeKit sensors.
Stars: ✭ 114 (+115.09%)
Mutual labels:  homebridge, homebridge-plugin, homekit
homebridge-mijia-camera
Homebridge plugin for the Xiaomi Mijia 1080P Smart IP Camera, also known as Mi Home Security Camera.
Stars: ✭ 35 (-33.96%)
Mutual labels:  homebridge, homebridge-plugin, xiaomi
homebridge-vieramatic
Homebridge plugin for Panasonic™ Viera™ TVs (includes support for 2018 and later models)
Stars: ✭ 39 (-26.42%)
Mutual labels:  homebridge, homebridge-plugin, homekit
homebridge-callmonitor
Signals incoming and outgoing calls using the call monitor facility in Fritz!Box devices via HomeKit
Stars: ✭ 25 (-52.83%)
Mutual labels:  homebridge, homebridge-plugin, homekit
homebridge-vsx
📻 A VSX and SC Plugin for homebridge
Stars: ✭ 12 (-77.36%)
Mutual labels:  homebridge, homebridge-plugin, homekit
homebridge-z2m
Expose your Zigbee devices to HomeKit with ease, by integrating 🐝 Zigbee2MQTT with 🏠 Homebridge.
Stars: ✭ 197 (+271.7%)
Mutual labels:  homebridge, homebridge-plugin, homekit
homebridge-zigbee
ZigBee Platform plugin for HomeBridge
Stars: ✭ 101 (+90.57%)
Mutual labels:  homebridge, xiaomi, homekit
homebridge-adb
Homebridge script to control remote ADB enabled Android device
Stars: ✭ 56 (+5.66%)
Mutual labels:  homebridge, homebridge-plugin, homekit
homebridge-nature-remo-cloud-aircon
Homebridge Plug-in for Air Conditioner Managed by Nature Remo
Stars: ✭ 28 (-47.17%)
Mutual labels:  homebridge, homebridge-plugin, homekit
AVPlayerItemHomeOutput
Coordinate the output of content associated with your HomeKit lightbulbs. #Ambilight
Stars: ✭ 38 (-28.3%)
Mutual labels:  homebridge, homebridge-plugin, homekit

homebridge-yeelight-platform

NPM

npm npm CircleCI

Homebridge plugin for Yeelight Lights supporting Scenes/Moods/Color Flow/Custom Presets/Music Flow/Night Mode

Description

Installation

    $ npm install -g --unsafe-perm homebridge
    $ npm install -g --unsafe-perm homebridge-yeelight-platform

Edit config.json. Refer to config-sample.json.

Available Presets Scenes

  night_mode
  birthday_party
  candle_flicker
  disco
  flash_notify
  police_1
  police_2
  alarm
  gaming
  calm
  
  custom

Writing Custom Color Flow

If you want to write a custom flow, scene should be custom in config.json. Also provide params paramameter.

Example :

     {
        "name": "Dark Cave",
        "scene": "custom",
        "params": "2000,1,255,70,2000,1,255,100,5000,1,255,70,3000,1,13369548,100,3000,1,13369548,10"
    }

Sample Preset: "1000, 2, 2700, 100, 500, 1,255, 10, 5000, 7, 0,0, 500, 2, 5000, 1"

NOTE: Each visible state changing is defined to be a flow tuple that contains 4 elements: [duration, mode, value, brightness].

A flow expression is a series of flow tuples. So for above preset example, it means: change CT to 2700K & maximum brightness gradually in 1000ms, then change color to red & 10% brightness gradually in 500ms, then stay at this state for 5 seconds, then change CT to 5000K & minimum brightness gradually in 500ms.

[duration, mode, value, brightness]:

Duration: Gradual change time or sleep time, in milliseconds, minimum value 50.

Mode: 1 – color, 2 – color temperature, 7 – sleep.

Value: RGB value when mode is 1, CT value when mode is 2, Ignored when mode is 7.

Brightness: Brightness value, -1 or 1 ~ 100. Ignored when mode is 7. When this value is -1, brightness in this tuple is ignored (only color or CT change takes effect).

Params for Night Mode scene, Set params as a number. 1 => CT Mode, 2 => RGB Mode, 3 => HSV Mode, 4 => CF Mode. Switching off Night Mode will reset to provided params mode. If params not provided, it will only turn off lights, will not revert color to old state.

Demo

Yeelight Color Bulb

Demo

Mi Bedside Lamp

Demo2

Note : Night Mode is super low brightness mode which was not shown properly in the demo video due to camera quality.

Compatible Devices

https://www.yeelight.com/en_US/product/wifi-led-c

https://www.yeelight.com/en_US/product/luna-mc

https://www.yeelight.com/en_US/product/luna

https://www.yeelight.com/en_US/product/mijia-lamp

https://www.yeelight.com/en_US/product/lemon-color

https://www.yeelight.com/en_US/product/lemon-ct

https://www.yeelight.com/en_US/product/pitaya-plus

https://www.yeelight.com/en_US/product/eos

https://www.yeelight.com/en_US/product/cherry1s

https://www.mi.com/us/yeelight-led-light-bulb/

https://www.mi.com/us/mi-bedside-lamp/

Sample Config :

{
            "platform": "Yeelight-Platform",
            "addResetSwitch": true,
            "shouldTurnOff": true,
            "scenes": [
                {
                    "name": "Dark Cave",
                    "scene": "custom",
                    "params": "2000,1,255,70,2000,1,255,100,5000,1,255,70,3000,1,13369548,100,3000,1,13369548,10"
                },
                {
                    "name": "Break in",
                    "scene": "custom",
                    "params": "500,1,255,100,500,1,255,10"
                },
                {
                    "name": "Disco",
                    "scene": "disco"
                },
                {
                    "name": "Party",
                    "scene": "birthday_party"
                },
                {
                    "name": "Flash",
                    "scene": "flash_notify"
                },
                {
                    "name": "Candle Light",
                    "scene": "candle_flicker"
                },
                {
                    "name": "Police_1",
                    "scene": "police_1"
                },
                {
                    "name": "Police_2",
                    "scene": "police_2"
                },
                {
                    "name": "Alarm",
                    "scene": "alarm"
                },
                {
                    "name": "Gaming",
                    "scene": "gaming"
                },
                {
                    "name": "Night Mode",
                    "scene": "night_mode",
                    "lights": [
                        "0x000000000543dd83"
                    ]
                }
            ]
        }

Plugin Config :

Config Type Description Default
addResetSwitch bool Should add Reset Switch to reset all scenes. Reset switch will not reset night_mode. true
shouldTurnOff bool Global Should turn off lights after scene is over. set false if you want lights to go back to their original state true
pollingInterval number Time in ms, for plugin to poll the light to update HomeKit characteristics 15000
scenes Array (Object) Scenes Required
rgb Object (light ID: true/false) Key-Value pair for light Ids you wish to use rgb pallete instead of hsv. Optional
autoLights Object (light ID: true/false) Key-Value pair for light Ids to let Homekit automations set correct values. Homekit trumps Yeelight State Optional

Scenes Config :

Config Type Description Default
name string Accessory Name Required, Unique
scene string Scene Name. For lists of scenes refer to Available Preset Scenes Required
params string Custom Color Flow Params. This parameter is required if scene is custom. Refer to Writing Color Flow params Optional
lights Array (string) Array of Light Ids to set scene to. All other lights will be ignored. Run scene on all lights
shouldTurnOff bool Scene Specific Should turn off lights after scene is over. set false if you want lights to go back to their original state Global Value

Getting Light ID :

Once your light is connected and displayed on Home App. You can get its light ID by simply looking at Serial Number of the accessory in Home App.

Lint

    $ npm run lint

Reference Documentation :

Yeelight Official API Documentation

https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf

Need Help ?

Get Slack Invite => https://homebridge-slackin.glitch.me/

Slack Channel => https://homebridgeteam.slack.com/messages/yeelight-platform

Slack User => @sahilchaddha

Author

Sahil Chaddha

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].