1.3.1 • Published 2 years ago

@mschaeffler/node-red-dualled v1.3.1

Weekly downloads
-
License
LGPL-2.1
Repository
github
Last release
2 years ago

@mschaeffler/node-red-dualled

Two nodes to control dual (CCT) LEDs.

image of example flow

Install

$ npm install @mschaeffler/node-red-dualled

Usage

With this nodes you can control pairs of warm and cold leds (called dual leds or CCT leds), which are controled by two independant drivers, and use the feedback from the drivers.

ctrlDualLed

This node drives the dual led by calculating the individual brightness values. It works on base of topics so that with each different topic another led can be controlled.

Input

All inputs are stored in a node local context variable, to always output a complete data set.

msg.typedescription
payloadstringon, off, toggle
booleanswitch on or off.
objectset turn, temp, brightness or transition according to key.

Output

All values of the msg (incl. topic) are preserved, except the payload.

control warm LED
msg.typedescription
payload.turnstringon or off for the warm led.
payload.brightnessnumberbrightness for the warm led.
payload.transitionnumbertransition time.
control cold LED
msg.typedescription
payload.turnstringon or off for the cold led.
payload.brightnessnumberbrightness for the cold led.
payload.transitionnumbertransition time.

Parameters

configtypedescription
dual LedconfDualLedconfiguration node to define one pair of dual LEDs.

feedbackDualLed

This node converts brightness values of two individually controlled leds into a brightness / temp tuple.

Input

All input values are organized in objects with the parameters iWarm and iCold as indexes.

msg.typedescription
payload.outputiWarmstringstate of warm led.
payload.outputiColdstringstate of cold led.
payload.brightnessiWarmnumberbrightness of warm led.
payload.brightnessiColdnumberbrightness of cold led.
payload.poweriWarmnumberactual power of warm led.
payload.poweriColdnumberactual power of cold led.
payload.energyiWarmnumbertotal energy of warm led.
payload.energyiColdnumbertotal energy of cold led.
{
    "output":{
        "Warm":"off",
        "Cold":"off"
    },
    "brightness":{
        "Warm":42,
        "Cold":38
    },
    "power":{
        "Warm":0,
        "Cold":0
    },
    "energy":{
        "Warm":45.56666666666667,
        "Cold":9.8
    }
}

Output

All values of the msg (incl. topic) are preserved, only this vales are chaged in the payload.

msg.typedescription
payload.outputoutput of warm led
payload.brightnesssummed brightness
payload.tempnumberinterpolated color temperature.
payload.powernumbersummed power of both leds.
payload.energynumbersummed energy of both leds.

Parameters

configtypedescription
dual LedconfDualLedconfiguration node to define one pair of dual LEDs.
Index WarmstringIndex to the payload properties for the warm led.
Index ColdstringIndex to the payload properties for the cold led.

confDualLed

This configuration node stores data about a dual white LED.

Parameters

configtypedescription
Temp_warmnumberColor temperature of the warm white LED.
Temp_coldnumberColor temperature of the cold white LED.

Example Flow

example flow

Author

Mathias Schäffler

License

LGPL-2.1

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago