Code Monkey home page Code Monkey logo

node-red-nodes's Introduction

Node-RED

https://nodered.org

Build Status

Low-code programming for event-driven applications.

Node-RED: Low-code programming for event-driven applications

Quick Start

Check out https://nodered.org/docs/getting-started/ for full instructions on getting started.

  1. sudo npm install -g --unsafe-perm node-red
  2. node-red
  3. Open http://localhost:1880

Getting Help

More documentation can be found here.

For further help, or general discussion, please use the Node-RED Forum or slack team.

Developers

If you want to run the latest code from git, here's how to get started:

  1. Clone the code:

     git clone https://github.com/node-red/node-red.git
     cd node-red
    
  2. Install the node-red dependencies

     npm install
    
  3. Build the code

     npm run build
    
  4. Run

     npm start
    

Contributing

Before raising a pull-request, please read our contributing guide.

This project adheres to the Contributor Covenant 1.4. By participating, you are expected to uphold this code. Please report unacceptable behavior to any of the project's core team at [email protected].

Authors

Node-RED is a project of the OpenJS Foundation.

It is maintained by:

Copyright and license

Copyright OpenJS Foundation and other contributors, https://openjsf.org under the Apache 2.0 license.

node-red-nodes's People

Contributors

andreas-ibm avatar andypiper avatar awwa avatar bimalyn-ibm avatar borpin avatar cymplecy avatar dceejay avatar fr0st61te avatar glynhudson avatar hardillb avatar hdoukas avatar heikokue avatar henols avatar hindessm avatar hiroyasunishiyama avatar ibmrcruicks avatar jsbergbau avatar kazuhitoyokoi avatar knolleary avatar krisdaniels avatar meeki007 avatar natcl avatar okhiroyuki avatar olivierverhaegen avatar ryoichi-obara avatar steve-mcl avatar thiseldo avatar tmdoit avatar wnagele avatar wooferguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-nodes's Issues

Got error on install XMPP

Itried to install node-red-node-xmpp on rasperry pi with debian and on OS X and got this error message:

npm install node-red-node-xmpp

> [email protected] install /home/pi/.node-red/node_modules/node-red-node-xmpp/node_modules/simple-xmpp/node_modules/node-xmpp/node_modules/node-xmpp-core/node_modules/node-stringprep
> node-gyp rebuild

make: Entering directory '/home/pi/.node-red/node_modules/node-red-node-xmpp/node_modules/simple-xmpp/node_modules/node-xmpp/node_modules/node-xmpp-core/node_modules/node-stringprep/build'
  CXX(target) Release/obj.target/node_stringprep/node-stringprep.o
../node-stringprep.cc:2:28: fatal error: unicode/unistr.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
node_stringprep.target.mk:80: recipe for target 'Release/obj.target/node_stringprep/node-stringprep.o' failed
make: *** [Release/obj.target/node_stringprep/node-stringprep.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/node-red-node-xmpp/node_modules/simple-xmpp/node_modules/node-xmpp/node_modules/node-xmpp-core/node_modules/node-stringprep/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.18.7+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/node-red-node-xmpp/node_modules/simple-xmpp/node_modules/node-xmpp/node_modules/node-xmpp-core/node_modules/node-stringprep
gyp ERR! node -v v0.10.36
node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]

> [email protected] install /home/pi/.node-red/node_modules/node-red-node-xmpp/node_modules/simple-xmpp/node_modules/node-xmpp/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/node-stringprep
> node-gyp rebuild

It is not problem to install "npm install node-stringprep".
Any ideas?

notify when db is ready

Hi

I have tried using your level db from another module.

I can use this, this.levelConfig = RED.nodes.getNode(n.level);

Then access this.levelConfig.db.get/put

However, there is a latency issue in that I am not aware when the db has been initialised.

Suggest emitting even here:

   lvldb(this.dbname, function(err, db) {
        if (err) { node.error(err); }
        node.db = db;
        node.emit("connect");  // Flag to other modules when db is ready!
    });

From my node I can then use the following during initialisation:

    this.levelConfig.on('connect', function() { ... });

Welcome your thoughts.

Uncaught Exception parsing email with no Date field

Node-RED version: v0.10.10
Node.js version: v0.10.36

I have in my inbox for some reason an otherwise valid email with no "date" field in the header. This causes problems such as this when I have a flow that is reading the most recent email from the account in question ("email in"):

