Skip to main content

Hello!

i have an URL from a WebSocket API:
wss://[ip]/api/v1/devices/[DEVICE_ID]/readings/socket?auth=[key]

The output is a json.
In the documentation of the WebSocket API is no port mentioned. I only have the URL above - that's it.

Is it possible to use the trigger "WebSocket Message (received)" (Automation in FME Flow) with this URL to constantly receive data? What exactly is the stream ID in this context?
Or is this the wrong way?

Sorry, i'm new to this and i can't find any up-to-date guidance which gets me on the right track.


We are using FME Flow 2023.2.2.


Thank you very much in advance!

Hi @resch,
Thanks for the post.  I think the biggest hurdle may be the wss and the java backend of the Web Socket Publisher.  The certificate will likely need to be imported.  I suggest testing this in other clients to ensure you are on the right track.  (and perhaps you already have).

 
For the sake of not having too many ‘back and forths’ here - I recommend opening a support ticket and we can come back to the question with the pointed solution.

 

A few other notes worth mentioning:

  • wss will require a certificate to be present in the jre/security/ cacerts file of FME Flow. The Java Keytool can be used to import the certificate (in necessary). If this is a ca domain issued certificate, should not be needed to import the certificate. 
  • You might find the Chrome Extension Simple WebSocket Client useful for testing.
  • In FME Form 2023.2 I was not able to connect to this test WebSocket wss://echo.websocket.org using WebSocketSender/Receiver (now deprecated in 2024.0).  
  • In FME Form 2024.0 we have released a new WebSocketConnector (python based)… and I was able to connect to the wss://echo.websocket.org endpoint just fine.  The point here is that I could not connect to this endpoint with FME Flow Automations…
  • The new WebSocketConnector is based on python code and will use the system truststore to check for certificate validation.   Again, the Automations in FME Flow is java based - but the new connector will give you another testing environment.
  • You can install FME Form 2024.0 along side your existing FME Form 2023.2, just insure to install to a new folder in Program Files.  

Again, I think it would be good if we can take this offline and into a support case so we can be sure to get you on your way as quickly as possible.   Please include this URL in the new support ticket that you can file here: https://support.safe.com/hc/en-us/p/Support
Cheers,
Steve


Reply