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.
This is so cool! Thanks for sharing!
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! Working version – MQTT and Tulip Custom Widgets – Michael Ellerbeck
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.