19 Jun 13:02:42 - [red] Uncaught Exception:
19 Jun 13:02:42 - TypeError: Cannot read property '0' of undefined
at Readable. (/usr/local/lib/node_modules/node-red/node_modules/node-red-node-email/61-email.js:207:65)
at Readable.emit (events.js:92:17)
at _stream_readable.js:944:16

at process._tickCallback (node.js:442:13)

207 is the "date" line from:

                                    if (info.which !== 'TEXT') {
                                        var head = Imap.parseHeader(buffer);
                                        pay.from = head.from[0];
                                        pay.topic = head.subject[0];
                                        pay.date = head.date[0];
                                        pay.header = head;

node.debug method

We have current loggin methods for each node object (implemented in Node.js):

Node.prototype.log = function(msg) {
    log_helper(this, Log.INFO, msg);
};

Node.prototype.warn = function(msg) {
    log_helper(this, Log.WARN, msg);
};

How about debug?

Node.prototype.debug = function(msg) {
    log_helper(this, Log.DEBUG, msg);
};

Pibrella buzzer node crashes Raspberry Pi sound system

If you play a sound (e.g. aplay fred.wav), and then deploy a flow that contains a pibrella output node with "buzzer" selected, there is a "crackle" when the flow starts, and after that, the sound system doesn't work.
A subsequent "aplay fred.wav" takes several seconds to complete (much longer than the duration of the sound file), but no sound comes out.
A reboot is required to reset the sound system.
This is on 0.9.0. The other pibrella outputs are fine (e.g. LEDs).

SnapChat Node Mem leak?

I think there might be a memory leak in the snapchat node. Currently trying to track it down after noticing node red was crashing out after running for a day. If anyone notices where the issue may be before me then please post in here. I will close once I have a fix.

LEDborg node fails to initialise

Pi LEDborg node fails to initialise, with:
[node-red-node-ledborg:ledborg] Info : PiBorg hardware : LedBorg not found
Which appears to be because /dev/ledborg doesn't exist.

With the new LEDborg "driverless" way of working, and with soft pwm support in Pi gpio, there's no need for the ledborg device driver, and it can be controlled (much better) through pwm on the gpio pins that drive it: 11 (R), 13 (G), 15 (B).

piface - inputs should match board

The outputs in the node are labeled 0-7 and match what is on the board. The inputs on the board are input 0-7 but the piface node uses switch 1-4 and inputs 5-8.

Shouldn't the inputs in the node be switch 0-3 and inputs 4-7 to be consistant?

Problem with Node-red on RPi2 connect multiple Ti SensorTags

Environment:
Board: Raspberry Pi 2(Running RASPBIAN)
Bluetooth Adapter: ORICO BTA-403
BLE device: Ti SensorTag CC2541
image
the first SensorTag works fine.
but the SensorTag2 does not work.(no sign of the Adapter)
they have different UUIDs.
I just want to ask How can i speak with multiple SensorTags?

extending e-mail node's usage of nodemailer createTransport

Hi.

The outgoing email node uses nodemailer to send email.
AFAIK, node-red doesn't let you change the options passed to nodemailer's createTransport method, which is crucial for use with some SMTP providers.

Some of the most well-known email providers require configuring the transport with more options other than just server and port, so it needs to be extendable in some way.

Would be more than happy to send a PR with a fix and tests, but wanted to ask about how you want to approach this.

Here's 2 cents:
Adding extra transport fields via the UI is probably not a good idea because it's too much of an edge-case, but maybe this is the sort of thing that should be extendable by passing in a msg with an extra property which contains an object that should be merged with the default configuration object.

It's not just a matter of enabling adding properties though, because right now the transport object is configured with secure: true by default, and this causes errors in some mail providers.
Removing this now would break existing flows, so if avoiding a breaking change is a priority, we could either
(a) Expose this as a checkbox in the UI which defaults to checked.
(b) Allow to override the default true by passing secure: false in the aforementioned new msg configuration property.

WDYT?

For reference:

Thanks!

node-red suncalc - issue when daytime hours traverse midnight UTC

The node-red-node-suncalc module doesn't handle daytime hours that traverse midnight UTC correctly. For example, if daylight start time is 13:00 UTC and end time is 02:00 UTC (US/Mountain time), and the suncalc is given a current time of 23:00 UTC (16:00 local), the module reports that it's night.

I've modified my local version of 79-suncalc.js to use millis since 1/1/1970 instead of minutes. If this method of calculating e1 and e2 is of interest, I'm happy to submit a pull request and patch.

var nowMillis = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate(),now.getUTCHours(),now.getUTCMinutes());
var startMillis = Date.UTC(times[node.start].getUTCFullYear(),times[node.start].getUTCMonth(),times[node.start].getUTCDate(),times[node.start].getUTCHours(),times[node.start].getUTCMinutes());
var endMillis = Date.UTC(times[node.end].getUTCFullYear(),times[node.end].getUTCMonth(),times[node.end].getUTCDate(),times[node.end].getUTCHours(),times[node.end].getUTCMinutes());
var e1 = nowMillis - startMillis;
var e2 = nowMillis - endMillis;

