I have problems with connecting to the Shelly WebSocket.
I saw others having this issue with docker. Have just updated to homeassistant/homeassistant:2023.10. Still have the problem
ws://10.102.100.254:8123/api/shelly/ws/ is where I am supposed to access the api. None of my devices show that they get connected. Tried to access it using curl just to see what happens. I get 404 errors all the way up to 10.102.100.254:8123/api/. It seems like neither shelly nor shelly/ws is there.
Where am I supposed to reach the shelly api when using docker? Can’t find any information about this. Is this a bug?
curl http://10.102.100.254:8123/api/shelly/ws/
404: Not Found
curl http://10.102.100.254:8123/api/shelly/
404: Not Found
In case anybody else runs into this issue… I’ve lost at least 2-3 hours debugging this. After reviewing the code I found out that it’s required to first add your device into home assistant manually (putting it into set mode & entering the IP into the shelly integration) before the web socket server is started. There is no auto discovery (which I was expecting)… and all the instructioin manuals are missing crucial steps…
How to set up shelly devices with websocket:
1.) Turn on the device & put it into SET (AP) mode
2.) Connect to the local WiFi AP & connect shelly to your WiFi network
3.) Enable websocket & insert your HASS url with /api/shelly/ws path
4.) Go into home assistant shelly integration setttings and add new device
5.) Make sure that your shelly is still in SET (AP) mode… insert the shelly IP into home assistant and save the settings
6.) Once shelly has been added to your integration, the “api/shelly/ws” endpoint will start working… your data will start appearing in home assistant.
I’m setting up my second shelly device and hitting this same issue. I’m seeing 404 logs in the Shelly UI and I get a 404 when making a websocket connection to the ws endpoint from postman as well.
I’ve tried following @mikrohard 's steps, but when I enter the host url of my shelly device I get an empty dialog
After reading this, I thought maybe ha opens the websocket while that dialog is open and waits for shelly to connect, but I tried connecting via postman with that dialog open and still get a 404. Am I missing something?