IoT/OT in Retool and realtime handling

I was able to setup a websocket connection with a custom component. i use webhookrelay to basically turn webhooks into a websocket for me. it's rather handy, but the websocket does let you stream realtime data.

<script crossorigin src="https://cdn.socket.io/4.7.3/socket.io.min.js"></script>

webSocket = new window.WebSocket('wss://my.webhookrelay.com/v1/socket');
webSocket.addEventListener('open', onOpen);
webSocket.addEventListener('message', onMessage);
4 Likes