mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	point blinkstick to latest pre-req
and remove rtf tags
This commit is contained in:
		@@ -34,22 +34,22 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        <div id="delay-details" class="form-row">
 | 
					        <div id="delay-details" class="form-row">
 | 
				
			||||||
            <label for="node-input-delay"><i class="fa fa-clock-o"></i> Delay</label>
 | 
					            <label for="node-input-delay"><i class="fa fa-clock-o"></i> Delay</label>
 | 
				
			||||||
            <input type="text" id="node-input-delay" placeholder="Delay" style="direction:rtl; width:50px !important">
 | 
					            <input type="text" id="node-input-delay" placeholder="Delay" style="text-align:right; width:50px !important">
 | 
				
			||||||
            milliseconds
 | 
					            milliseconds
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div id="repeats-details" class="form-row">
 | 
					        <div id="repeats-details" class="form-row">
 | 
				
			||||||
            <label for="node-input-repeats"><i class="fa fa-history"></i> Repeats</label>
 | 
					            <label for="node-input-repeats"><i class="fa fa-history"></i> Repeats</label>
 | 
				
			||||||
            <input type="text" id="node-input-repeats" placeholder="Times" style="direction:rtl; width:50px !important">
 | 
					            <input type="text" id="node-input-repeats" placeholder="Times" style="text-align:right; width:50px !important">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div id="duration-details" class="form-row">
 | 
					        <div id="duration-details" class="form-row">
 | 
				
			||||||
            <label for="node-input-duration"><i class="fa fa-clock-o"></i> Duration</label>
 | 
					            <label for="node-input-duration"><i class="fa fa-clock-o"></i> Duration</label>
 | 
				
			||||||
            <input type="text" id="node-input-duration" placeholder="Duration" style="direction:rtl; width:50px !important">
 | 
					            <input type="text" id="node-input-duration" placeholder="Duration" style="text-align:right; width:50px !important">
 | 
				
			||||||
            milliseconds
 | 
					            milliseconds
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div id="steps-details" class="form-row">
 | 
					        <div id="steps-details" class="form-row">
 | 
				
			||||||
            <label for="node-input-steps"><i class="fa fa-history"></i> Steps</label>
 | 
					            <label for="node-input-steps"><i class="fa fa-history"></i> Steps</label>
 | 
				
			||||||
            <input type="text" id="node-input-steps" placeholder="Steps" style="direction:rtl; width:50px !important">
 | 
					            <input type="text" id="node-input-steps" placeholder="Steps" style="text-align:right; width:50px !important">
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div id="repeat-details" class="form-row">
 | 
					        <div id="repeat-details" class="form-row">
 | 
				
			||||||
            <label> </label>
 | 
					            <label> </label>
 | 
				
			||||||
@@ -64,17 +64,17 @@
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script type="text/x-red" data-help-name="blinkstick">
 | 
					<script type="text/x-red" data-help-name="blinkstick">
 | 
				
			||||||
    <p><i><a href="http://www.blinkstick.com" target="_new">BlinkStick</a></i> output node. Expects a <b>msg.payload</b> with one of:</p>
 | 
					    <p><i><a href="http://www.blinkstick.com" target="_new">BlinkStick</a></i> output node. Expects a <code>msg.payload</code> with one of:</p>
 | 
				
			||||||
    <ul>
 | 
					    <ul>
 | 
				
			||||||
        <li>A hex string <b>"#rrggbb"</b> triple</li>
 | 
					        <li>A hex string <b>"#rrggbb"</b> triple</li>
 | 
				
			||||||
        <li><b>"red,green,blue"</b> three 0-255 values as a string</li>
 | 
					        <li><b>"red,green,blue"</b> three 0-255 values as a string</li>
 | 
				
			||||||
        <li><b>"random"</b> will generate a random color</li>
 | 
					        <li><b>"random"</b> will generate a random color</li>
 | 
				
			||||||
        <li><i><a href="http://www.w3schools.com/html/html_colornames.asp" target="_new">Standard HTML color</a></i> name</li>
 | 
					        <li><i><a href="http://www.w3schools.com/html/html_colornames.asp" target="_new">Standard HTML color</a></i> name</li>
 | 
				
			||||||
        <li><b>object</b> can override any of the parameters</li>
 | 
					        <li>An <b>object</b> can override any of the parameters</li>
 | 
				
			||||||
        <li><b>array</b> of colours for a neopixel rgb strip - either name,name,... or r,g,b,r,g,b,... where r,g,b are 0 to 255.</li>
 | 
					        <li><b>array</b> of colours for a neopixel rgb strip - either name,name,... or r,g,b,r,g,b,... where r,g,b are 0 to 255.</li>
 | 
				
			||||||
    </ul>
 | 
					    </ul>
 | 
				
			||||||
    <p>If using a neopixel strip it <i>must</i> be wired to the red or R channel of the blinkstick.</p>
 | 
					    <p>If using a neopixel strip it <i>must</i> be wired to the red or R channel of the blinkstick.</p>
 | 
				
			||||||
    <p>An object payload can override any of the settings on the node. Omitted parameters are left intact. For example:</p>
 | 
					    <p>An <b>object</b> payload can override any of the settings on the node. Omitted parameters are left intact. For example:</p>
 | 
				
			||||||
