node-red-contrib-daylight-rgbw

2.2.1 • Public • Published

Daylight RGBW node for Node-Red

Makes your RGB(W) controllable lights or ledstrips follow the sun color and a warm color at night. Also offers color animations (Disco & Rainbow)

Daylight RGBW Control Node-RED Node

NPM Version NPM Download Build Status Known Vulnerabilities semantic-release

This node offers the possibility to control the color of a RGBW ledstrip according to the time of day. This is done by calculating the angle of the sun with the horizon and project that on a color temperature scale. Therefore it is important to correctly configure your longitude and lattitude.

Typically you choose a color tempurature of around 1000K for sunrise/sunset (sun at horizon) and a color temperature around 5500K for the highest point of the sun.

But to tune it for your specific RGBW source you can tune these settings in the configuration. The white level is kept constant (for now) and can be configured too.

When the item is switched off, it will still update the RGBW colors, so that when the light source is switched on it will drectly be set to the correct colors.

The typical setup is shown below: alt text

Also see this link for an importable version of the example.

Note: Minimum Node version is now at 14.x . It might work on earlier versions, but this is no longer tested or supported.

This example follows the rules below:

Have an external node to provide the current timestamp

For instance the Inject Node offers this. Choose to provide the timestamp by interval to determine how often the colors will be updated.

Have your RGB(W) node status attached to the input to provide ON or OFF

This way you prevent the light source to come on each time when the colors are updated. This node is optimized to work directly with OpenHab2 nodes, but will work with any node as long as the topic is set to item-switch.

Choose your output

You can output RGBW separate components (port 1,2,3,4) and/or make use of the colorTemp output (port 5)

Have your RGB(W) dimmer controls for the color channels connected to port 1,2,3,4

The current implementation will output percentages. If you need a range 0-255 you need to rescale. You do not need to use port 4 if you do not have a White channel.

Have your Kelvin or Mired compatible color control connected to port 5

The result will internally be caculated in Kelvin.

Animation RGBW Control Node

A second node within this package offers RGB animations. Currently 2 modes exist: disco (random colors) and rainbow (walking all possible colors)

Installation

First go to your .node-red directory, then run the command below (or just install from the palette manager)

npm install node-red-contrib-daylight-rgbw

Readme

Keywords

Package Sidebar

Install

npm i node-red-contrib-daylight-rgbw

Weekly Downloads

16

Version

2.2.1

License

MIT

Unpacked Size

113 kB

Total Files

21

Last publish

Collaborators

  • raimondb