ReferenceError: msg2 is not defined

Hi,

By using the node "sunrise" on node-red, I'm facing the following error message:

ReferenceError: msg2 is not defined
    at Timer.<anonymous> (/node/node_modules/node-red-node-suncalc/79-suncalc.js:50:22)
    at Timer.timer.ontimeout (timers.js:242:14)

It usually happens when the node is switching from day to night event (or the contrary).

From "package.json" I can read:
"name": "node-red-node-suncalc",
  "version": "0.0.2",
  "description": "A Node-RED node to provide a signal at sunrise and sunset",
  "dependencies": {
    "suncalc": "1.5.*"
  }

Thanks.

Need stomp parameter to be sent through, for activemq to see ActiveMQTextMessage

ActiveMQ can receive either ActiveMQTextMessage content or ActiveMQBytesMessage content, depending on a couple of headers sent in with the stomp message. For systems expecting text content (as ours is), receiving byte content results in severe errors being thrown and no content being delivered.

Initially described here, inclusion of content-length header can determine whether the incoming message is expected to be one or the other.

As it turns out, in some circumstances, it might not be possible to suppress the presence of a content-length header and in those cases the hack doesn't work. However, look here for a more reliable solution:

Be aware that, by default, messages published via Stomp which include a content-length header will be converted by ActiveMQ to binary messages, and will not be visible to your web clients. Beginning with ActiveMQ 5.4.0, you can resolve this problem by always setting the *amq-msg-type* header to text in messages which will may be consumed by web clients.

So, what's needed in the nodes is a way to punch in that amq-msg-type header, to control the selection of the message type.

I've tested a hack in 18-stomp.js that allows for text type messaging, since it appears that the default for the stomp nodes is ByteMessage format. I've modified line 138 to the following:

node.client.publish(node.topic || msg.topic, msg.payload, {'amq-msg-type':'text'});

I'm thinking that it would be better to install into the stomp nodes a message type selector, allowing users to specify which message type is to be used/expected.

Also, I found that with text type messages, simply sending JSON does not work. It would be better in cases of TextMessage format to have the node test for JSON payload content and stringify if necessary.

Exif Node

@dceejay has given me some code for his initial work on an Exif node that uses node-exif:

https://github.com/gomfunkel/node-exif

I'll start coding based on his work.

Input Node

  • N/A

Output Node

  • N/A

Function Node

  • incoming msg triggers the node. Incoming msg.payload has to be a JPEG image buffer (future versions could support other Exif formats but this is not implemented). Exif information is extracted from the node. The buffer is then forwarded, however the Exif data is then forwarded alongside the original buffer.
  • We're focusing on location and the GPS data will be converted into msg.location.lat, msg.location.lon.
  • Do we want to record msg.time based on the GPS time or via other fields where we don't necessarily know the time zone? (GPS time is NOT UTC, there's no leap second support and so there's a few second offset)
    • node options
      • No node options provided
    • message options
      • msg.payload : the JPEG buffer forwarded
      • msg.location.lat, msg.location.lon, msg.time: Only populated if the Exif contains location
      • msg.exif: The Exif data parsed in as a JavaScript object
    • example flows
  • Read image from disk, attach Exif data with location, extract location data => get weather forecast => find me the best rated suitable restaurant for the weather in town

problem injecting colours to LEDborg

if you inject "020" to LEDborg node it works fine, but if you inject "#FF0000" it goes cyan. It seems to be matching the parse for the p1 test.