<pre>
 | 
					<pre>
 | 
				
			||||||
{ 'color': 'blue' }
 | 
					{ 'color': 'blue' }
 | 
				
			||||||
{ 'task': 'blink', 'color': 'red' }
 | 
					{ 'task': 'blink', 'color': 'red' }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -253,6 +253,7 @@ module.exports = function(RED) {
 | 
				
			|||||||
                    //Sanitize color value
 | 
					                    //Sanitize color value
 | 
				
			||||||
                    node.color = msg.payload.toLowerCase().replace(/\s+/g,'');
 | 
					                    node.color = msg.payload.toLowerCase().replace(/\s+/g,'');
 | 
				
			||||||
                    if (node.color === "amber") { node.color = "#FFBF00"; }
 | 
					                    if (node.color === "amber") { node.color = "#FFBF00"; }
 | 
				
			||||||
 | 
					                    if (node.color === "off") { node.color = "#000000"; }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (Object.size(node.led) !== 0) {
 | 
					                if (Object.size(node.led) !== 0) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,14 +3,27 @@ node-red-node-blinkstick
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
A <a href="http://nodered.org" target="_new">Node-RED</a> node to control a <a href="http://www.blinkstick.com/" target="_new">BlinkStick</a>.
 | 
					A <a href="http://nodered.org" target="_new">Node-RED</a> node to control a <a href="http://www.blinkstick.com/" target="_new">BlinkStick</a>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Pre-requisites
 | 
				
			||||||
 | 
					--------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Depending on your operating system you may need to install some extra libraries before installing this node... I.E make sure it works outside of Node-RED first !
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For more information see <i><a href="http://www.blinkstick.com/help/tutorials" target="_new">BlinkStick tutorials</a></i> or the <i><a href="https://github.com/arvydas/blinkstick-node" target="_new">node module</a></i> documentation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### Raspberry Pi / Debian / Ubuntu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    sudo apt-get install -y libudev-dev
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Currently you **MUST** run Node-RED as root in order to get sufficient permissions to talk to this USB driver.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Install
 | 
					Install
 | 
				
			||||||
-------
 | 
					-------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Run the following command in the root directory of your Node-RED install:
 | 
					Run the following command in the root directory of your Node-RED install.
 | 
				
			||||||
 | 
					Usually the is `~/.node-red`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    npm install node-red-node-blinkstick
 | 
					    npm install node-red-node-blinkstick
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
Usage
 | 
					Usage
 | 
				
			||||||
-----
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -28,5 +41,3 @@ An object payload can override any of the settings on the node. Omitted paramete
 | 
				
			|||||||
    { 'task': 'blink', 'color': 'red' }
 | 
					    { 'task': 'blink', 'color': 'red' }
 | 
				
			||||||
    { 'task': 'pulse', 'color': 'gree', 'duration': 500 }
 | 
					    { 'task': 'pulse', 'color': 'gree', 'duration': 500 }
 | 
				
			||||||
    { 'task': 'morph', 'color': 'orange', 'duration': 500, 'steps': 20 }
 | 
					    { 'task': 'morph', 'color': 'orange', 'duration': 500, 'steps': 20 }
 | 
				
			||||||
 | 
					 | 
				
			||||||
For more information see <i><a href="http://www.blinkstick.com/help/tutorials" target="_new">BlinkStick tutorials</a></i> or the <i><a href="https://github.com/arvydas/blinkstick-node" target="_new">node module</a></i> documentation.
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,9 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "name"          : "node-red-node-blinkstick",
 | 
					    "name"          : "node-red-node-blinkstick",
 | 
				
			||||||
    "version"       : "0.1.8",
 | 
					    "version"       : "0.1.10",
 | 
				
			||||||
    "description"   : "A Node-RED node to control a Blinkstick",
 | 
					    "description"   : "A Node-RED node to control a Blinkstick",
 | 
				
			||||||
    "dependencies"  : {
 | 
					    "dependencies"  : {
 | 
				
			||||||
        "blinkstick"   : "1.1.*"
 | 
					        "blinkstick"   : "1.1.3"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "repository" : {
 | 
					    "repository" : {
 | 
				
			||||||
        "type":"git",
 | 
					        "type":"git",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user