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.

6 replies

null
    • Senior Software Engineer
    • Josh_Wolf
    • 2 yrs ago
    • Reported - view

    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. 

    • george_tian
    • 2 yrs ago
    • Reported - view

    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?

      • Senior Software Engineer
      • Josh_Wolf
      • 2 yrs ago
      • Reported - view

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

      • george_tian
      • 2 yrs ago
      • Reported - view

      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.

      • Senior Software Engineer
      • Josh_Wolf
      • 2 yrs ago
      • Reported - view

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

      • Senior Software Engineer
      • Josh_Wolf
      • 2 yrs ago
      • Reported - view

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

Content aside

print this pagePrint this page
  • 2 yrs agoLast active
  • 6Replies
  • 156Views
  • 2 Following