If however you send the #FF0000 in as msg.payload set in a function node, or from an MQTT input node, then it gets picked up by the p2 test and is processed correctly.

typeof the msg.payload in both cases looks like "string", so I'm not sure why it's different, though ISTR there's some weird difference between the output of inject and of other nodes.

Tail node and corresponding tests don't work on Windows

There's a comment associated with the tail node saying "Linux and windows only". Would be nice if possible to make this work for Windows.

Also, the corresponding unit test fails on Windows, not only because the actual functionality doesn't work, but because there's a timing window where we look to write to the test file but the file does't exist. This has been seen once or twice on the Travis build. Note that the test uses

fs.unlinkSync(fileToTail);

which on linux deletes the file but on windows only deletes when the running process completes.

Is node-red-nodes a better alternative to node-red-bluemix-nodes?

Hi, this is not really an "issue", but I noticed that the packages here overlap with the node-red-bluemix-nodes package.
I'm working on a new project on Bluemix using node-red, and I was wondering whether I should use the node-red-nodes packages instead of node-red-bluemix-nodes (the default choice in the Bluemix Node-RED starter boilerplate).
It seems the packages here are maintained better and by more people. They don't support the auto-completion of VCAP services (mongodb, mqlight, etc.), but this is a minor issue for me (copy-pasting the credentials is easy).

I noticed that all the people that contributed to node-red-bluemix-nodes also contributed to this project, so I am not starting an "ego war" :).

Thanks!
@knolleary @anna2130 @hindessm

P.S. Awesome Project!

Blink1 node doesn't handle redeploys

When I attempt to redeploy a flow with an existing and active blink(1) in it, I see this:

9 Jan 14:42:27 - [red] Stopping flows
9 Jan 14:42:27 - [red] Starting flows
9 Jan 14:42:27 - [error] [blink1:Operate Blink(1)] No Blink1 found (cannot open device with path USB_27b8_01ed_fa130000)

Restarting node-red itself, works.

Additionally, when a node-red flow using that node is running, it is not possible to access the blink(1) with other tools e.g. the blink1-tool command line.

The exclusive access of the device is probably just a documentation thing - more of an issue is that the node presumably isn't closing access to the device when the flow is restarted or redeployed.

No access to iterator for queries?

I'm not sure if I'm missing something, but the only read access to the leveldb node I can find is just a simple key in msg.topic. If we don't know the exact key and want to sort/filter the data, is there any further API access to access? I have timestamped data and need to pull out ranges, etc.

Is this possible with the current functions?

add DM capability to twitter output node

Because of the potential sensitivity about visibility of a DM versus a public tweet, it would be good if a twitter output node could be configured to send DMs.

So a "tweet" or "DM" pull down, and if you pick DM, it opens a text box to put in the recipient twitter ID.
Then call the appropriate API to send either a normal tweet or a DM.

Workaround is to prepend "D andysc " to a tweet but it would be better if it could be explicit, because of the sensitivity of getting it wrong and publicly tweeting something ;)

Also wondering about the same for an @reply, if the "in response to" original tweet ID is available in the msg structure coming in from an inbound tweet... ?

New emoncms node - possible tweaks ?

A few thoughts on emoncms node PR #25 that should be tweaked...

We like to have the Name as the last item in the html form can we move the Node field up one.
I don't know the emoncms api - is the Node value always numeric ? and optional ?

