1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/blink1/README.md
Dennis Gaida eb8bae6782
blink1: added "blink1 in" node (#812)
* Added "blink1 in" node

* sets msg.payload to current RGB value or "off" if RGB = 0,0,0
* can also be used to pipe msg.payload to blink1 out
* blink1 category created
* blink1 label set to "blink1 out"
* Bumped version to 0.1.0
* Modified readme
2021-06-22 12:39:22 +01:00

44 lines
1.6 KiB
Markdown

node-red-node-blink1
====================
A <a href="http://nodered.org" target="_new">Node-RED</a> node to control a <a href="http://thingm.com/products/blink-1/" target="_new">Thingm Blink(1)</a> LED.
Pre-requisites
--------------
As the blink1 is a USB HID device you may need some extra hardware libraries as
documented <a href="https://www.npmjs.com/package/node-blink1" target="_new">here</a>
and <a href="https://github.com/todbot/blink1/blob/master/linux/51-blink1.rules" target="_new">here</a>.
Specifically Ubuntu/Debian/Raspbian users may need to
sudo apt-get install libusb-1.0-0-dev
and also setup these udev rules in `/etc/udev/rules.d/51-blink1.rules`
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="27b8", ATTRS{idProduct}=="01ed", MODE:="666", GROUP="plugdev"
Install
-------
Run the following command in your Node-RED user directory - typically `~/.node-red`
npm i node-red-node-blink1
Usage
-----
__Out__
Sends the `msg.payload` to a Thingm Blink(1) LED device. The payload can be any of the following:
- a three part csv string of r,g,b - e.g. red is 255,0,0
- a hex colour #rrggbb - e.g. green is #00FF00
- a <a href="http://www.cheerlights.com/control-cheerlights">@cheerlights</a> colour name - e.g. blue
The colours it accepts are - red, amber, green, blue, cyan, magenta, yellow, orange, pink, purple, white, warmwhite (or oldlace), black, (and off)
__In__
Outputs the current color value of the Blink(1) LED device in the `msg.payload` with the r,g,b values as an array e.g. [255,0,0].
If the Blink(1) is off the device returns 0,0,0. Instead of [0,0,0] the node returns "off".