Websocket in Hass.io

Is the websocket api enabled in hass.io? i cannot seem to connect to it.


i got:

No WebSocket UPGRADE hdr: None
Can “Upgrade” only to “WebSocket”.

I’m getting the same here

i would neet this for my samsung tv, according to the config docs. (https://home-assistant.io/components/media_player.samsungtv/)

just “pip3 install websocket-client”, but how do i do this in hass.io?
i’m really new to all of this, maybe someone can tell me how to ad this manualy:


Has anyone got anywhere with this?

Nope… I was wondering too. I guess someone has to make an add-on for it.

i’m already struggling to configure my hass. :laughing:

Kinda Janky but i got things installed using the ssh connection:

apk add --update python
apk add --update py-pip
pip install websocket-client

just testing now

I tried it and looked fine but the samsung tv is still not responding to my input. Tomorrow i can try out a littlebit more.

1 Like

The Web ui still shows:

after pip install websocket-client

@Jonny_Davey yes, exactly. :smiley:

Has anyone managed to get this working. I have a samsung TV and the only way to turn it on is with websockets. I had this running on ubuntu and now just moved to a pi with hassio and cant get it to work.

Another +1 here - I’ve configured my Samsung TV as per the following:

- platform: samsungtv
  port: 8001
  mac: 84:a4:66:9:3:1b
  name: "Lounge Room TV"

The on/off control doesn’t work however, I suspect due to the missing websockets side of things.

Happy to provide more debugging if necessary - only 48 hours new to Hass.io so far however so still quite new to it all!

I had a Samsung TV working, it was on the first attempt to use HASSIO, but I had to accept the use on the Samsung TV. I am now back home (different Samsung TV) and I can’t control the TV from HASSIO.

In the information on the component it state that "When the TV is first connected, you will need to accept Home Assistant on the TV to allow communication."

How can you accept it on the TV if you miss it when you first start HASSIO? Has this been an issue for others?

I did use https://raw.githubusercontent.com/home-assistant/home-assistant-dev-helper/master/ha-websocket.html
Create and save as .html file and run it. Result is:

Connection to Home Assistant over WebSocket

Socket closed

sorry don’t get it, what am i looking at? :smiley:

Click on link. Save code from browser as .html file.
Double click to run same file and you will see output.

Yes i have done that and got the same output, and now. :wink:

Socket closed.

Hi @loki
We’re you able to get this working?

I’m wanting to get my Samsung working on hassio too