0

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.

6replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • 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. 

    Like 2
  • 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?

    Like
    • george. tian - How fast are the values changing in the historian? The historian will only store values that have changed from the last value. 

      Like
    • Josh Wolf The values are changing every second as one is cycling between 1, 2, 4, 8, and the other is a random number generator.

      Like
    • george. tian - Ok, then you should be getting messages on the WebSocket server side every live data check interval. 

      Like
    • george. tian Please submit a support ticket and our support can assist you with troubleshooting. Thanks

      Like
print this pagePrint this page
Like Follow
  • 1 yr agoLast active
  • 6Replies
  • 95Views
  • 2 Following