mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
added i18n help files (#766)
This commit is contained in:
parent
07460b9404
commit
0772b545ea
29
analysis/mlsentiment/locales/en-US/mlsentiment.html
Normal file
29
analysis/mlsentiment/locales/en-US/mlsentiment.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="mlsentiment">
|
||||||
|
<p>Analyses the chosen property, default <code>payload</code>, and adds a <code>sentiment</code> object.</p>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>sentiment <span class="property-type">object</span></dt>
|
||||||
|
<dd>contains the resulting AFINN-111 sentiment.</dd>
|
||||||
|
<dt>sentiment.score <span class="property-type">number</span></dt>
|
||||||
|
<dd>the sentiment score.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Inputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>words <span class="property-type">object</span></dt>
|
||||||
|
<dd>an object of words and scores to override or add words can be supplied - <code>{ word:score,... }</code>.</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>lang <span class="property-type">string</span></dt>
|
||||||
|
<dd>Two letter cldr code to specify the language to use - from the list below</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
|
<p>A score greater than zero is positive and less than zero is negative.</p>
|
||||||
|
<p>The score typically ranges from -5 to +5, but can go higher and lower.</p>
|
||||||
|
<p>See <a href="https://github.com/marcellobarile/multilang-sentiment/blob/develop/README.md" target="_blank">the Sentiment docs here</a>.</p>
|
||||||
|
<p>The node can also be configured to let the language be specified by setting <code>msg.lang</code> to one of the codes below</p>
|
||||||
|
<p>The language codes supported are - af, am, ar, az, be, bg, bn, bs, ca, ceb, co, cs, cy, da, de, el, en, eo, es, et, eu, fa, fi,
|
||||||
|
fr, fy, ga, gd, gl, gu, ha, haw, hi, hmn, hr, ht, hu, hy, id, ig, is, it, iw, ja, jw, ka, kk, km, kn, ko, ku, ky, la, lb, lo, lt,
|
||||||
|
lv, mg, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, no, ny, pa, pl, ps, pt, ro, ru, sd, si, sk, sl, sm, sn, so, sq, sr, st, su, sv,
|
||||||
|
sw, ta, te, tg, th, tl, tr, uk, ur, uz, vi, xh, yi, yo, zh, zh-tw, zu</p>
|
||||||
|
</script>
|
@ -118,35 +118,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="mlsentiment">
|
|
||||||
<p>Analyses the chosen property, default <code>payload</code>, and adds a <code>sentiment</code> object.</p>
|
|
||||||
<h3>Outputs</h3>
|
|
||||||
<dl class="message-properties">
|
|
||||||
<dt>sentiment <span class="property-type">object</span></dt>
|
|
||||||
<dd>contains the resulting AFINN-111 sentiment.</dd>
|
|
||||||
<dt>sentiment.score <span class="property-type">number</span></dt>
|
|
||||||
<dd>the sentiment score.</dd>
|
|
||||||
</dl>
|
|
||||||
<h3>Inputs</h3>
|
|
||||||
<dl class="message-properties">
|
|
||||||
<dt>words <span class="property-type">object</span></dt>
|
|
||||||
<dd>an object of words and scores to override or add words can be supplied - <code>{ word:score,... }</code>.</dd>
|
|
||||||
</dl>
|
|
||||||
<dl class="message-properties">
|
|
||||||
<dt>lang <span class="property-type">string</span></dt>
|
|
||||||
<dd>Two letter cldr code to specify the language to use - from the list below</dd>
|
|
||||||
</dl>
|
|
||||||
<h3>Details</h3>
|
|
||||||
<p>A score greater than zero is positive and less than zero is negative.</p>
|
|
||||||
<p>The score typically ranges from -5 to +5, but can go higher and lower.</p>
|
|
||||||
<p>See <a href="https://github.com/marcellobarile/multilang-sentiment/blob/develop/README.md" target="_blank">the Sentiment docs here</a>.</p>
|
|
||||||
<p>The node can also be configured to let the language be specified by setting <code>msg.lang</code> to one of the codes below</p>
|
|
||||||
<p>The language codes supported are - af, am, ar, az, be, bg, bn, bs, ca, ceb, co, cs, cy, da, de, el, en, eo, es, et, eu, fa, fi,
|
|
||||||
fr, fy, ga, gd, gl, gu, ha, haw, hi, hmn, hr, ht, hu, hy, id, ig, is, it, iw, ja, jw, ka, kk, km, kn, ko, ku, ky, la, lb, lo, lt,
|
|
||||||
lv, mg, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, no, ny, pa, pl, ps, pt, ro, ru, sd, si, sk, sl, sm, sn, so, sq, sr, st, su, sv,
|
|
||||||
sw, ta, te, tg, th, tl, tr, uk, ur, uz, vi, xh, yi, yo, zh, zh-tw, zu</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('mlsentiment',{
|
RED.nodes.registerType('mlsentiment',{
|
||||||
category: 'analysis-function',
|
category: 'analysis-function',
|
||||||
|
8
function/PID/locales/en-US/pidcontrol.html
Normal file
8
function/PID/locales/en-US/pidcontrol.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="PID control">
|
||||||
|
<p>A PID controller node.</p>
|
||||||
|
<p>This node ONLY expects a numeric <code>msg.payload</code> containing the current reading.
|
||||||
|
It will output the correction that needs to be applied in order to move to the preset <i>set point</i> value.</p>
|
||||||
|
<p>See <a href="https://en.wikipedia.org/wiki/PID_controller" target="_new">Wikipedia</a> for more details.</p>
|
||||||
|
<p>The <i>set point</i> may be overridden by <code>msg.setpoint</code>. If you do so the edit box value can be used as the initial value.</p>
|
||||||
|
</script>
|
@ -24,14 +24,6 @@
|
|||||||
The damping factors are typically in the range 0 - 1.<br></div>
|
The damping factors are typically in the range 0 - 1.<br></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="PID control">
|
|
||||||
<p>A PID controller node.</p>
|
|
||||||
<p>This node ONLY expects a numeric <code>msg.payload</code> containing the current reading.
|
|
||||||
It will output the correction that needs to be applied in order to move to the preset <i>set point</i> value.</p>
|
|
||||||
<p>See <a href="https://en.wikipedia.org/wiki/PID_controller" target="_new">Wikipedia</a> for more details.</p>
|
|
||||||
<p>The <i>set point</i> may be overridden by <code>msg.setpoint</code>. If you do so the edit box value can be used as the initial value.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('PID control',{
|
RED.nodes.registerType('PID control',{
|
||||||
color:"#d6ba48",
|
color:"#d6ba48",
|
||||||
|
@ -25,17 +25,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="data-generator">
|
|
||||||
<p>Creates dummy data strings based on a handlebars-style template.</p>
|
|
||||||
<p>Uses the <i><a href="https://github.com/webroo/dummy-json/blob/master/README.md" target="_new">dummy-json</a></i>
|
|
||||||
module, which can create rich sets of dummy data for testing or other uses.</p>
|
|
||||||
<p>Will build a string or a parsed JSON object, creating values based on the helper names below:
|
|
||||||
<pre style="word-break:normal">title, firstName, lastName, company, domain, tld, email, street, city, country, countryCode, zipcode, postcode, lat, long, phone, color, hexColor, guid, ipv4, ipv6, lorem [nn], date, time, lowercase, uppercase, int, float, boolean</pre>
|
|
||||||
<p>Multiple values can be generated by use of the <i>repeat</i> syntax.</p>
|
|
||||||
<p>In addition any properties passed in on <code>msg</code> can also be used - for example <code>{{payload}}</code>.</p>
|
|
||||||
<p>Finally <code>msg.seed</code> can be used to preset the pseudo-random seed to ensure repeatability across calls.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('data-generator',{
|
RED.nodes.registerType('data-generator',{
|
||||||
color:"rgb(243, 181, 103)",
|
color:"rgb(243, 181, 103)",
|
||||||
|
11
function/datagenerator/locales/en-US/datagenerator.html
Normal file
11
function/datagenerator/locales/en-US/datagenerator.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="data-generator">
|
||||||
|
<p>Creates dummy data strings based on a handlebars-style template.</p>
|
||||||
|
<p>Uses the <i><a href="https://github.com/webroo/dummy-json/blob/master/README.md" target="_new">dummy-json</a></i>
|
||||||
|
module, which can create rich sets of dummy data for testing or other uses.</p>
|
||||||
|
<p>Will build a string or a parsed JSON object, creating values based on the helper names below:
|
||||||
|
<pre style="word-break:normal">title, firstName, lastName, company, domain, tld, email, street, city, country, countryCode, zipcode, postcode, lat, long, phone, color, hexColor, guid, ipv4, ipv6, lorem [nn], date, time, lowercase, uppercase, int, float, boolean</pre>
|
||||||
|
<p>Multiple values can be generated by use of the <i>repeat</i> syntax.</p>
|
||||||
|
<p>In addition any properties passed in on <code>msg</code> can also be used - for example <code>{{payload}}</code>.</p>
|
||||||
|
<p>Finally <code>msg.seed</code> can be used to preset the pseudo-random seed to ensure repeatability across calls.</p>
|
||||||
|
</script>
|
@ -45,16 +45,6 @@
|
|||||||
<div class="form-tips" id="node-tip">Tip: This node ONLY works with numbers.</div>
|
<div class="form-tips" id="node-tip">Tip: This node ONLY works with numbers.</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="smooth">
|
|
||||||
<p>A simple node to provide various functions across several previous values, including max, min, mean, high and low pass filters.</p>
|
|
||||||
<p>Messages arriving with different <code>msg.topic</code> can be treated as separate streams if so configured.</p>
|
|
||||||
<p>Max, Min and Mean work over a specified number of previous values.</p>
|
|
||||||
<p>The High and Low pass filters use a smoothing factor. The higher the number the more the smoothing. E.g. a value of 10 is similar to an α of 0.1. It is analagous to an RC time constant - but there is no time component to this as the time is based on events arriving.</p>
|
|
||||||
<p>Enabling the Reduce option causes the node to only emit one message per N values (available for the Max, Min and Mean functions). E.g. if set to Mean over 10 values, there will only be one outgoing message per 10 incoming ones.</p>
|
|
||||||
<p>If <code>msg.reset</code> is received (with any value), all the counters and intermediate values are reset to an initial state.</p>
|
|
||||||
<p><b>Note:</b> This only operates on <b>numbers</b>. Anything else will try to be made into a number and rejected if that fails.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('smooth', {
|
RED.nodes.registerType('smooth', {
|
||||||
color: "#E2D96E",
|
color: "#E2D96E",
|
||||||
|
10
function/smooth/locales/en-US/17-smooth.html
Normal file
10
function/smooth/locales/en-US/17-smooth.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="smooth">
|
||||||
|
<p>A simple node to provide various functions across several previous values, including max, min, mean, high and low pass filters.</p>
|
||||||
|
<p>Messages arriving with different <code>msg.topic</code> can be treated as separate streams if so configured.</p>
|
||||||
|
<p>Max, Min and Mean work over a specified number of previous values.</p>
|
||||||
|
<p>The High and Low pass filters use a smoothing factor. The higher the number the more the smoothing. E.g. a value of 10 is similar to an α of 0.1. It is analagous to an RC time constant - but there is no time component to this as the time is based on events arriving.</p>
|
||||||
|
<p>Enabling the Reduce option causes the node to only emit one message per N values (available for the Max, Min and Mean functions). E.g. if set to Mean over 10 values, there will only be one outgoing message per 10 incoming ones.</p>
|
||||||
|
<p>If <code>msg.reset</code> is received (with any value), all the counters and intermediate values are reset to an initial state.</p>
|
||||||
|
<p><b>Note:</b> This only operates on <b>numbers</b>. Anything else will try to be made into a number and rejected if that fails.</p>
|
||||||
|
</script>
|
@ -24,14 +24,6 @@
|
|||||||
<div class="form-tips"><span data-i18n="[html]arduino.tip.io"></span></div>
|
<div class="form-tips"><span data-i18n="[html]arduino.tip.io"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="arduino in">
|
|
||||||
<p>Arduino input node. Connects to a local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
|
||||||
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
|
|
||||||
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</p>
|
|
||||||
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
|
|
||||||
<p>For example you could use a <code>delay</code> node set to rate limit and drop intermediate values, or an <code>rbe</code> node to only report when it changes by a certain amount.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('arduino in',{
|
RED.nodes.registerType('arduino in',{
|
||||||
category: 'Arduino',
|
category: 'Arduino',
|
||||||
@ -85,14 +77,6 @@
|
|||||||
<div class="form-tips"><span data-i18n="[html]arduino.tip.io"></span></div>
|
<div class="form-tips"><span data-i18n="[html]arduino.tip.io"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="arduino out">
|
|
||||||
<p>Arduino output node. Connects to local Arduino and writes to the selected digital
|
|
||||||
pin. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
|
||||||
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
|
|
||||||
<p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects an integer numeric
|
|
||||||
value in <code>msg.payload</code>. The pin number is set in the properties panel.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('arduino out', {
|
RED.nodes.registerType('arduino out', {
|
||||||
category: 'Arduino',
|
category: 'Arduino',
|
||||||
|
16
hardware/Arduino/locales/en-US/35-arduino.html
Normal file
16
hardware/Arduino/locales/en-US/35-arduino.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="arduino in">
|
||||||
|
<p>Arduino input node. Connects to a local Arduino and monitors the selected pin for changes. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
||||||
|
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
|
||||||
|
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</p>
|
||||||
|
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
|
||||||
|
<p>For example you could use a <code>delay</code> node set to rate limit and drop intermediate values, or an <code>rbe</code> node to only report when it changes by a certain amount.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="arduino out">
|
||||||
|
<p>Arduino output node. Connects to local Arduino and writes to the selected digital
|
||||||
|
pin. Uses <a href="http://firmata.org/" target="_new"><i>Firmata</i>.</a></p>
|
||||||
|
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
|
||||||
|
<p>You can select Digital, Analogue (PWM) or Servo type outputs. Expects an integer numeric
|
||||||
|
value in <code>msg.payload</code>. The pin number is set in the properties panel.</p>
|
||||||
|
</script>
|
33
hardware/pigpiod/locales/en-US/pi-gpiod.html
Normal file
33
hardware/pigpiod/locales/en-US/pi-gpiod.html
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="pi-gpiod in">
|
||||||
|
<p>Raspberry Pi input node. Generates a <code>msg.payload</code> with either a
|
||||||
|
0 or 1 depending on the state of the input pin.
|
||||||
|
Requires the <a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a>
|
||||||
|
daemon to be running on the host computer in order to work.</p>
|
||||||
|
<p><b>Outputs</b>
|
||||||
|
<ul>
|
||||||
|
<li><code>msg.payload</code> - <i>number</i> - the level of the pin (0 or 1).</li>
|
||||||
|
<li><code>msg.topic</code> - <i>string</i> - pi/{the pin number}</li>
|
||||||
|
</ul>
|
||||||
|
<p><b>Details</b></p>
|
||||||
|
<p>You may also enable the input pullup resistor ↑ or the pulldown resistor ↓.</p>
|
||||||
|
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
|
||||||
|
<p><b>Note:</b> the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="pi-gpiod out">
|
||||||
|
<p>Raspberry Pi output node. Can be used in Digital, PWM or Servo modes. Requires the
|
||||||
|
<a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a> daemon to be running in order to work.</p>
|
||||||
|
<p><b>Inputs</b>
|
||||||
|
<ul>
|
||||||
|
<li><code>msg.payload</code> - <i>number | string</i> - 0,1 (Digital), 0-100 (PWM, Servo)</li>
|
||||||
|
</ul>
|
||||||
|
<p><b>Details</b></p>
|
||||||
|
<p>Digital mode expects a <code>msg.payload</code> with either a 0 or 1 (or true or false),
|
||||||
|
and will set the selected physical pin high or low depending on the value passed in.</p>
|
||||||
|
<p>The initial value of the pin at deploy time can also be set to 0 or 1.</p>
|
||||||
|
<p>When using PWM and Servo modes, the input value should be a number 0 - 100, and can be floating point.</p>
|
||||||
|
<p>In Servo mode you can stop the output by sending a <code>msg.payload</code> of <code>null</code> or <code>""</code>.</p>
|
||||||
|
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
|
||||||
|
<p><b>Note</b>: the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
|
||||||
|
</script>
|
@ -167,22 +167,6 @@
|
|||||||
<div class="form-tips" id="pin-tip"><span data-i18n="[html]pi-gpiod.tip.dual"></span></div>
|
<div class="form-tips" id="pin-tip"><span data-i18n="[html]pi-gpiod.tip.dual"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="pi-gpiod in">
|
|
||||||
<p>Raspberry Pi input node. Generates a <code>msg.payload</code> with either a
|
|
||||||
0 or 1 depending on the state of the input pin.
|
|
||||||
Requires the <a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a>
|
|
||||||
daemon to be running on the host computer in order to work.</p>
|
|
||||||
<p><b>Outputs</b>
|
|
||||||
<ul>
|
|
||||||
<li><code>msg.payload</code> - <i>number</i> - the level of the pin (0 or 1).</li>
|
|
||||||
<li><code>msg.topic</code> - <i>string</i> - pi/{the pin number}</li>
|
|
||||||
</ul>
|
|
||||||
<p><b>Details</b></p>
|
|
||||||
<p>You may also enable the input pullup resistor ↑ or the pulldown resistor ↓.</p>
|
|
||||||
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
|
|
||||||
<p><b>Note:</b> the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var bcm2pin = {
|
var bcm2pin = {
|
||||||
"2":"3", "3":"5", "4":"7", "14":"8", "15":"10", "17":"11", "18":"12", "27":"13", "22":"15",
|
"2":"3", "3":"5", "4":"7", "14":"8", "15":"10", "17":"11", "18":"12", "27":"13", "22":"15",
|
||||||
@ -435,23 +419,6 @@
|
|||||||
<div class="form-tips" id="pin-tip"><span data-i18n="[html]pi-gpiod.tip.dual"></span></div>
|
<div class="form-tips" id="pin-tip"><span data-i18n="[html]pi-gpiod.tip.dual"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="pi-gpiod out">
|
|
||||||
<p>Raspberry Pi output node. Can be used in Digital, PWM or Servo modes. Requires the
|
|
||||||
<a href="http://abyz.me.uk/rpi/pigpio/index.html" target="_new">pi-gpiod</a> daemon to be running in order to work.</p>
|
|
||||||
<p><b>Inputs</b>
|
|
||||||
<ul>
|
|
||||||
<li><code>msg.payload</code> - <i>number | string</i> - 0,1 (Digital), 0-100 (PWM, Servo)</li>
|
|
||||||
</ul>
|
|
||||||
<p><b>Details</b></p>
|
|
||||||
<p>Digital mode expects a <code>msg.payload</code> with either a 0 or 1 (or true or false),
|
|
||||||
and will set the selected physical pin high or low depending on the value passed in.</p>
|
|
||||||
<p>The initial value of the pin at deploy time can also be set to 0 or 1.</p>
|
|
||||||
<p>When using PWM and Servo modes, the input value should be a number 0 - 100, and can be floating point.</p>
|
|
||||||
<p>In Servo mode you can stop the output by sending a <code>msg.payload</code> of <code>null</code> or <code>""</code>.</p>
|
|
||||||
<p>If using with Docker on Pi then the default Host IP should be <code>172.17.0.1</code>. You will also need to run <code>sudo pigpiod</code> on the host.</p>
|
|
||||||
<p><b>Note</b>: the pin numbers refer the physical pin numbers on connector P1 as they are easier to locate.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var bcm2pin = {
|
var bcm2pin = {
|
||||||
"2":"3", "3":"5", "4":"7", "14":"8", "15":"10", "17":"11", "18":"12", "27":"13", "22":"15",
|
"2":"3", "3":"5", "4":"7", "14":"8", "15":"10", "17":"11", "18":"12", "27":"13", "22":"15",
|
||||||
|
100
hardware/sensehat/locales/en-US/sensehat.html
Normal file
100
hardware/sensehat/locales/en-US/sensehat.html
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="rpi-sensehat in">
|
||||||
|
<p>Raspberry Pi Sense HAT input node.</p>
|
||||||
|
<p>This node sends readings from the various sensors on the Sense HAT,
|
||||||
|
grouped into three sets; motion events, environment events and joystick events.</p>
|
||||||
|
<p><b>Motion events</b></p>
|
||||||
|
<p>Motion events include readings from the accelerometer, gyroscope and magnetometer,
|
||||||
|
as well as the current compass heading. They are sent at a rate of approximately 10
|
||||||
|
per second. The <code>topic</code> is set to <code>motion</code> and the
|
||||||
|
<code>payload</code> is an object with the following values:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>acceleration.x/y/z</code> : the acceleration intensity in Gs</li>
|
||||||
|
<li><code>gyroscope.x/y/z</code> : the rotational intensity in radians/s</li>
|
||||||
|
<li><code>orientation.roll/pitch/yaw</code> : the angle of the axis in degrees</li>
|
||||||
|
<li><code>compass</code> : the direction of North in degrees</li>
|
||||||
|
</ul>
|
||||||
|
<p><b>Environment events</b></p>
|
||||||
|
<p>Environment events include readings from the temperature, humidity and pressure
|
||||||
|
sensors. They are sent at a rate of approximately 1 per second. The <code>topic</code>
|
||||||
|
is set to <code>environment</code> and the <code>payload</code> is an object
|
||||||
|
with the following values:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>temperature</code> : degrees Celsius</li>
|
||||||
|
<li><code>humidity</code> : percentage of relative humidity</li>
|
||||||
|
<li><code>pressure</code> : Millibars</li>
|
||||||
|
</ul>
|
||||||
|
<p><b>Joystick events</b></p>
|
||||||
|
<p>Joystick events are sent when the Sense HAT joystick is interacted with. The
|
||||||
|
<code>topic</code> is set to <code>joystick</code> and the <code>payload</code>
|
||||||
|
is an object with the following values:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>key</code> : one of <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code>, <code>ENTER</code></li>
|
||||||
|
<li><code>state</code> : the state of the key:
|
||||||
|
<ul>
|
||||||
|
<li><code>0</code> : the key has been released</li>
|
||||||
|
<li><code>1</code> : the key has been pressed</li>
|
||||||
|
<li><code>2</code> : the key is being held down</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="rpi-sensehat out">
|
||||||
|
<p>Raspberry Pi Sense HAT output node.</p>
|
||||||
|
<p>This node sends commands to the 8x8 LED display on the Sense HAT.</p>
|
||||||
|
<p>Commands are sent to the node in <code>msg.payload</code>. Multiple commands can
|
||||||
|
be sent in a single message by separating them with newline (\n) characters. You must
|
||||||
|
use a function node or a change node (jsonata expression) when using the newline (\n)
|
||||||
|
character to create a payload containing multiple commands.<p>
|
||||||
|
|
||||||
|
<p><b>Set the colour of individual pixels</b></p>
|
||||||
|
<p>Format: <code><x>,<y>,<colour></code>
|
||||||
|
<p><code>x</code> and <code>y</code> must either be a value from 0 to 7, a
|
||||||
|
<code>*</code> to indicate the entire row or column, or a range such as <code>3-6</code>.</p>
|
||||||
|
<p><code>colour</code> must be one of:
|
||||||
|
<ul>
|
||||||
|
<li>the well-known <a href="https://en.wikipedia.org/wiki/Web_colors" target="_new">HTML colour names</a>
|
||||||
|
- eg <code>red</code> or <code>aquamarine</code>,</li>
|
||||||
|
<li>the <a href="http://cheerlights.com/cheerlights-api/">CheerLights colour names</a>,</li>
|
||||||
|
<li>a HEX colour value - eg <code>#aa9900</code></li>
|
||||||
|
<li>an RGB triple - <code>190,255,0</code></li>
|
||||||
|
<li>or simply <code>off</code></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><i>Examples</i></p>
|
||||||
|
<p>To set the entire screen to red:</p>
|
||||||
|
<p><code>*,*,red</code></p>
|
||||||
|
<p>To set the four corners of the display to red, green (#00ff00), yellow and blue (0,0,255):</p>
|
||||||
|
<p><code>0,0,red,0,7,#00ff00,7,7,yellow,7,0,0,0,255</code></p>
|
||||||
|
<p>To set a 3-pixel wide column to purple:</p>
|
||||||
|
<p><code>4-6,*,purple</code></p>
|
||||||
|
|
||||||
|
<p><b>Rotate the screen</b></p>
|
||||||
|
<p>Format: <code>R<angle></code></p>
|
||||||
|
<p><code>angle</code> must be 0, 90, 180 or 270.</p>
|
||||||
|
<p>Example: <code>R180</code></p>
|
||||||
|
|
||||||
|
<p><b>Flip the screen</b></p>
|
||||||
|
<p>Format: <code>F<axis></code></p>
|
||||||
|
<p><code>axis</code> must be either <code>H</code> or <code>V</code> to flip on
|
||||||
|
the horizontal or vertical axis respectively.</p>
|
||||||
|
<p>Example: <code>FV</code></p>
|
||||||
|
|
||||||
|
<p><b>Scroll a message</b></p>
|
||||||
|
<p>If <code>msg.payload</code> is not recognised as any of the above commands,
|
||||||
|
it is treated as a text message to be scrolled across the screen.</p>
|
||||||
|
<p>If the text is a single character, it will be displayed without scrolling.
|
||||||
|
To scroll a single character, append a blank space after it - <code>"A "</code>.</p>
|
||||||
|
<p>The following message properties can be used to customise the appearance:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>msg.color</code> - the colour of the text, default: <code>white</code></li>
|
||||||
|
<li><code>msg.background</code> - the colour of the background, default: <code>off</code></li>
|
||||||
|
<li><code>msg.speed</code> - the scroll speed. A value in the range 1 (slower) to 5 (faster), default: <code>3</code></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><b>Set the screen brightness</b></p>
|
||||||
|
<p>Format: <code>D<level></code></p>
|
||||||
|
<p><code>level</code> must be 0 (low) or 1 (high).</p>
|
||||||
|
<p>Example: <code>D1</code></p>
|
||||||
|
</script>
|
@ -28,105 +28,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="rpi-sensehat in">
|
|
||||||
<p>Raspberry Pi Sense HAT input node.</p>
|
|
||||||
<p>This node sends readings from the various sensors on the Sense HAT,
|
|
||||||
grouped into three sets; motion events, environment events and joystick events.</p>
|
|
||||||
<p><b>Motion events</b></p>
|
|
||||||
<p>Motion events include readings from the accelerometer, gyroscope and magnetometer,
|
|
||||||
as well as the current compass heading. They are sent at a rate of approximately 10
|
|
||||||
per second. The <code>topic</code> is set to <code>motion</code> and the
|
|
||||||
<code>payload</code> is an object with the following values:</p>
|
|
||||||
<ul>
|
|
||||||
<li><code>acceleration.x/y/z</code> : the acceleration intensity in Gs</li>
|
|
||||||
<li><code>gyroscope.x/y/z</code> : the rotational intensity in radians/s</li>
|
|
||||||
<li><code>orientation.roll/pitch/yaw</code> : the angle of the axis in degrees</li>
|
|
||||||
<li><code>compass</code> : the direction of North in degrees</li>
|
|
||||||
</ul>
|
|
||||||
<p><b>Environment events</b></p>
|
|
||||||
<p>Environment events include readings from the temperature, humidity and pressure
|
|
||||||
sensors. They are sent at a rate of approximately 1 per second. The <code>topic</code>
|
|
||||||
is set to <code>environment</code> and the <code>payload</code> is an object
|
|
||||||
with the following values:</p>
|
|
||||||
<ul>
|
|
||||||
<li><code>temperature</code> : degrees Celsius</li>
|
|
||||||
<li><code>humidity</code> : percentage of relative humidity</li>
|
|
||||||
<li><code>pressure</code> : Millibars</li>
|
|
||||||
</ul>
|
|
||||||
<p><b>Joystick events</b></p>
|
|
||||||
<p>Joystick events are sent when the Sense HAT joystick is interacted with. The
|
|
||||||
<code>topic</code> is set to <code>joystick</code> and the <code>payload</code>
|
|
||||||
is an object with the following values:</p>
|
|
||||||
<ul>
|
|
||||||
<li><code>key</code> : one of <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code>, <code>ENTER</code></li>
|
|
||||||
<li><code>state</code> : the state of the key:
|
|
||||||
<ul>
|
|
||||||
<li><code>0</code> : the key has been released</li>
|
|
||||||
<li><code>1</code> : the key has been pressed</li>
|
|
||||||
<li><code>2</code> : the key is being held down</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="rpi-sensehat out">
|
|
||||||
<p>Raspberry Pi Sense HAT output node.</p>
|
|
||||||
<p>This node sends commands to the 8x8 LED display on the Sense HAT.</p>
|
|
||||||
<p>Commands are sent to the node in <code>msg.payload</code>. Multiple commands can
|
|
||||||
be sent in a single message by separating them with newline (\n) characters. You must
|
|
||||||
use a function node or a change node (jsonata expression) when using the newline (\n)
|
|
||||||
character to create a payload containing multiple commands.<p>
|
|
||||||
|
|
||||||
<p><b>Set the colour of individual pixels</b></p>
|
|
||||||
<p>Format: <code><x>,<y>,<colour></code>
|
|
||||||
<p><code>x</code> and <code>y</code> must either be a value from 0 to 7, a
|
|
||||||
<code>*</code> to indicate the entire row or column, or a range such as <code>3-6</code>.</p>
|
|
||||||
<p><code>colour</code> must be one of:
|
|
||||||
<ul>
|
|
||||||
<li>the well-known <a href="https://en.wikipedia.org/wiki/Web_colors" target="_new">HTML colour names</a>
|
|
||||||
- eg <code>red</code> or <code>aquamarine</code>,</li>
|
|
||||||
<li>the <a href="http://cheerlights.com/cheerlights-api/">CheerLights colour names</a>,</li>
|
|
||||||
<li>a HEX colour value - eg <code>#aa9900</code></li>
|
|
||||||
<li>an RGB triple - <code>190,255,0</code></li>
|
|
||||||
<li>or simply <code>off</code></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p><i>Examples</i></p>
|
|
||||||
<p>To set the entire screen to red:</p>
|
|
||||||
<p><code>*,*,red</code></p>
|
|
||||||
<p>To set the four corners of the display to red, green (#00ff00), yellow and blue (0,0,255):</p>
|
|
||||||
<p><code>0,0,red,0,7,#00ff00,7,7,yellow,7,0,0,0,255</code></p>
|
|
||||||
<p>To set a 3-pixel wide column to purple:</p>
|
|
||||||
<p><code>4-6,*,purple</code></p>
|
|
||||||
|
|
||||||
<p><b>Rotate the screen</b></p>
|
|
||||||
<p>Format: <code>R<angle></code></p>
|
|
||||||
<p><code>angle</code> must be 0, 90, 180 or 270.</p>
|
|
||||||
<p>Example: <code>R180</code></p>
|
|
||||||
|
|
||||||
<p><b>Flip the screen</b></p>
|
|
||||||
<p>Format: <code>F<axis></code></p>
|
|
||||||
<p><code>axis</code> must be either <code>H</code> or <code>V</code> to flip on
|
|
||||||
the horizontal or vertical axis respectively.</p>
|
|
||||||
<p>Example: <code>FV</code></p>
|
|
||||||
|
|
||||||
<p><b>Scroll a message</b></p>
|
|
||||||
<p>If <code>msg.payload</code> is not recognised as any of the above commands,
|
|
||||||
it is treated as a text message to be scrolled across the screen.</p>
|
|
||||||
<p>If the text is a single character, it will be displayed without scrolling.
|
|
||||||
To scroll a single character, append a blank space after it - <code>"A "</code>.</p>
|
|
||||||
<p>The following message properties can be used to customise the appearance:</p>
|
|
||||||
<ul>
|
|
||||||
<li><code>msg.color</code> - the colour of the text, default: <code>white</code></li>
|
|
||||||
<li><code>msg.background</code> - the colour of the background, default: <code>off</code></li>
|
|
||||||
<li><code>msg.speed</code> - the scroll speed. A value in the range 1 (slower) to 5 (faster), default: <code>3</code></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p><b>Set the screen brightness</b></p>
|
|
||||||
<p>Format: <code>D<level></code></p>
|
|
||||||
<p><code>level</code> must be 0 (low) or 1 (high).</p>
|
|
||||||
<p>Example: <code>D1</code></p>
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('rpi-sensehat in',{
|
RED.nodes.registerType('rpi-sensehat in',{
|
||||||
category: 'Raspberry Pi',
|
category: 'Raspberry Pi',
|
||||||
|
@ -10,17 +10,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="serial in">
|
|
||||||
<p>Reads data from a local serial port.</p>
|
|
||||||
<p>Can either <ul><li>wait for a "split" character (default \n). Also accepts hex notation (0x0d).</li>
|
|
||||||
<li>Wait for a timeout in milliseconds from the first character received</li>
|
|
||||||
<li>Wait to fill a fixed sized buffer</li></ul></p>
|
|
||||||
<p>It then outputs <code>msg.payload</code> as either a UTF8 ascii string or a binary Buffer object.</p>
|
|
||||||
<p><code>msg.port</code> is set to the name of the port selected.</p>
|
|
||||||
<p>If no split character is specified, or a timeout or buffer size of 0, then a stream of single characters
|
|
||||||
is sent - again either as ascii chars or size 1 binary buffers.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('serial in',{
|
RED.nodes.registerType('serial in',{
|
||||||
category: 'network',
|
category: 'network',
|
||||||
@ -54,14 +43,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="serial out">
|
|
||||||
<p>Provides a connection to an outbound serial port.</p>
|
|
||||||
<p>Only the <code>msg.payload</code> is sent.</p>
|
|
||||||
<p>Optionally the baudrate can be changed using <code>msg.baudrate</code></p>
|
|
||||||
<p>Optionally the new line character used to split the input can be appended to every message sent out to the serial port.</p>
|
|
||||||
<p>Binary payloads can be sent by using a Buffer object.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('serial out',{
|
RED.nodes.registerType('serial out',{
|
||||||
category: 'network',
|
category: 'network',
|
||||||
@ -95,33 +76,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="serial request">
|
|
||||||
<p>Provides a connection to a request/response serial port.</p>
|
|
||||||
<p>This node behaves as a tightly coupled combination of <code>serial in</code> and <code>serial out</code> nodes,
|
|
||||||
with which it shares the configuration.</p>
|
|
||||||
<p>Send the request message in <code>msg.payload</code> as you would do with a <code>serial out</code> node.
|
|
||||||
The message will be forwarded to the serial port following a strict FIFO (First In, First Out) queue, waiting for a single response before transmitting the next request.
|
|
||||||
Once a response is received (with the same logic of a <code>serial in</code> node), or after a timeout occurs, a message is sent to the output (see Outputs below),
|
|
||||||
with <code>msg.payload</code> containing the received response (or missing in case if timeout) and all other fields preserved.</p>
|
|
||||||
<p>For consistency with the <code>serial in</code> node, <code>msg.port</code> is set to the name of the port selected.</p>
|
|
||||||
<h3>Inputs</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<code>msg.timeout</code> is the timeout (in ms) after which the incoming message is propagated to the output with <code>msg.status</code> set to <code>"ERR_TIMEOUT"</code> and missing payload.
|
|
||||||
If not present, the default value is 10000 (10s).
|
|
||||||
</li>
|
|
||||||
<li><code>msg.count</code> if set this will override the configured number of characters as long as it is less than the number configured.</li>
|
|
||||||
<li><code>msg.waitfor</code> single character, escape code, or hex code. If set, the node will wait until it matches that character in the stream and then start the output.</li>
|
|
||||||
<li>Optionally the baudrate can be changed using <code>msg.baudrate</code></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Outputs</h3>
|
|
||||||
<ul>
|
|
||||||
<li><code>msg.payload</code> is the response. If no response occured, this field is removed.</li>
|
|
||||||
<li><code>msg.status</code> is <code>"OK"</code> in case a response is received, or <code>"ERR_TIMEOUT"</code> if a timeout occurs.</li>
|
|
||||||
<li>Any other field coming from the input will be preserved.</li>
|
|
||||||
</ul>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('serial request',{
|
RED.nodes.registerType('serial request',{
|
||||||
category: 'network',
|
category: 'network',
|
||||||
@ -272,16 +226,6 @@
|
|||||||
<div class="form-tips" id="tip-count" hidden><span data-i18n="serial.tip.count"></span></div>
|
<div class="form-tips" id="tip-count" hidden><span data-i18n="serial.tip.count"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="serial-port">
|
|
||||||
<p>Provides configuration options for a serial port.</p>
|
|
||||||
<p>The search button should return a list of available serial ports to choose from, or you
|
|
||||||
can type in the location if known.</p>
|
|
||||||
<p>The DTR, RTS, CTS and DSR switches can be used to permanently pull the corresponding flow control pin high or low, e.g. in order to power devices via those pins.</p>
|
|
||||||
<p>The node can optionally wait until it matches a pre-defined character.
|
|
||||||
The data can then be split on a fixed character, after a timeout, or after a fixed number of characters.</p>
|
|
||||||
<p>If using a character, it can be specified as either the character, the escaped shortcut (e.g. \n), or the hex code (e.g. 0x0d).</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('serial-port',{
|
RED.nodes.registerType('serial-port',{
|
||||||
category: 'config',
|
category: 'config',
|
||||||
|
56
io/serialport/locales/en-US/25-serial.html
Normal file
56
io/serialport/locales/en-US/25-serial.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="serial in">
|
||||||
|
<p>Reads data from a local serial port.</p>
|
||||||
|
<p>Can either <ul><li>wait for a "split" character (default \n). Also accepts hex notation (0x0d).</li>
|
||||||
|
<li>Wait for a timeout in milliseconds from the first character received</li>
|
||||||
|
<li>Wait to fill a fixed sized buffer</li></ul></p>
|
||||||
|
<p>It then outputs <code>msg.payload</code> as either a UTF8 ascii string or a binary Buffer object.</p>
|
||||||
|
<p><code>msg.port</code> is set to the name of the port selected.</p>
|
||||||
|
<p>If no split character is specified, or a timeout or buffer size of 0, then a stream of single characters
|
||||||
|
is sent - again either as ascii chars or size 1 binary buffers.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="serial out">
|
||||||
|
<p>Provides a connection to an outbound serial port.</p>
|
||||||
|
<p>Only the <code>msg.payload</code> is sent.</p>
|
||||||
|
<p>Optionally the baudrate can be changed using <code>msg.baudrate</code></p>
|
||||||
|
<p>Optionally the new line character used to split the input can be appended to every message sent out to the serial port.</p>
|
||||||
|
<p>Binary payloads can be sent by using a Buffer object.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="serial request">
|
||||||
|
<p>Provides a connection to a request/response serial port.</p>
|
||||||
|
<p>This node behaves as a tightly coupled combination of <code>serial in</code> and <code>serial out</code> nodes,
|
||||||
|
with which it shares the configuration.</p>
|
||||||
|
<p>Send the request message in <code>msg.payload</code> as you would do with a <code>serial out</code> node.
|
||||||
|
The message will be forwarded to the serial port following a strict FIFO (First In, First Out) queue, waiting for a single response before transmitting the next request.
|
||||||
|
Once a response is received (with the same logic of a <code>serial in</code> node), or after a timeout occurs, a message is sent to the output (see Outputs below),
|
||||||
|
with <code>msg.payload</code> containing the received response (or missing in case if timeout) and all other fields preserved.</p>
|
||||||
|
<p>For consistency with the <code>serial in</code> node, <code>msg.port</code> is set to the name of the port selected.</p>
|
||||||
|
<h3>Inputs</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<code>msg.timeout</code> is the timeout (in ms) after which the incoming message is propagated to the output with <code>msg.status</code> set to <code>"ERR_TIMEOUT"</code> and missing payload.
|
||||||
|
If not present, the default value is 10000 (10s).
|
||||||
|
</li>
|
||||||
|
<li><code>msg.count</code> if set this will override the configured number of characters as long as it is less than the number configured.</li>
|
||||||
|
<li><code>msg.waitfor</code> single character, escape code, or hex code. If set, the node will wait until it matches that character in the stream and then start the output.</li>
|
||||||
|
<li>Optionally the baudrate can be changed using <code>msg.baudrate</code></li>
|
||||||
|
</ul>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>msg.payload</code> is the response. If no response occured, this field is removed.</li>
|
||||||
|
<li><code>msg.status</code> is <code>"OK"</code> in case a response is received, or <code>"ERR_TIMEOUT"</code> if a timeout occurs.</li>
|
||||||
|
<li>Any other field coming from the input will be preserved.</li>
|
||||||
|
</ul>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="serial-port">
|
||||||
|
<p>Provides configuration options for a serial port.</p>
|
||||||
|
<p>The search button should return a list of available serial ports to choose from, or you
|
||||||
|
can type in the location if known.</p>
|
||||||
|
<p>The DTR, RTS, CTS and DSR switches can be used to permanently pull the corresponding flow control pin high or low, e.g. in order to power devices via those pins.</p>
|
||||||
|
<p>The node can optionally wait until it matches a pre-defined character.
|
||||||
|
The data can then be split on a fixed character, after a timeout, or after a fixed number of characters.</p>
|
||||||
|
<p>If using a character, it can be specified as either the character, the escaped shortcut (e.g. \n), or the hex code (e.g. 0x0d).</p>
|
||||||
|
</script>
|
@ -15,64 +15,6 @@
|
|||||||
<div class="form-tips"><span data-i18n="[html]irc.tip.in"></span></div>
|
<div class="form-tips"><span data-i18n="[html]irc.tip.in"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="irc in">
|
|
||||||
<p>Connects to a channel on an IRC server.</p>
|
|
||||||
<p>You may join multiple channels by comma separating a list - #chan1,#chan2,#etc.</p>
|
|
||||||
<p>Any messages on that channel will appear on the <code>msg.payload</code> at the output,
|
|
||||||
while <code>msg.topic</code> will contain who it is from.
|
|
||||||
<code>msg.to</code> contains either the name of the channel or PRIV in the case of a pm.</p>
|
|
||||||
<p>The second output provides a <code>msg.payload</code> that has any status messages such as joins, parts, kicks etc.</p>
|
|
||||||
<p>The type of the status message is set as <code>msg.payload.type</code>.</p>
|
|
||||||
<p>The possible status types are: <br />
|
|
||||||
<table border="1" cellpadding="1" cellspacing="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Type</th>
|
|
||||||
<th scope="col">Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>message</td>
|
|
||||||
<td>message is sent into the channel</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>pm</td>
|
|
||||||
<td>private message to the bot</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>join</td>
|
|
||||||
<td>a user joined the channel (also triggered when the bot joins a channel)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>invite</td>
|
|
||||||
<td>the bot is being invited to a channel</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>part</td>
|
|
||||||
<td>a user leaves a channel</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>quit</td>
|
|
||||||
<td>a user quits a channel</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>kick</td>
|
|
||||||
<td>a user is kicked from a channel</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>topic</td>
|
|
||||||
<td>a topic has been changed on a joined channel</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>names</td>
|
|
||||||
<td>retrieves the list of users when the bot joins a channel</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('irc in',{
|
RED.nodes.registerType('irc in',{
|
||||||
category: 'social-input',
|
category: 'social-input',
|
||||||
@ -107,7 +49,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="irc out">
|
<script type="text/x-red" data-template-name="irc out">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-ircserver"><i class="fa fa-globe"></i> <span data-i18n="irc.label.ircserver"></span></label>
|
<label for="node-input-ircserver"><i class="fa fa-globe"></i> <span data-i18n="irc.label.ircserver"></span></label>
|
||||||
@ -132,15 +73,6 @@
|
|||||||
<div class="form-tips"><span data-i18n="[html]irc.tip.out"></span></div>
|
<div class="form-tips"><span data-i18n="[html]irc.tip.out"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="irc out">
|
|
||||||
<p>Sends messages to a channel on an IRC server</p>
|
|
||||||
<p>You can send just the <code>msg.payload</code>, or the complete <code>msg</code> object to the selected channel,
|
|
||||||
or you can select to use <code>msg.topic</code> to send the <code>msg.payload</code> to a specific user (private message) or channel.</p>
|
|
||||||
<p>If multiple output channels are listed (eg. #chan1,#chan2), then the message will be sent to all of them.</p>
|
|
||||||
<p><b>Note:</b> you can only send to channels you have previously joined so they MUST be specified in the node - even if you then decide to use a subset in msg.topic</p>
|
|
||||||
<p>You may send RAW commands using <code>msg.raw</code> - This must contain an array of parameters - eg. <pre>["privmsg","#nodered","Hello world"]</pre></p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('irc out',{
|
RED.nodes.registerType('irc out',{
|
||||||
category: 'social-output',
|
category: 'social-output',
|
||||||
@ -171,7 +103,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/x-red" data-template-name="irc-server">
|
<script type="text/x-red" data-template-name="irc-server">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-config-input-server"><i class="fa fa-globe"></i> <span data-i18n="irc.label.ircserver"></span></label>
|
<label for="node-config-input-server"><i class="fa fa-globe"></i> <span data-i18n="irc.label.ircserver"></span></label>
|
||||||
|
67
social/irc/locales/en-US/91-irc.html
Normal file
67
social/irc/locales/en-US/91-irc.html
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="irc in">
|
||||||
|
<p>Connects to a channel on an IRC server.</p>
|
||||||
|
<p>You may join multiple channels by comma separating a list - #chan1,#chan2,#etc.</p>
|
||||||
|
<p>Any messages on that channel will appear on the <code>msg.payload</code> at the output,
|
||||||
|
while <code>msg.topic</code> will contain who it is from.
|
||||||
|
<code>msg.to</code> contains either the name of the channel or PRIV in the case of a pm.</p>
|
||||||
|
<p>The second output provides a <code>msg.payload</code> that has any status messages such as joins, parts, kicks etc.</p>
|
||||||
|
<p>The type of the status message is set as <code>msg.payload.type</code>.</p>
|
||||||
|
<p>The possible status types are: <br />
|
||||||
|
<table border="1" cellpadding="1" cellspacing="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Type</th>
|
||||||
|
<th scope="col">Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>message</td>
|
||||||
|
<td>message is sent into the channel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pm</td>
|
||||||
|
<td>private message to the bot</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>join</td>
|
||||||
|
<td>a user joined the channel (also triggered when the bot joins a channel)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>invite</td>
|
||||||
|
<td>the bot is being invited to a channel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>part</td>
|
||||||
|
<td>a user leaves a channel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>quit</td>
|
||||||
|
<td>a user quits a channel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>kick</td>
|
||||||
|
<td>a user is kicked from a channel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>topic</td>
|
||||||
|
<td>a topic has been changed on a joined channel</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>names</td>
|
||||||
|
<td>retrieves the list of users when the bot joins a channel</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="irc out">
|
||||||
|
<p>Sends messages to a channel on an IRC server</p>
|
||||||
|
<p>You can send just the <code>msg.payload</code>, or the complete <code>msg</code> object to the selected channel,
|
||||||
|
or you can select to use <code>msg.topic</code> to send the <code>msg.payload</code> to a specific user (private message) or channel.</p>
|
||||||
|
<p>If multiple output channels are listed (eg. #chan1,#chan2), then the message will be sent to all of them.</p>
|
||||||
|
<p><b>Note:</b> you can only send to channels you have previously joined so they MUST be specified in the node - even if you then decide to use a subset in msg.topic</p>
|
||||||
|
<p>You may send RAW commands using <code>msg.raw</code> - This must contain an array of parameters - eg. <pre>["privmsg","#nodered","Hello world"]</pre></p>
|
||||||
|
</script>
|
@ -10,13 +10,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="nnotify">
|
|
||||||
<p>Uses node-notifier to provide a desktop popup containing the <code>msg.payload</code>. Only useful on the local machine.</p>
|
|
||||||
<p>Optionally uses <code>msg.topic</code> as the title, and <code>msg.icon</code> as the full path to an icon file to display.</p>
|
|
||||||
<p>Uses node-notifier so should work cross platform but may need to intall pre-reqs... see <i><a href="https://www.npmjs.com/package/node-notifier" target="_new">this link.</a></i></p>
|
|
||||||
<p>If installing on Windows you MUST read the install instructions... or it WILL NOT work.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('nnotify',{
|
RED.nodes.registerType('nnotify',{
|
||||||
category: 'output',
|
category: 'output',
|
||||||
|
7
social/notify/locales/en-US/57-notify.html
Normal file
7
social/notify/locales/en-US/57-notify.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="nnotify">
|
||||||
|
<p>Uses node-notifier to provide a desktop popup containing the <code>msg.payload</code>. Only useful on the local machine.</p>
|
||||||
|
<p>Optionally uses <code>msg.topic</code> as the title, and <code>msg.icon</code> as the full path to an icon file to display.</p>
|
||||||
|
<p>Uses node-notifier so should work cross platform but may need to intall pre-reqs... see <i><a href="https://www.npmjs.com/package/node-notifier" target="_new">this link.</a></i></p>
|
||||||
|
<p>If installing on Windows you MUST read the install instructions... or it WILL NOT work.</p>
|
||||||
|
</script>
|
@ -39,13 +39,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="leveldb in">
|
|
||||||
<p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p>
|
|
||||||
<p>Use this node to <b>get</b>, or retrieve the data already saved in the database.</p>
|
|
||||||
<p><code>msg.topic</code> must hold the <i>key</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
|
|
||||||
<p>If nothing is found for the key then <code>msg.payload</code> is set to the <i>null</i> object.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('leveldb in',{
|
RED.nodes.registerType('leveldb in',{
|
||||||
category: 'storage-input',
|
category: 'storage-input',
|
||||||
@ -67,7 +60,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/html" data-template-name="leveldb out">
|
<script type="text/html" data-template-name="leveldb out">
|
||||||
<div class="form-row node-input-level">
|
<div class="form-row node-input-level">
|
||||||
<label for="node-input-level"><i class="fa fa-briefcase"></i> Database</label>
|
<label for="node-input-level"><i class="fa fa-briefcase"></i> Database</label>
|
||||||
@ -86,13 +78,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/html" data-help-name="leveldb out">
|
|
||||||
<p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p>
|
|
||||||
<p>Use this node to either <b>put</b> (store) the <code>msg.payload</code> to the named database file, using <code>msg.topic</code> as the key.</p>
|
|
||||||
<p>To <b>delete</b> information select delete in the properties dialogue and again use <code>msg.topic</code> as the key.</b>.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('leveldb out',{
|
RED.nodes.registerType('leveldb out',{
|
||||||
category: 'storage-output',
|
category: 'storage-output',
|
||||||
|
13
storage/leveldb/locales/en-US/67-leveldb.html
Normal file
13
storage/leveldb/locales/en-US/67-leveldb.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="leveldb in">
|
||||||
|
<p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p>
|
||||||
|
<p>Use this node to <b>get</b>, or retrieve the data already saved in the database.</p>
|
||||||
|
<p><code>msg.topic</code> must hold the <i>key</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
|
||||||
|
<p>If nothing is found for the key then <code>msg.payload</code> is set to the <i>null</i> object.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="leveldb out">
|
||||||
|
<p>Uses <a href="https://code.google.com/p/leveldb/" target="_new"><i>LevelDB</i></a> for a simple key value pair database.</p>
|
||||||
|
<p>Use this node to either <b>put</b> (store) the <code>msg.payload</code> to the named database file, using <code>msg.topic</code> as the key.</p>
|
||||||
|
<p>To <b>delete</b> information select delete in the properties dialogue and again use <code>msg.topic</code> as the key.</b>.</p>
|
||||||
|
</script>
|
@ -74,44 +74,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="mongodb">
|
|
||||||
<p>Define a connection method to your MongoDB server instance.</p>
|
|
||||||
<p>There are 3 supported options:
|
|
||||||
<details><summary>Standard/direct</summary>
|
|
||||||
For databases that request connections in the form
|
|
||||||
<code>
|
|
||||||
mongodb://[username]:[password]@[hostname]:[port]/[dbname]
|
|
||||||
</code>
|
|
||||||
Most often used for local MongoDB instances (localhost:27017), and other stand-alone instances.
|
|
||||||
</details>
|
|
||||||
<details><summary>Standard/replicaset</summary>
|
|
||||||
For databases that request connections in the form
|
|
||||||
<code>
|
|
||||||
mongodb://[username]:[password]@[hostnameA]:[port],[hostnameB]:[port]/[dbname]?replicaSet=[replsetname]
|
|
||||||
</code>
|
|
||||||
Often used with <q>database as a service</q> offerings,
|
|
||||||
or on-premises instances that have been configured for availability and resilience
|
|
||||||
</details>
|
|
||||||
<details><summary>Clustered by DNS seedlist</summary>
|
|
||||||
For databases that request connections in the form
|
|
||||||
<code>
|
|
||||||
mongodb+srv://[username]:[password]@[clustername]/[dbname]?retryWrites=true&w=majority
|
|
||||||
</code>
|
|
||||||
A configuration of MongoDB instances that provide availability and performance
|
|
||||||
through replication and sharding, accessed through a cluster alias name, rather than
|
|
||||||
by specific host:port connections. This is the default for MongoDB instances in the
|
|
||||||
<a href="https://www.mongodb.com/cloud/atlas" target="_blank">Atlas cloud service</a>.
|
|
||||||
</details>
|
|
||||||
<p><strong>Connect options</strong> is where you add the optional parameters required by your MongoDB instance.
|
|
||||||
This might include:
|
|
||||||
<ul><li>w=majority</li><li>replicaSet=replset</li><li>authSource=admin</li></ul> and any other options appropriate -
|
|
||||||
full set available at <a href="https://docs.mongodb.com/manual/reference/connection-string/" target="_blank">
|
|
||||||
Connection String URI Format — MongoDB Manual</a>.
|
|
||||||
<p>If you are connecting to <a href="https://cloud.ibm.com/catalog/services/databases-for-mongodb-group" target="_blank">
|
|
||||||
IBM Databases for MongoDB</a>, as a replica-set, be sure to append <code>ssl=true&tlsAllowInvalidCertificates=true </code>
|
|
||||||
to the <strong>Connect options</strong>.
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/html" data-template-name="mongodb out">
|
<script type="text/html" data-template-name="mongodb out">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-mongodb"><i class="fa fa-bookmark"></i> <span data-i18n="mongodb.label.server"></span></label>
|
<label for="node-input-mongodb"><i class="fa fa-bookmark"></i> <span data-i18n="mongodb.label.server"></span></label>
|
||||||
@ -152,27 +114,6 @@
|
|||||||
<div class="form-tips" id="node-warning" style="display: none"><span data-i18n="[html]mongodb.tip"></span></div>
|
<div class="form-tips" id="node-warning" style="display: none"><span data-i18n="[html]mongodb.tip"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="mongodb out">
|
|
||||||
<p>A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.</p>
|
|
||||||
<p>Save will update an existing object or insert a new object if one does not already exist.</p>
|
|
||||||
<p>Insert will insert a new object.</p>
|
|
||||||
<p>Save and insert either store <code>msg</code> or <code>msg.payload</code>.</p>
|
|
||||||
<p>Update will modify an existing object or objects. The query to select objects to update uses <code>msg.query</code>
|
|
||||||
and the update to the element uses <code>msg.payload</code>. If <code>msg.query._id</code> is
|
|
||||||
a valid mongo ObjectId string it will be converted to an ObjectId type.</p>
|
|
||||||
<p>Update can add a object if it does not exist or update multiple objects.</p>
|
|
||||||
<p>Remove will remove objects that match the query passed in on <code>msg.payload</code>. A blank query will delete
|
|
||||||
<i>all of the objects</i> in the collection.</p>
|
|
||||||
<p>You can either set the collection method in the node config or on <code>msg.collection</code>. Setting it in the
|
|
||||||
node will override <code>msg.collection</code>.</p>
|
|
||||||
<p>By default MongoDB creates an <i>_id</i> property as the primary key - so repeated injections of the
|
|
||||||
same <code>msg</code> will result in many database entries.</p>
|
|
||||||
<p>If this is NOT the desired behaviour - ie. you want repeated entries to overwrite, then you must set
|
|
||||||
the <code>msg._id</code> property to be a constant by the use of a previous function node.</p>
|
|
||||||
<p>This could be a unique constant or you could create one based on some other msg property.</p>
|
|
||||||
<p>Currently we do not limit or cap the collection size at all... this may well change.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function oneditprepare() {
|
function oneditprepare() {
|
||||||
$("#node-input-operation").change(function () {
|
$("#node-input-operation").change(function () {
|
||||||
@ -225,7 +166,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/html" data-template-name="mongodb in">
|
<script type="text/html" data-template-name="mongodb in">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-mongodb"><i class="fa fa-bookmark"></i> <span data-i18n="mongodb.label.server"></span></label>
|
<label for="node-input-mongodb"><i class="fa fa-bookmark"></i> <span data-i18n="mongodb.label.server"></span></label>
|
||||||
@ -250,21 +190,6 @@
|
|||||||
<div class="form-tips" id="node-warning" style="display: none"><span data-i18n="[html]mongodb.tip"></span></div>
|
<div class="form-tips" id="node-warning" style="display: none"><span data-i18n="[html]mongodb.tip"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="mongodb in">
|
|
||||||
<p>Calls a MongoDB collection method based on the selected operator.</p>
|
|
||||||
<p>Find queries a collection using the <code>msg.payload</code> as the query statement as per the .find() function.
|
|
||||||
Optionally, you may also (via a function) set a <code>msg.projection</code> object to constrain the returned
|
|
||||||
fields, a <code>msg.sort</code> object, a <code>msg.limit</code> number and a <code>msg.skip</code> number.</p>
|
|
||||||
<p>Count returns a count of the number of documents in a collection or matching a query using the
|
|
||||||
<code>msg.payload</code> as the query statement.</p>
|
|
||||||
<p>Aggregate provides access to the aggregation pipeline using the <code>msg.payload</code> as the pipeline array.</p>
|
|
||||||
<p>You can either set the collection method in the node config or on <code>msg.collection</code>. Setting it in
|
|
||||||
the node will override <code>msg.collection</code>.</p>
|
|
||||||
<p>See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new"><i>MongoDB
|
|
||||||
collection methods docs</i></a> for examples.</p>
|
|
||||||
<p>The result is returned in <code>msg.payload</code>.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('mongodb in', {
|
RED.nodes.registerType('mongodb in', {
|
||||||
category: 'storage-input',
|
category: 'storage-input',
|
||||||
|
74
storage/mongodb/locales/en-US/66-mongodb.html
Normal file
74
storage/mongodb/locales/en-US/66-mongodb.html
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="mongodb">
|
||||||
|
<p>Define a connection method to your MongoDB server instance.</p>
|
||||||
|
<p>There are 3 supported options:
|
||||||
|
<details><summary>Standard/direct</summary>
|
||||||
|
For databases that request connections in the form
|
||||||
|
<code>
|
||||||
|
mongodb://[username]:[password]@[hostname]:[port]/[dbname]
|
||||||
|
</code>
|
||||||
|
Most often used for local MongoDB instances (localhost:27017), and other stand-alone instances.
|
||||||
|
</details>
|
||||||
|
<details><summary>Standard/replicaset</summary>
|
||||||
|
For databases that request connections in the form
|
||||||
|
<code>
|
||||||
|
mongodb://[username]:[password]@[hostnameA]:[port],[hostnameB]:[port]/[dbname]?replicaSet=[replsetname]
|
||||||
|
</code>
|
||||||
|
Often used with <q>database as a service</q> offerings,
|
||||||
|
or on-premises instances that have been configured for availability and resilience
|
||||||
|
</details>
|
||||||
|
<details><summary>Clustered by DNS seedlist</summary>
|
||||||
|
For databases that request connections in the form
|
||||||
|
<code>
|
||||||
|
mongodb+srv://[username]:[password]@[clustername]/[dbname]?retryWrites=true&w=majority
|
||||||
|
</code>
|
||||||
|
A configuration of MongoDB instances that provide availability and performance
|
||||||
|
through replication and sharding, accessed through a cluster alias name, rather than
|
||||||
|
by specific host:port connections. This is the default for MongoDB instances in the
|
||||||
|
<a href="https://www.mongodb.com/cloud/atlas" target="_blank">Atlas cloud service</a>.
|
||||||
|
</details>
|
||||||
|
<p><strong>Connect options</strong> is where you add the optional parameters required by your MongoDB instance.
|
||||||
|
This might include:
|
||||||
|
<ul><li>w=majority</li><li>replicaSet=replset</li><li>authSource=admin</li></ul> and any other options appropriate -
|
||||||
|
full set available at <a href="https://docs.mongodb.com/manual/reference/connection-string/" target="_blank">
|
||||||
|
Connection String URI Format — MongoDB Manual</a>.
|
||||||
|
<p>If you are connecting to <a href="https://cloud.ibm.com/catalog/services/databases-for-mongodb-group" target="_blank">
|
||||||
|
IBM Databases for MongoDB</a>, as a replica-set, be sure to append <code>ssl=true&tlsAllowInvalidCertificates=true </code>
|
||||||
|
to the <strong>Connect options</strong>.
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="mongodb out">
|
||||||
|
<p>A simple MongoDB output node. Can save, insert, update and remove objects from a chosen collection.</p>
|
||||||
|
<p>Save will update an existing object or insert a new object if one does not already exist.</p>
|
||||||
|
<p>Insert will insert a new object.</p>
|
||||||
|
<p>Save and insert either store <code>msg</code> or <code>msg.payload</code>.</p>
|
||||||
|
<p>Update will modify an existing object or objects. The query to select objects to update uses <code>msg.query</code>
|
||||||
|
and the update to the element uses <code>msg.payload</code>. If <code>msg.query._id</code> is
|
||||||
|
a valid mongo ObjectId string it will be converted to an ObjectId type.</p>
|
||||||
|
<p>Update can add a object if it does not exist or update multiple objects.</p>
|
||||||
|
<p>Remove will remove objects that match the query passed in on <code>msg.payload</code>. A blank query will delete
|
||||||
|
<i>all of the objects</i> in the collection.</p>
|
||||||
|
<p>You can either set the collection method in the node config or on <code>msg.collection</code>. Setting it in the
|
||||||
|
node will override <code>msg.collection</code>.</p>
|
||||||
|
<p>By default MongoDB creates an <i>_id</i> property as the primary key - so repeated injections of the
|
||||||
|
same <code>msg</code> will result in many database entries.</p>
|
||||||
|
<p>If this is NOT the desired behaviour - ie. you want repeated entries to overwrite, then you must set
|
||||||
|
the <code>msg._id</code> property to be a constant by the use of a previous function node.</p>
|
||||||
|
<p>This could be a unique constant or you could create one based on some other msg property.</p>
|
||||||
|
<p>Currently we do not limit or cap the collection size at all... this may well change.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="mongodb in">
|
||||||
|
<p>Calls a MongoDB collection method based on the selected operator.</p>
|
||||||
|
<p>Find queries a collection using the <code>msg.payload</code> as the query statement as per the .find() function.
|
||||||
|
Optionally, you may also (via a function) set a <code>msg.projection</code> object to constrain the returned
|
||||||
|
fields, a <code>msg.sort</code> object, a <code>msg.limit</code> number and a <code>msg.skip</code> number.</p>
|
||||||
|
<p>Count returns a count of the number of documents in a collection or matching a query using the
|
||||||
|
<code>msg.payload</code> as the query statement.</p>
|
||||||
|
<p>Aggregate provides access to the aggregation pipeline using the <code>msg.payload</code> as the pipeline array.</p>
|
||||||
|
<p>You can either set the collection method in the node config or on <code>msg.collection</code>. Setting it in
|
||||||
|
the node will override <code>msg.collection</code>.</p>
|
||||||
|
<p>See the <a href="http://docs.mongodb.org/manual/reference/method/db.collection.find/" target="new"><i>MongoDB
|
||||||
|
collection methods docs</i></a> for examples.</p>
|
||||||
|
<p>The result is returned in <code>msg.payload</code>.</p>
|
||||||
|
</script>
|
@ -55,13 +55,6 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="MySQLdatabase">
|
|
||||||
<p>Add the credentials for accessing your database here.</p>
|
|
||||||
<p>Timezone can be set like GMT, EST5EDT, UTC, etc</p>
|
|
||||||
<p>The Charset defaults to the "old" 3 byte Mysql UTF8. If you need support for emojis etc then use UTF8MB4.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script type="text/html" data-template-name="mysql">
|
<script type="text/html" data-template-name="mysql">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-mydb"><i class="fa fa-database"></i> Database</label>
|
<label for="node-input-mydb"><i class="fa fa-database"></i> Database</label>
|
||||||
@ -73,18 +66,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="mysql">
|
|
||||||
<p>Allows basic access to a MySQL database.</p>
|
|
||||||
<p>This node uses the <b>query</b> operation against the configured database. This does allow both INSERTS and DELETES.
|
|
||||||
By its very nature it allows SQL injection... so <i>be careful out there...</i></p>
|
|
||||||
<p><code>msg.topic</code> must hold the <i>query</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
|
|
||||||
<p><code>msg.payload</code> can contain an array of values to bind to the topic.</p>
|
|
||||||
<p>Typically the returned payload will be an array of the result rows.</p>
|
|
||||||
<p>If nothing is found for the key then <i>null</i> is returned,</p>
|
|
||||||
<p>The reconnect timeout in milliseconds can be changed by adding a line to <b>settings.js</b>
|
|
||||||
<pre>mysqlReconnectTime: 30000,</pre></p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('mysql',{
|
RED.nodes.registerType('mysql',{
|
||||||
category: 'storage-input',
|
category: 'storage-input',
|
||||||
|
18
storage/mysql/locales/en-US/68-mysql.html
Normal file
18
storage/mysql/locales/en-US/68-mysql.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="MySQLdatabase">
|
||||||
|
<p>Add the credentials for accessing your database here.</p>
|
||||||
|
<p>Timezone can be set like GMT, EST5EDT, UTC, etc</p>
|
||||||
|
<p>The Charset defaults to the "old" 3 byte Mysql UTF8. If you need support for emojis etc then use UTF8MB4.</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/html" data-help-name="mysql">
|
||||||
|
<p>Allows basic access to a MySQL database.</p>
|
||||||
|
<p>This node uses the <b>query</b> operation against the configured database. This does allow both INSERTS and DELETES.
|
||||||
|
By its very nature it allows SQL injection... so <i>be careful out there...</i></p>
|
||||||
|
<p><code>msg.topic</code> must hold the <i>query</i> for the database, and the result is returned in <code>msg.payload</code>.</p>
|
||||||
|
<p><code>msg.payload</code> can contain an array of values to bind to the topic.</p>
|
||||||
|
<p>Typically the returned payload will be an array of the result rows.</p>
|
||||||
|
<p>If nothing is found for the key then <i>null</i> is returned,</p>
|
||||||
|
<p>The reconnect timeout in milliseconds can be changed by adding a line to <b>settings.js</b>
|
||||||
|
<pre>mysqlReconnectTime: 30000,</pre></p>
|
||||||
|
</script>
|
@ -26,11 +26,6 @@
|
|||||||
<div class="form-tips"><span data-i18n="[html]redisout.tip"></span></div>
|
<div class="form-tips"><span data-i18n="[html]redisout.tip"></span></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/x-red" data-help-name="redis out">
|
|
||||||
<p>A Redis output node. Options include Hash, Set, List and String.</p>
|
|
||||||
<p>To run this you need a local Redis server running. For details see <a href="http://redis.io/" target="_new">the Redis site</a>.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('redis out',{
|
RED.nodes.registerType('redis out',{
|
||||||
category: 'storage-output',
|
category: 'storage-output',
|
||||||
|
5
storage/redis/locales/en-US/65-redisout.html
Normal file
5
storage/redis/locales/en-US/65-redisout.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="redis out">
|
||||||
|
<p>A Redis output node. Options include Hash, Set, List and String.</p>
|
||||||
|
<p>To run this you need a local Redis server running. For details see <a href="http://redis.io/" target="_new">the Redis site</a>.</p>
|
||||||
|
</script>
|
@ -41,17 +41,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="sunrise">
|
|
||||||
<p>Uses the suncalc module to generate an output at sunrise and sunset based on a specified location.</p>
|
|
||||||
<p>Several choices of definition of sunrise and sunset are available, see the <i><a href = "https://github.com/mourner/suncalc" target="_new">suncalc</a></i> module for details.</p>
|
|
||||||
<p>The start and end times can be offset by a number of minutes before (minus) or after (plus) the chosen event time.</p>
|
|
||||||
<p>The first output emits a <code>msg.payload</code> of <i>1</i> or <i>0</i> every minute depending if in between selected times or not.
|
|
||||||
The second output emits only on the transition between night to day (<i>-> 1</i>) or day to night (<i>-> 0</i>).</p>
|
|
||||||
<p>It also outputs <code>msg.start</code>, <code>msg.end</code> and <code>msg.now</code> which are todays start and end times, with offsets applied, in ISO format, and the current ISO time.</p>
|
|
||||||
<p><code>msg.sun</code> is an object containing the azimuth and altitude, in degrees, of the current sun position.</p>
|
|
||||||
<p><code>msg.moon</code> is an object containing <thead></thead> position, phase, illumination and icon of the moon.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('sunrise',{
|
RED.nodes.registerType('sunrise',{
|
||||||
category: 'time',
|
category: 'time',
|
||||||
|
11
time/suncalc/locales/en-US/79-suncalc.html
Normal file
11
time/suncalc/locales/en-US/79-suncalc.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="sunrise">
|
||||||
|
<p>Uses the suncalc module to generate an output at sunrise and sunset based on a specified location.</p>
|
||||||
|
<p>Several choices of definition of sunrise and sunset are available, see the <i><a href = "https://github.com/mourner/suncalc" target="_new">suncalc</a></i> module for details.</p>
|
||||||
|
<p>The start and end times can be offset by a number of minutes before (minus) or after (plus) the chosen event time.</p>
|
||||||
|
<p>The first output emits a <code>msg.payload</code> of <i>1</i> or <i>0</i> every minute depending if in between selected times or not.
|
||||||
|
The second output emits only on the transition between night to day (<i>-> 1</i>) or day to night (<i>-> 0</i>).</p>
|
||||||
|
<p>It also outputs <code>msg.start</code>, <code>msg.end</code> and <code>msg.now</code> which are todays start and end times, with offsets applied, in ISO format, and the current ISO time.</p>
|
||||||
|
<p><code>msg.sun</code> is an object containing the azimuth and altitude, in degrees, of the current sun position.</p>
|
||||||
|
<p><code>msg.moon</code> is an object containing <thead></thead> position, phase, illumination and icon of the moon.</p>
|
||||||
|
</script>
|
12
time/timeswitch/locales/en-US/timeswitch.html
Normal file
12
time/timeswitch/locales/en-US/timeswitch.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="timeswitch">
|
||||||
|
<p>Timeswitch node to schedule daily on/off events.</p>
|
||||||
|
<p>Sets <code>msg.payload</code> to 1 at on time, and 0 at off time.</p>
|
||||||
|
<p>Also allows the use of sunrise and sunset.</p>
|
||||||
|
<p>Sunrise and sunset times can be offset both positively (+ve) for minutes later
|
||||||
|
or negatively (-ve) for minutes earlier.</p>
|
||||||
|
<p>The output emits a <code>msg.payload</code> of <i>1</i> or <i>0</i> every minute depending on
|
||||||
|
whether the current time is during the selected on time or off time.</p>
|
||||||
|
<p>If you just need the transitions from 0->1 or 1->0 then follow this node with an RBE node.</p>
|
||||||
|
<p>You may also optionally specify a <code>msg.topic</code> if required.</p>
|
||||||
|
</script>
|
@ -876,18 +876,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="timeswitch">
|
|
||||||
<p>Timeswitch node to schedule daily on/off events.</p>
|
|
||||||
<p>Sets <code>msg.payload</code> to 1 at on time, and 0 at off time.</p>
|
|
||||||
<p>Also allows the use of sunrise and sunset.</p>
|
|
||||||
<p>Sunrise and sunset times can be offset both positively (+ve) for minutes later
|
|
||||||
or negatively (-ve) for minutes earlier.</p>
|
|
||||||
<p>The output emits a <code>msg.payload</code> of <i>1</i> or <i>0</i> every minute depending on
|
|
||||||
whether the current time is during the selected on time or off time.</p>
|
|
||||||
<p>If you just need the transitions from 0->1 or 1->0 then follow this node with an RBE node.</p>
|
|
||||||
<p>You may also optionally specify a <code>msg.topic</code> if required.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function getSunriseSunsetUsage() {
|
function getSunriseSunsetUsage() {
|
||||||
|
@ -20,70 +20,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="annotate-image">
|
|
||||||
<p>A node that can annotate JPEG images with simple shapes and labels.</p>
|
|
||||||
<h3>Inputs</h3>
|
|
||||||
<dl class="message-properties">
|
|
||||||
<dt>payload<span class="property-type">Buffer</span></dt>
|
|
||||||
<dd>A Buffer containing a JPEG image. Support for PNG will come soon.</dd>
|
|
||||||
<dt>annotations<span class="property-type">Array</span></dt>
|
|
||||||
<dd>An array of annotations to apply to the image. See below for details
|
|
||||||
of the annotation format.</dd>
|
|
||||||
</dl>
|
|
||||||
<h3>Outputs</h3>
|
|
||||||
<dl class="message-properties">
|
|
||||||
<dt>payload<span class="property-type">Buffer</span></dt>
|
|
||||||
<dd>The image with any annotations applied.</dd>
|
|
||||||
</dl>
|
|
||||||
<h3>Details</h3>
|
|
||||||
<p>The annotations provided in <code>msg.annotations</code> are applied in order.
|
|
||||||
Each annotation is an object with the following properties:</p>
|
|
||||||
<dl class="message-properties">
|
|
||||||
<dt>type<span class="property-type">string</span></dt>
|
|
||||||
<dd><ul>
|
|
||||||
<li><code>"rect"</code> - draws a rectangle</li>
|
|
||||||
<li><code>"circle"</code> - draws a circle</li>
|
|
||||||
</dd>
|
|
||||||
<dt>x,y <span class="property-type">number</span></dt>
|
|
||||||
<dd>The top-left corner of a <code>rect</code> annotation, or the center of a <code>circle</code> annotation.</dd>
|
|
||||||
<dt>w,h <span class="property-type">number</span></dt>
|
|
||||||
<dd>The width and height of a <code>rect</code> annotation.</dd>
|
|
||||||
<dt>r <span class="property-type">number</span></dt>
|
|
||||||
<dd>The radius of a <code>circle</code> annotation.</dd>
|
|
||||||
<dt>bbox <span class="property-type">array</span></dt>
|
|
||||||
<dd>This can be used instead of <code>x</code>,<code>y</code>,<code>w</code>,<code>h</code> and <code>r</code>. It should
|
|
||||||
be an array of four values giving the bounding box of the annotation: <code>[x, y, w, h]</code>.<br>
|
|
||||||
If this property is set and <code>type</code> is not set, it will default to <code>rect</code>.</dd>
|
|
||||||
<dt>label <span class="property-type">string</span></dt>
|
|
||||||
<dd>An optional piece of text to label the annotation with</dd>
|
|
||||||
<dt>stroke <span class="property-type">string</span></dt>
|
|
||||||
<dd>The line color of the annotation. Default: <code>"#ffC000"</code></dd>
|
|
||||||
<dt>lineWidth <span class="property-type">number</span></dt>
|
|
||||||
<dd>The stroke width used to draw the annotation. Default: <code>5</code></dd>
|
|
||||||
<dt>fontSize <span class="property-type">number</span></dt>
|
|
||||||
<dd>The font size to use for the label. Default: <code>24</code></dd>
|
|
||||||
<dt>fontColor <span class="property-type">string</span></dt>
|
|
||||||
<dd>The color of the font to use for the label. Default: <code>"#ffC000"</code></dd>
|
|
||||||
<dt>labelLocation <span class="property-type">string</span></dt>
|
|
||||||
<dd>The location to place the label. Can be set to <code>top</code> or <code>bottom</code>.
|
|
||||||
Default: <code>"automatic"</code>.</dd>
|
|
||||||
</dl>
|
|
||||||
<h3>Examples</h3>
|
|
||||||
<pre> msg.annotations = [ {
|
|
||||||
type: "rect",
|
|
||||||
x: 10, y: 10, w: 50, h: 50,
|
|
||||||
label: "hello"
|
|
||||||
}]</pre>
|
|
||||||
<pre> msg.annotations = [ {
|
|
||||||
type: "circle",
|
|
||||||
x: 50, y: 50, r: 20
|
|
||||||
}]</pre>
|
|
||||||
<pre> msg.annotations = [ {
|
|
||||||
type: "rect",
|
|
||||||
bbox: [ 10, 10, 50, 50]
|
|
||||||
}]</pre>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
64
utility/annotate-image/locales/en-US/annotate.html
Normal file
64
utility/annotate-image/locales/en-US/annotate.html
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="annotate-image">
|
||||||
|
<p>A node that can annotate JPEG images with simple shapes and labels.</p>
|
||||||
|
<h3>Inputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">Buffer</span></dt>
|
||||||
|
<dd>A Buffer containing a JPEG image. Support for PNG will come soon.</dd>
|
||||||
|
<dt>annotations<span class="property-type">Array</span></dt>
|
||||||
|
<dd>An array of annotations to apply to the image. See below for details
|
||||||
|
of the annotation format.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">Buffer</span></dt>
|
||||||
|
<dd>The image with any annotations applied.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Details</h3>
|
||||||
|
<p>The annotations provided in <code>msg.annotations</code> are applied in order.
|
||||||
|
Each annotation is an object with the following properties:</p>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>type<span class="property-type">string</span></dt>
|
||||||
|
<dd><ul>
|
||||||
|
<li><code>"rect"</code> - draws a rectangle</li>
|
||||||
|
<li><code>"circle"</code> - draws a circle</li>
|
||||||
|
</dd>
|
||||||
|
<dt>x,y <span class="property-type">number</span></dt>
|
||||||
|
<dd>The top-left corner of a <code>rect</code> annotation, or the center of a <code>circle</code> annotation.</dd>
|
||||||
|
<dt>w,h <span class="property-type">number</span></dt>
|
||||||
|
<dd>The width and height of a <code>rect</code> annotation.</dd>
|
||||||
|
<dt>r <span class="property-type">number</span></dt>
|
||||||
|
<dd>The radius of a <code>circle</code> annotation.</dd>
|
||||||
|
<dt>bbox <span class="property-type">array</span></dt>
|
||||||
|
<dd>This can be used instead of <code>x</code>,<code>y</code>,<code>w</code>,<code>h</code> and <code>r</code>. It should
|
||||||
|
be an array of four values giving the bounding box of the annotation: <code>[x, y, w, h]</code>.<br>
|
||||||
|
If this property is set and <code>type</code> is not set, it will default to <code>rect</code>.</dd>
|
||||||
|
<dt>label <span class="property-type">string</span></dt>
|
||||||
|
<dd>An optional piece of text to label the annotation with</dd>
|
||||||
|
<dt>stroke <span class="property-type">string</span></dt>
|
||||||
|
<dd>The line color of the annotation. Default: <code>"#ffC000"</code></dd>
|
||||||
|
<dt>lineWidth <span class="property-type">number</span></dt>
|
||||||
|
<dd>The stroke width used to draw the annotation. Default: <code>5</code></dd>
|
||||||
|
<dt>fontSize <span class="property-type">number</span></dt>
|
||||||
|
<dd>The font size to use for the label. Default: <code>24</code></dd>
|
||||||
|
<dt>fontColor <span class="property-type">string</span></dt>
|
||||||
|
<dd>The color of the font to use for the label. Default: <code>"#ffC000"</code></dd>
|
||||||
|
<dt>labelLocation <span class="property-type">string</span></dt>
|
||||||
|
<dd>The location to place the label. Can be set to <code>top</code> or <code>bottom</code>.
|
||||||
|
Default: <code>"automatic"</code>.</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Examples</h3>
|
||||||
|
<pre> msg.annotations = [ {
|
||||||
|
type: "rect",
|
||||||
|
x: 10, y: 10, w: 50, h: 50,
|
||||||
|
label: "hello"
|
||||||
|
}]</pre>
|
||||||
|
<pre> msg.annotations = [ {
|
||||||
|
type: "circle",
|
||||||
|
x: 50, y: 50, r: 20
|
||||||
|
}]</pre>
|
||||||
|
<pre> msg.annotations = [ {
|
||||||
|
type: "rect",
|
||||||
|
bbox: [ 10, 10, 50, 50]
|
||||||
|
}]</pre>
|
||||||
|
</script>
|
@ -49,17 +49,6 @@
|
|||||||
All parameters should be passed in as arguments.</div>
|
All parameters should be passed in as arguments.</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="daemon">
|
|
||||||
<p>Calls out to a long running system command. Sends <code>msg.payload</code> to stdin of the process.</p>
|
|
||||||
<p>Provides 3 outputs... stdout, stderr, and return code , from the running command.</p>
|
|
||||||
<p>Parameters can be space separated, space separated with quotes, or a javascript array. For example `aa bb` or `"cc dd"` or `["aa","bb cc""]`.</p>
|
|
||||||
<p>If the called program stops (i.e. a return code is produced), this node can attempt to restart the command.</p>
|
|
||||||
<p>Setting <code>msg.kill</code> to a signal name (e.g. SIGINT, SIGHUP) will stop the process - but if the
|
|
||||||
restart flag is set it will then auto restart. Sending <code>msg.start</code> will also re-start the process.</p>
|
|
||||||
<p><b>Note:</b> Some applications will automatically buffer lines of output. It is advisable to turn off this behaviour.
|
|
||||||
For example, if running a Python app, the <code>-u</code> parameter will stop the output being buffered.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('daemon',{
|
RED.nodes.registerType('daemon',{
|
||||||
category: 'function',
|
category: 'function',
|
||||||
|
10
utility/daemon/locales/en-US/daemon.html
Normal file
10
utility/daemon/locales/en-US/daemon.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="daemon">
|
||||||
|
<p>Calls out to a long running system command. Sends <code>msg.payload</code> to stdin of the process.</p>
|
||||||
|
<p>Provides 3 outputs... stdout, stderr, and return code , from the running command.</p>
|
||||||
|
<p>If the called program stops (i.e. a return code is produced), this node can attempt to restart the command.</p>
|
||||||
|
<p>Setting <code>msg.kill</code> to a signal name (e.g. SIGINT, SIGHUP) will stop the process - but if the
|
||||||
|
restart flag is set it will then auto restart. Sending <code>msg.start</code> will also re-start the process.</p>
|
||||||
|
<p><b>Note:</b> Some applications will automatically buffer lines of output. It is advisable to turn off this behaviour.
|
||||||
|
For example, if running a Python app, the <code>-u</code> parameter will stop the output being buffered.</p>
|
||||||
|
</script>
|
@ -17,17 +17,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" data-help-name="exif">
|
|
||||||
<p>Extract <a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format">Exif</a> information from JPEG images.</p>
|
|
||||||
<p>This node expects an incoming JPEG image buffer in the selected property. If Exif data is present,
|
|
||||||
it extracts the data into the <code>msg.exif</code> object.</p>
|
|
||||||
<p>The node then adds location data as <code>msg.location</code>, should the Exif data carry this information.
|
|
||||||
This also includes an icon, bearing and field of view arc suitable for use in the worldmap node.
|
|
||||||
The selected input property retains the original, unmodified image buffer.</p>
|
|
||||||
<p>If configured to use the worldmap in node then the existing image payload will be replaced by the location
|
|
||||||
object so that it can be fed back to the map directly.</p>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('exif',{
|
RED.nodes.registerType('exif',{
|
||||||
category: 'utility',
|
category: 'utility',
|
||||||
|
11
utility/exif/locales/en-US/94-exif.html
Normal file
11
utility/exif/locales/en-US/94-exif.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
<script type="text/html" data-help-name="exif">
|
||||||
|
<p>Extract <a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format">Exif</a> information from JPEG images.</p>
|
||||||
|
<p>This node expects an incoming JPEG image buffer in the selected property. If Exif data is present,
|
||||||
|
it extracts the data into the <code>msg.exif</code> object.</p>
|
||||||
|
<p>The node then adds location data as <code>msg.location</code>, should the Exif data carry this information.
|
||||||
|
This also includes an icon, bearing and field of view arc suitable for use in the worldmap node.
|
||||||
|
The selected input property retains the original, unmodified image buffer.</p>
|
||||||
|
<p>If configured to use the worldmap in node then the existing image payload will be replaced by the location
|
||||||
|
object so that it can be fed back to the map directly.</p>
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user