Display fast-updating data in Tulip Player using WebSocket

Hello Eveyone,

I was searching a way to display fast-updating data in Tulip Player. There are some sensors and measurement tools that sends numerous real-time data as serial data. First of all, I tried using Machine API via Node-RED. But it was not good for performance.

Finally, I found that Node-RED can change serial data to WebSocket connection easily. And Tulip Player can access ws://localhost:1880 without any security issue. So, I created a custom widget which can connect ws://localhost:1880/ws/test via WebSocket.

Even if sensors send a lot of data in a short period like 10Hz, Tulipā€™s custom widget can handle these data with no latency because this is a local connection between sensors and Tulip Player.

Hope this helps for someone.

custome_widget

Akira

15 Likes

This is so cool! Thanks for sharing!

1 Like

You have nodered running locally on one machine and Tulip player connecting to itself? I did similar for MQTT but went cert routeā€¦ its a pain! :slight_smile: Working version ā€“ MQTT and Tulip Custom Widgets ā€“ Michael Ellerbeck

@mellerbeck
Yes. I have Node-RED and Tulip Player running locally on my PC!!

I encountered the same cert issue when I tried to connect to other host like ā€œws://computername:portā€. I realized that we need to use a certificate with a right domain name. So, the easiest way is using ws://localhost:port to avoid this cert security issue. Using a valid authorized certificate by security vendors is another solution but itā€™s hard to use in a factory which doesnā€™t have domain name.

You know, it would be interesting if Tulip could generate a letsencrypt cert for its edgeMC devices.