How to work with Websockets in Ignition Designer

Hello, I'm attempting to establish a connection to a websocket server using Designer. I'm utilizing Python's library for this purpose.

I've followed the instructions outlined in https://support.inductiveautomation.com/hc/en-us/articles/360056397252-Python-In-Ignition to install the websocket library.

However, I'm encountering an error where pip install indicates that websockets require Python version >= 3.4. On the contrary, the documentation mentioned above states that we cannot work with Python version > 2.5.

Do you have any suggestions or solutions for this issue?

Don't attempt to use a Python library.

You're going to have much better results with built in Java libraries. system.net.httpClient offers wrapped access to a java.net.http.HttpClient instance, which has the ability to open websocket connections. There's some prior discussion on this forum, if you search for it.

1 Like