Passing nodered data to other web UI

Dear nodered experts, I am having trouble with this, the concept is very simple, let say I have node-red random data (for simulation), and I want this data to be send to other web UI interface. The first thing we consider is to use the SocketIO, I am going to have a server IO in nodered and the 3rd party UI interface will just connect on it. However, I just don't know how to implement it in nodered in such that when a random integer comes, I will emit an event and pass that data. I used that node-red-contrib-socketio, but I got no luck on how to do it.
My question is.. Is there any other way to do what I want? Or can you give me some tips on how to do it using the socketio.

Thanks buddy!

Regards,

Why not MQTT?

Its simple, reliable, lightweight and works (pretty much out of the box) over web sockets!

Did you try the example chat app they refer to in the readme to see how it is configured ?
Alternatively you could use the build in websockets node ? or as Steve suggest MQTT in websockets mode also.

Dear All,

Thank you for suggestions. my other team (3rd party UI) doesn't have idea on MQTT, I do believe this is one of the best options, unfortunately they don't know it.
Anyways, I'll try to look on the websockets!

Again,
thank you!

@Henjoe

MQTT is extremely easy, lightweight and resilient to interruptions

MQTT is one of the main proponents of IoT - you & your team would do well to spend 15 mins exploring it (its that easy)

Once your data is in MQTT Broker - its avaiable for so much more.

If you use websockets only - you can get it done, but you will not gain from the may benefits of having your data available in an MQTT broker.

Easy peasy...

Check out how easy it is yourself with this little demo I did for someone else shying away from it because he didnt know MQTT

for your web devs...

In my WEB pages, I use the MQTT.js package.

closing argument...

It is of course yours (and your teams) choice - but I would put money on you ending up down the MQTT path sooner or later (especially when you decide you need the data available to other applications that either already (or will soon) support MQTT)

1 Like

Thanks buddy!

Highly appreciated this! :slight_smile:
We will consider this option!

And as a new on development, appreciated all of this suggestions.

Regards,
Henjoe

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.