mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-12 04:23:04 +02:00
update node-red
This commit is contained in:
parent
f8a2ad006e
commit
a04f905a70
@ -10,6 +10,7 @@ RUN set -xe \
|
||||
ca-certificates \
|
||||
curl \
|
||||
nodejs \
|
||||
nodejs-npm \
|
||||
python3 \
|
||||
python3-dev \
|
||||
&& ln -sf /usr/bin/python3 /usr/bin/python \
|
||||
|
@ -10,6 +10,7 @@ RUN set -xe \
|
||||
ca-certificates \
|
||||
curl \
|
||||
nodejs \
|
||||
nodejs-npm \
|
||||
python3 \
|
||||
python3-dev \
|
||||
&& ln -sf /usr/bin/python3 /usr/bin/python \
|
||||
|
@ -84,6 +84,7 @@ module.exports = function(RED) {
|
||||
node.child.stdout.on('data', function (data) {
|
||||
var d = data.toString().trim().split("\n");
|
||||
for (var i = 0; i < d.length; i++) {
|
||||
if (d[i] === '') { return; }
|
||||
if (node.running && node.buttonState !== -1 && !isNaN(Number(d[i])) && node.buttonState !== d[i]) {
|
||||
node.send({ topic:"pi/"+node.pin, payload:Number(d[i]) });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user