项目作者: Azuxul

项目描述 :
Node red package to interact with Yeelight lamps on your local network.
高级语言: JavaScript
项目地址: git://github.com/Azuxul/node-red-yeelight.git
创建时间: 2019-08-23T16:35:58Z
项目社区:https://github.com/Azuxul/node-red-yeelight

开源协议:

下载


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

  1. npm install dgram net

Clone the repository.

  1. git clone git@github.com:Azuxul/node-red-yeelight.git

Then go to your node red directory and install the package

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

Or you can do everything in the same directory

  1. cd ~/.node-red
  2. git clone git@github.com:Azuxul/node-red-yeelight.git
  3. 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 :

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