All Projects → sahilchaddha → Yeelight Platform

sahilchaddha / Yeelight Platform

Licence: mit
Yet Another Yeelight API in node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Yeelight Platform

mi-lamp-re
💡 Reverse Engineering Notes for the Yeelight Bedside Lamp (BLE)
Stars: ✭ 35 (+0%)
Mutual labels:  light, xiaomi
Homebridge Mi Philips Light
XiaoMi Philips light plugins for HomeBridge.
Stars: ✭ 85 (+142.86%)
Mutual labels:  xiaomi, light
Rrcc
RoboRock Control Center
Stars: ✭ 457 (+1205.71%)
Mutual labels:  xiaomi
Senseme
Python Library for Haiku SenseMe app controlled fans/lights
Stars: ✭ 19 (-45.71%)
Mutual labels:  light
Wled
Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
Stars: ✭ 7,626 (+21688.57%)
Mutual labels:  light
Dsltablayout
♥️ Android界最万能的TabLayout(不仅仅是TabLayout), 支持任意类型的item, 支持Drawable类型的指示器,智能开启滚动,支持横竖向布局等
Stars: ✭ 489 (+1297.14%)
Mutual labels:  light
Xiaomigateway3
Control Zigbee, BLE and Mesh devices from Home Assistant with Xiaomi Gateway 3 (ZNDMWG03LM) on original firmware
Stars: ✭ 617 (+1662.86%)
Mutual labels:  xiaomi
Lovelace Xiaomi Vacuum Map Card
This card enables you to specify a target or start a zoned cleanup using live or static map, just like in Xiaomi Home app. Additionally you can define a list of zones and choose the ones to be cleaned.
Stars: ✭ 433 (+1137.14%)
Mutual labels:  xiaomi
Superboucle
Loop application synced with jack transport
Stars: ✭ 31 (-11.43%)
Mutual labels:  light
Socket.io Push
整合了小米,华为,友盟,谷歌,苹果推送的统一解决方案
Stars: ✭ 605 (+1628.57%)
Mutual labels:  xiaomi
Miui8 Xml Japanese
Japanese MIUI 8 translation for xiaomi.eu
Stars: ✭ 16 (-54.29%)
Mutual labels:  xiaomi
Nighttab
A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.
Stars: ✭ 598 (+1608.57%)
Mutual labels:  light
Avalondock
Our own development branch of the well known WPF document docking library
Stars: ✭ 518 (+1380%)
Mutual labels:  light
Pytradfri
IKEA Trådfri/Tradfri API. Control and observe your lights from Python. Examples available. On pypi. Sans-io.
Stars: ✭ 778 (+2122.86%)
Mutual labels:  light
Hexo Theme Yun
☁️ A fast & light & lovely theme for Hexo. 一个对可爱自以为是的 Hexo 主题。
Stars: ✭ 477 (+1262.86%)
Mutual labels:  light
Zigbridge
Zigbee gateway implementation
Stars: ✭ 21 (-40%)
Mutual labels:  xiaomi
Hugo Theme Introduction
Minimal, single page, smooth-scrolling theme for Hugo static site generator.
Stars: ✭ 441 (+1160%)
Mutual labels:  light
Xiaomi Cloud Tokens Extractor
This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.
Stars: ✭ 587 (+1577.14%)
Mutual labels:  xiaomi
Ble monitor
Xiaomi Mijia BLE MiBeacon monitor
Stars: ✭ 611 (+1645.71%)
Mutual labels:  xiaomi
Make Mi Air Purifier Great Again
A smart automation alternative to Mi Home.
Stars: ✭ 32 (-8.57%)
Mutual labels:  xiaomi

yeelight-platform

NPM

npm npm CircleCI

Yet Another Yeelight API written in JS

Description

This package supports discovering, connecting and controlling Yeelight Devices. yeelight-platform is a zero-dependency solution for controlling Xiaomi/Yeelight Lights. There are already a number of other solutions available, but they were not exactly what I wanted, so I made another one to be better than all the others.

Competing standards

Installation

    $ npm install yeelight-platform

Usage :

Discover

    const YeeDiscovery = require('yeelight-platform').Discovery
    const discoveryService = new YeeDiscovery()

    discoveryService.on('started', () => {
        console.log('** Discovery Started **')
    })

    discoveryService.on('didDiscoverDevice', (device) => {
        console.log(device)
    })

    discoveryService.listen()
    /*
        {
            Location: 'yeelight://192.168.x.x:55443',
            id: '0x000000000xxxxx',
            model: 'bslamp1',
            support:
            'get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust adjust_bright adjust_ct adjust_color set_music set_name',
            power: 'off',
            bright: '1',
            color_mode: '1',
            ct: '2752',
            rgb: '16750592',
            hue: '36',
            sat: '100'
        }
    */

Device

    const YeeDevice = require('yeelight-platform').Device

    const device = new YeeDevice({host: "192.168.0.190", port: 55443})

    device.connect()

    device.on('deviceUpdate', (newProps) => {
        console.log(newProps)
    })
    
    device.on('connected', () => {
        device.sendCommand({
            id: -1,
            method: 'set_power',
            params: ["on", 'smooth', 300]
        })
    })    

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/

Lint

    $ npm run lint

API :

Yeelight Official API Documentation

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

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].