2014-07-08 23:57:42 +02:00
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.
2015-03-12 12:12:44 +01:00
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 > .
2016-01-02 13:27:57 +01:00
Specifically Ubuntu/Debian/Raspbian users may need to
2015-04-14 18:23:31 +02:00
2016-01-02 13:27:57 +01:00
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"
2015-04-14 18:23:31 +02:00
2014-07-08 23:57:42 +02:00
Install
-------
2016-03-02 14:25:52 +01:00
Run the following command in your Node-RED user directory - typically `~/.node-red`
2014-07-08 23:57:42 +02:00
2016-01-02 13:27:57 +01:00
npm i node-red-node-blink1
2014-07-08 23:57:42 +02:00
Usage
-----
2016-03-02 14:25:52 +01:00
Sends the `msg.payload` to a Thingm Blink(1) LED device. The payload can be any of the following:
2014-07-08 23:57:42 +02:00
- 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
2016-03-02 14:25:52 +01:00
The colours it accepts are - red, amber, green, blue, cyan, magenta, yellow, orange, pink, purple, white, warmwhite (or oldlace), black, (and off)