I have a problem with connecting Shelly Plus H&T and Plug Plus S using websocket.
I am following this documentation: Shelly - Home Assistant
I have enabled the outbound websocket on my Shelly Plus H&T and on Plug Plus S and I have used the following settings:
TLS: Default TLS
URL: wss://my-homeassistant-domain:8123/api/shelly/ws
I am running Home Assistant with https and a calid certificate, therefore I have tried to change the URL to start with wss:// instead of ws://. I have also tried with ws:// with no difference.
When I restart my device and I look into diagnostics I can see:
mgos_rpc_channel_ws:269 0x3ffd4ac4 Connecting to wss://my-homeassistant-domain:8123/api/shelly/ws, SSL? 1
mgos_rpc_channel_ws.:54 0x3ffd4ac4 WS handshake resp 404
And the error repeats.
It seems that the endpoint for the websocket is not found on my HA installation, hence the 404 error.
I also get “Not found” error when trying out the URL in Postman.
I have tried to change the url to end with /api/websocket and I get the connection however the way that endpoint is implemented is not compatible with Shelly devices and I’m getting this error:
mg_rpc.c:516 0x3ffd4ac4 INVALID FRAME (856): '{"type":"auth_invalid","message":"Auth message incorrectly formatted: extra keys not allowed @ data['dst']. Got 'ws'\nextra keys not allowed @ data['method']. Got 'NotifyFullStatus'\nextra keys not a
The firmware on the Shelly Plus H&T is 0.12 and on Plug Plus S is 0.13.
I have also other shelly devices, however they are all Gen 1 and are integrated through REST API.
My HA version is 2023.2.4.
I have searched the web and the forum and I can see that people are able to connect their Shelly devices using the URL mentioned above, however it seems that my HA instance does not expose it. Is there a way to debug what websocket endpoint HA exposes?
Is there anyone else who tried to integrate Shelly Gen 2 devices with websocket in the 2023 HA version?