Can't connect to websocket for Stream Deck integration

I have been trying for a while to connect my streamdeck with HA. I can not get the web socket to connect. Using the plugin for SD (GitHub - cgiesche/streamdeck-homeassistant: Control your Home Assistant devices from StreamDeck) I need the websocket and the secret. It says to use this format for the server url: example: ws://localhost:8123/api/websocket so i enter
ws://mydomain.duckdns.org/api/websocket then my access-token i just made and get the failed to connect error. I don’t’ know what else to do.

I followed this tutorial and yet nothing

If anyone has any ideas please let me know

Well, I used WSS:domain instead of WS and now it works. Gonna leave this up for anyone in the future.

5 Likes

I know it’s been years, but thanks for posting this. It’s still the #1 Google reply.
I was having a problem after opening my network with SSL and Nginx.

Changing to wss:ha.mydomain.net:8123/api/websocket didn’t work.

Turns out it was my nginx. It was blocking the port request.

If you are using nginx as a reverse proxy with your SSL try dropping the port number in your StreamDeck Server URL settings, i.e.
Use: wws://ha.mydomain.net/api/websocket
Not: wws://ha.mydomain.net:8123/api/websocket
The reason is that nginx already directs to a port address and adding the port to your request confuses things.

I’ll leave this here for next year when I forget and have to find it again.