Giter Club home page Giter Club logo

node-red-yeelight's Introduction

node-red-yeelight

Interact with yeelight lamps on local network. Select each lamp by their id and send them custom commands.

Dependency

Instalation

Install dependency before

npm install dgram net

Clone the repository.

git clone [email protected]:Azuxul/node-red-yeelight.git

Then go to your node red directory and install the package

cd ~/.node-red
npm install /path/to/repo

Or you can do everything in the same directory

cd ~/.node-red
git clone [email protected]:Azuxul/node-red-yeelight.git
npm install ./node-red-yeelight

Usage

You need to configure the node by entering the correct lamp id (ex: 0x000000000abc1234) and the command method (ex: set_power). You can also set up the lamp name (internal to the node, not the yeelight lamp name) to access the last command method params as a node red global variable (with the name "main_lamp" for the method set_power, the variable is "main_lamp.set_power").

To use the node you need to pass arguments throw node red msg payload as an array. For example, with the method set_power msg.payload should be equals to :

msg.payload = [state, 'smooth', 500]

For more information on commands methods and arguments use the Yeelight WiFi Light Inter-Operation Specification Manual or check Yeelight developer website.

Compatibility

This package has been fully tested with Yeelight color model (firmware version 70), Node-RED v0.20.7 and Node.Js v10.16.3.

node-red-yeelight's People

Contributors

azuxul avatar

Watchers

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