Websocket connection refused
I'm trying to connect to the Canary websocket JSON payload with Python and it seems to refuse to connect. I can connect to websockets created from other sources though. The Canary websocket is on localhost and enabled.
6 replies
-
Hi george. tian , the Publisher does not act as a server accepting connections from external clients. It instead acts as a client that connects to a WebSocket server. Once it connects, it then begins to publish json data from the view that you've selected in the Publisher configuration. You'll need a WebSocket server listening that can accept incoming connections from the Publisher service.
-
Hi Josh Wolf , I got it to work (receiving data on Python's side), however it seems to be updating quite slowly. I am sending data on a test PLC through MQTT that has two values, one that goes 1, 2, 4, 8 and another that is a random real number between 0 and 8. I have this data sending in one second intervals, which comes out to about 250 bps. I have set the flush interval and live data check intervals to 0.5 seconds, however my websocket server only seems to receive data about 2-3 times a minute. I can confirm this on the Canary Publisher side that shows very little data sent. Is there another setting on the Canary side I need to adjust or do you think it's on the websocket server side?