[New Node] node-red-contrib-events: Alternative to link nodes

If you can think of something, I'd be glad to consider it.

1 Like

Yep, its a doozy - I'll sleep on it :slight_smile:

1 Like

This works also great as an data transport when you embed node-red in your own application like described in Embedding into an existing app : Node-RED . Just add:

var events=require('@totallyinformation/ti-common-event-handler');
events.on('node-red-contrib-events/**', console.log);
setInterval(function(){events.emit('node-red-contrib-events/x/y/z',{payload:'works '+Date.now()})},10000)

and you get a fexible bidirectional information flow to and from your node-red environment.

I like that approach!

1 Like

Yes, that was what initially prompted me to create the base module. It is used not only in this node but also in the uibuilder nodes and the new wiser home heating nodes. It uses the events2 module under the skin which gives you the wildcards - though I extend those to include MQTT style wildcards as well - and is meant to be faster than the normal events module. I also changed the namespace separator to use the MQTT style "/"