On the .js side - which should take priority ? The passed in topic or the configured topic ? (I'm not sure it matters but we will document it)
Should the node(group) also be able to be overwritten in the same way ? by passing in msg.node maybe ?

The API key credentials are stored in the node - we must document this so users are aware in case they "export" their key by mistake - Ideally they should be stored elsewhere - see the mqtt - or mysql nodes for a way to do it - or the prowl, or notify nodes for a less optimum but possibly simpler way.

bonescript

Hi, when starting node-red as a service on a beaglebone black and debian 3.8.13 (ufficial release from beaglebone.org) the bonescript nodes do not load. I If start node-red manually (node --max-old-space-size=128 red.js) they get loaded, both as root or as debian user.
The init script does work, node-red starts but without the BBB nodes and if I activate in the settings.js "functionGlobalContext: { bonescript:require('bonescript') }" node-red does not start at all as a service.
Any advice?

Twilio Node - edit panel doesn't actually do anything.

The Twilio Node edit panel from PR #8 doesn't actually do anything. It should allow "fixing" the send-to sms number.
Line 18 of the html should be

 .... data-template-name="twilio out" .... 

(ie the " out" was missing - however that then shows up the panel - which is then incorrect also, now that it is visible)

Typo in SensorTag node

Came in via email from Stephan Stadler

   if (node.stag.type === "cc2560") { // should be cc2650
        if (node.luxometer) {
            node.stag.enableLuxometer(function() {});
            node.stag.notifyLuxometer(function() {});
        } else {
            node.stag.unnotifyLuxometer(function() {});
            node.stag.disableLuxometer(function() {});
        }
    }

Arduino node not listing all serial ports

The ArduinoFirmata.list() method is filtering ports based on the following regex:


/usb|acm|com\d+/i

On my mac, when I pair a Arduino Firmata via Bluetooth the port is called /dev/tty. which gets filtered out.

Wrong user/password when use node-red-node-xmpp

Dear all,
I have problem when using node-red-node-xmpp on my node-red
it error authentication fail.
after I debug message, I got this error

{ state: 0,
domain: null,
_events: { end: [Function], close: [Function] },
_maxListeners: 10,
jid:
{ local: null,
domain: ‘demo’,
resource: null
},
password: ‘demo’,
preferredSaslMechanism: 'DIGEST-MD5',
availableSaslMechanisms:

[ { [Function: DigestMD5] super_: [Object] },
{ [Function: Plain] super_: [Object] },
{ [Function: Anonymous] super_: [Object] } ],
api_key: undefined,
access_token: undefined,
oauth2_token: undefined,
oauth2_auth: undefined,
register: undefined,
actAs: undefined,
connection:
{ domain: null,
_events:
{ connect: [Function],
stanza: [Function],
drain: [Function],
end: [Function],
close: [Function],
error: [Function] },
_maxListeners: 10,
streamAttrs: { version: '1.0', to: ‘demo’ },
xmlns:
{ '': 'jabber:client',
stream: 'http://etherx.jabber.org/streams' },
socket:
{ _connecting: true,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 0,
_pendingData: null,
_pendingEncoding: '',
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function],
_consuming: true,
serializeStanza: [Function] },
rejectUnauthorized: false,
requestCert: false,
servername: undefined,
reconnectDelay: 0,
mixins: [] } }

but after I try to use simple-xmpp module
it work

{ state: 0,
domain: null,
events: { end: [Function], close: [Function] },
maxListeners: 10,
jid:
{ local: 'demo',
domain: 'xmpp.wirelesssolution.asia',
resource: null,
user: 'demo' },
password: 'demo',
preferredSaslMechanism: 'DIGEST-MD5',
availableSaslMechanisms:
[ { [Function] super
: [Object] },
{ [Function: DigestMD5] super
: [Object] },
{ [Function: Plain] super_: [Object] },
{ [Function: Anonymous] super_: [Object] } ],
api_key: undefined,
access_token: undefined,
oauth2_token: undefined,
oauth2_auth: undefined,
register: undefined,
actAs: undefined,
connection:
{ domain: null,
_events:
{ stanza: [Function],
drain: [Function],
end: [Function],
close: [Function],
error: [Function] },
_maxListeners: 10,
streamAttrs: { version: '1.0', to: 'xmpp.wirelesssolution.asia' },
xmlns:
{ '': 'jabber:client',
stream: 'http://etherx.jabber.org/streams' },
socket:
{ _connecting: false,
_handle: null,
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
onend: null,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 0,
_pendingData: null,
_pendingEncoding: '',
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function],
_consuming: true,
serializeStanza: [Function] },
rejectUnauthorized: false,
requestCert: false,
servername: undefined,
reconnectDelay: 0,
mixins: [] } }
Yes, I'm connected!

Do you have any idea ? what I want to do.
Regards,
TIN

get last_insert_rowid() from sqlite node

Hello,

I would like to insert data in DB and then to get last_insert_rowid() ; or at least to know from the payload if the insertion was successful.
How should I do using node-red-nodes/storage/sqlite ?

I have tried multiple ways:

  1. To have 2 queries on the same sqlite query node: inset, and then select last_insert_rowid() ; I was expecting to get msg.payload as an array for each querie...
  2. I also have checked msg.payload output looking at something like "last_insert_rowid" ...

