Hey.
I just realised today - thank you covid! - that I can’t connect to my HA instance externally via HomeRemote.
I have external access controlled via NGINX and can access just fine via browser or the official HA app (both need http and websocket access)
Via HomeRemote I get a Failed to connect to XXXX, Cannost access a disposed object. Object name: System.Net.Websockets.ClientWebSocket
It seems to be that a websocket connection can’t be established.
If it helps, this is my redacted nginx config:
server {
set $forward_scheme http;
set $server "192.168.1.3";
set $port 8123;
listen 80;
listen [::]:80;
server_name xxxxxxxxxxxxxx;
# Block Exploits
include conf.d/include/block-exploits.conf;
access_log /data/logs/proxy_host-10.log proxy;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://192.168.1.3:8123;
# Authorization
#auth_basic "Authorization required";
#auth_basic_user_file /data/access/2;
#proxy_set_header Authorization "";
#
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /api/websocket {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://192.168.1.3:8123/api/websocket;
# Authorization
#auth_basic "Authorization required";
#auth_basic_user_file /data/access/2;
#proxy_set_header Authorization "";
#
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Custom
include /data/nginx/custom/server_proxy[.]conf;
}
A simple ws = new WebSocket(‘ws://xxxxxx/api/websocket’) seems to work fine from anywhere too