I’m trying to connect to the Twitch IRC server, using the WebSocket Dat.
I use the information in the Twitch Dev docs, but the WebSocket is not executing the onConnect function.
I tried this on the stable releases 2022.26590 & 2022.25370 on a Windows 10 desktop PC and a Windows 11 laptop with the same result.
I also tried the SSL and Non-SSL address / port with the same result.
I can connect to a local websocket server without any problem.
There’s no WebSocket Protocol upgrade in your HTTP header returned in the monitor callback, which is strange. I just tested and was able to connect to the server, so it could be something with your system config - is your firewall configured to allow for outbound TCP connections from TouchDesigner?
Thanks for the suggestion, I added the Touchdesigner.exe and Python.exe to the windows firewall rules and allowed all outgoing and incoming connections, but I got the same result.
Then I disabled the firewall, but I get the same result.
Edit:
I reactivated the firewall, installed Python3 and the package “websocket-client” and changed the example so it connects to the Twitch IRC Server.
This works without a problem.
Ah ok gotcha! I know this still isn’t a direct solution, but I’ve also had good success with streamerbot to listen for subs and have TDs websocket talk to that. Just incase you end up needing a workaround
I added some error output when the connection fails, which should hopefully give some insight into why it’s failing for you. Here’s a build with the change:
The error is output directly to the console so you’ll need to set the environment variable TOUCH_TEXT_CONSOLE=1 to view it.