Do you have an idea how do get ID after I inserted data to table? (or having a query_status=success||error)

Thank you for your support.

XMPP - cannot receive chats, using both input and output in the same flow

Hi,
I've implemented a Gtalk Bot using node-red, and I think I've stumbled upon a bug.
If I use both xmpp input AND xmpp output nodes, I cannot receive chat messages.

After many hours of debugging (but hey, that's what we do, right? :P), I found that for some strange reason, the "chat" event, is captured by the EventEmitter of the OUTPUT node (rather than the input node).

Could it be that, because using both input and output nodes, the second node "steals" the connection somehow, thus capturing the chat events? Or some other nasty side-effect like that?

For now, I've locally patched 92-xmpp.js with an ugly fix, registering the "chat" listener on the output node, which doesn't make much sense, but works. Since the output node needs to know the id of the input node to re-route the message to it, I've saved in a global variable so I can retrieve it later (I know... :S).

The patch consists of adding this to the function that created the input node:

    function XmppInNode(n) {
        // here we save the node id globally 
        // as the 'inputId' variable to retrieve it later
        RED.nodes.inputId = n.id;

And using that id in the creation of the output node to register the listener for the 'chat' event:

    function XmppOutNode(n) {
    ....
        xmpp.on('chat', function(from, message) {
            // here we get the input node, using the previously saved node id
            var gtalkInputNode = RED.nodes.getNode(RED.nodes.inputId);

            var msg = { topic:from, payload:message };
            gtalkInputNode.send([msg,null]);
    });

Doest any of this make sense to you? Thanks!

node-red-nodes mysql pending while req.on('data')

In my setup (nod-red embedded as an express 4.9 app), the posted form are already available as 'req.body' while the callback for RED.httpAdmin.post('/MySQLdatabase/:id') still waiting for some 'data' event on req. It then goes into endless waiting.

bbb-analogue-in not working

There is a line missing in 145-BBB-hardware.js which prevents the bbb-analogue-in node from working with either bonescript or octalbonescript, as this._pin is never created. Insert after line 60:

this._pin = adjustName(this.pin);               // Adjusted for Octal if necessary

Twilio node not persisting token

When using 'local credentials' on the Twilio node, I get the following error:
[red] twilio out : RestClient requires an Account SID and Auth Token set explicitly or via the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN environment variables [red] unknown type: twilio out

Some debugging tells me the token isn't getting persisted and RED.nodes.getCredentials(n.id); returns undefined.

Thanks

SensorTag node improvements

Some changes needed in the sensortag node:

  • rogue console.log on line 40
  • No sidebar help for using the node
    • do you have to run as root?
    • what messages does it emit? (on what topics?)
    • how to handle multiple tags?

social/email-in module cannot get mail

Greetings,

I have my server, crankylinuxuser.net serving imap. After setting up the email node, I get the following error via console:

[info] [e-mail in:a72f2d64.baf0c8] Error: 140244797482880:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:795:

My server requires encrypted auth before further communicating. This IP block was previously on a spamhaus ban, which necessitated me to raise IMAP/SMTP to max security settings to have it lifted.

Is there a good chance for full encryption support to be added? If not, I'll close this.

Sincerely,
Josh Conway

Ping node always returns 0

I have set up a ping node to ping an assortment of (existing) addresses, both local and distant. It always returns 0, whatever the actual ping time was.

Currently using Git 439ca32, running on a raspberry pi.

I enabled the commented out console.log lines in the code, and it produced this:

[ping] stdout: PING github.com (192.30.252.130) 56(84) bytes of data.
64 bytes from 192.30.252.130: icmp_req=1 ttl=51 time=95.5 ms

[ping] stdout: 
--- github.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 95.518/95.518/95.518/0.000 ms

[ping] result: 0

Intermittent error with WOL node

I have an intermittent bug when trying to wake several computers at the same time, here is the output I get:

18 Nov 11:53:29 - [red] Uncaught Exception:
18 Nov 11:53:29 - Error: Not running
    at Socket._healthCheck (dgram.js:420:11)
    at Socket.close (dgram.js:327:8)
    at Object.post_write [as cb] (/home/pi/node-red/node_modules/wake_on_lan/wake_on_lan.js:54:14)
    at Object.afterSend [as oncomplete] (dgram.js:322:9)

Long restart times when connecting to ActiveMQ Stomp connector

This is a follow-on from issue #587 on node-red/node-red for details, mostly due to an initial misdiagnosis of the delayed restart problem.

The issue is that when any flow with a stomp node is connected to activemq, via the stomp connector, I see a guaranteed 2 minute pause in a re-deploy after a change.

The manifestation is that there is a message from node-red about "Stopping flows", a 2-minute wait, another "Stopping flows" followed immediately by "Stopped flows", "Starting flows", and "Started flows".

I've put in several probes. I see that the DISCONNECT is being sent from stomp-client/lib/client.js and it appears that message is being received by activemq (indicated as an increase in the count of enqueued advisory messages, seen on the activemq console). From the look of it, the callbacks in the stomp nodes are not being exercised, likely due to the lack of a call-back to stomp-client from activemq.

So the problem appears to be in the response back from activemq, from the stomp connector.

One thing I couldn't determine is where the 2 minute delay comes from. It's not from the setTimeout calls in the stomp nodes: they are only 15 second delays and, more important, that code is not getting executed.

Finally, it was suggested that, as a short-term workaround, I just call the disconnect and not wait for a callback. It would seem that this might result in some problems down the road.

Any suggestions?

Thanks,
Mark

sqlite - if database does not exist, server crashes

Hi,
if you configure an sqlite node, pointing to a database that doest not exist, the following error occurs, resulting in a server crash.

/usr/local/lib/node_modules/node-red/node_modules/node-red-node-sqlite/sqlite.js:37
            node.tick = setTimeout(doConnect, reconnect);
                                   ^
ReferenceError: doConnect is not defined
    at Database.<anonymous> (/usr/local/lib/node_modules/node-red/node_modules/node-red-node-sqlite/sqlite.js:37:40)
at Database.emit (events.js:95:17)

Moreover, since the server has crashed, it won't start up again unless the path to the database is fixed by manually editing the flow file in the filesystem.

thanks!
-Juan

Support for M2X

Would be great to see support for AT&T's M2X (m2x.att.com) as an available storage endpoint/node in Node-Red (alongside ddbout, leveldb, etc.)

ping node supports only "english" os.

It is not such a good idea to match with "from" and "ms".
E.g in german it is "von"/"ms. Russian " от " / "мс".

Ответ от 192.168.213.1: число байт=32 время<1мс TTL=64
Reply from 140.80.159.35: bytes=32 time<1ms TTL=128
Antwort von 140.80.159.35: Bytes=32 Zeit<1ms TTL=128

Chinese has TTL too.

May be
image
?

sensortag - support for the TI Sensortag 2

TI has a new version of their Sensortag. This issue is tracking support for that new version in the underlying library:

sandeepmistry/node-sensortag#34

The current state of things (March 2015) is that there are patches available from TI that add some support for the Sensortag 2, and with those supplied patches installed the node-red-node-sensortag module does work (albeit without support yet for the new sensors) though support is not yet complete. The goal is to merge everything in together and that hasn't yet happened.

I don't know the best place to discuss this, but most of the details are on the above mentioned issue. There is a little bit of subtlety involved as the new device has a couple more sensors, and the driver code in node-sensortag tries to figure out what kind of device it's talking to. I think that can be all hidden from Node-RED.

rate limiting in delay node not working as expected

I'm using limit rate to 6 per minute as an example.

It seems that the timer for the rate limiter does not start from zero at deploy time - I would expect a message sent immediately after deploy, to come straight through. It seems to come out at a random time - maybe using the timer tick of the system clock?

Also, with the "drop intermediate messages" not ticked, I would expect all messages to eventually come through. They don't get queued. It only sends through one message per time interval, and ignores any other messages in that time interval.
Ticking the box doesn't change this, so it seems to be ignored.

v0.7.2

Node prowl: error when message payload is the number 0

If the input message payload is the number 0, the prowl node gives an error message in the debug panel:
(Object) { "code": "400", "message": "Missing field: Event or description is required." }

and on the node.js stdout:
8 Feb 11:12:25 - [error] [prowl:State] [object Object]
8 Feb 11:12:25 - [log] [prowl:State] null calls to Prowl api during current hour.

What should happen:
A notification should appear on my iPhone containing the text "0"
The number 1 works correctly, a notification appears on my iPhone containing the text "1"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.