Unable to connect StreamDeck to Home Assitant via Websockets

hi, I am trying to get my streamdeck to work with Home Assistant, but I keep getting an error message

Failed to connect to wss://homeassistant.local:8123/api/websocket

you will notice that I am using wss rather than ws, thats because I have a SSL cirt loaded. I have created a Long Live Token, and I can connect to Home Assistant via Postman. so its very odd that its not working with StreamDek. wondering if anyone else is having issues.

Do you know if the stream deck addin for HA supports connection over SSL? I certainly don’t? There’s a lot more that goes into SSL than changing a URL.

Any logs indicating what the stream deck is doing when. It tries to connect? (if nothing else you could packet capture from the stream deck host box to see what was actually going on (see if it attempted SSL or not.)

Hi Nathan,

Thanks for taking the time to reply. To answer your question, yes, because it used to work until recently, but your point is well made. I will go back to see if I can contact the developer of the plugin

1 Like

Hi, I’m seeing the same thing. I’m also seeing that streamdeck is not sending webhook calls I just see on wireshark that it’s not doing anything but seeing PSH and ACK where if I use the HA app I get POST to the webhook and then a response of the JS Object notation. So seems something is up with the streamdeck integration to HA for sure… Postmand works, app works but SD plugin does not… I was working with prior version of HA. 2023.11.2

@kellyho67 I managed to get mine working, but it took me moving my domain from the DNS provider I was using to Cloudflare to fix it. The issue in my case was that the digital certificate was not being renewed properly, so when I hit wss://localhost:8123/api/websocket (the secure API connection), it would get a certificate error. Oddly enough, when I hit the https page, It wasn’t giving a certificate error. I suspect this might have been because of a cache, but I gave up thinking about it.

In my case, this was caused because my firewall decided all on its own (after a firmware update) that it would no longer allow me to port forward both port 443 and port 80 to the same host (port 80 is only used to renew the certificate) which kinda makes sense if you think about it, but is not all that helpful.

So when the Let’s Encrypt bot tried to revalidate the host. It would not work. After changing to Cloudflare which is one of the DNS providers that works without requiring port 80 I was able to get the certificate to renew and it worked.

The problem with Home Assistant is that once you have a certificate set up. Then using “http” or “ws” to hit the server will no longer work. I had thought of making a feature request to provide a way to add a second ingress point into Home Assistant in such cases when you want to hit the server from inside the firewall for devices that will not support self-signed certificates such as the Streamdek.

But I expect this will get a lot of pushback and recommendations to use Home Assistant cloud because it will enable idiots to open the Home Assistant to the internet without a secure connection. Anyway, I wish I could be more helpful. But perhaps check that your certificate is loading properly and go from there.

if you have a certificate installed on Home Assistant and its working. make sure you use wss://localhost:8123/api/websocket not ws://localhost:8123/api/websocket or it wont work no matter what you do.