Connecting to Home Assistant

Hi, first time posting here and newbie regarding this software. Not sure if I chose the right Category.

Got my Starlink dish for the cottage and since I have a few devices there that I used to access through ‘port forwarding’ on my DSL router, I installed remote.it on my RaspberryPie running Raspbian. I configured ssh and WeeWX locally as well as some web based cameras (with their own IP address, the Pie IP address) and all is working well. So I know everything is configured correctly so far.

On the Pie though, I’m also running Home Assistant through its standard 8123 port. To secure it before the Starlink dish, I had on the Pie an Apache2 Proxy in front with a SSL certificate provided by letsecrypt and DNS name by duckdns. Since remote.it does its own encryption, I simply added as a service the default non-encrypted 8123 port.

When trying to connect to that service, it starts the connection, the page starts to load and then I get a pop up saying the connection has stopped.

This is the Apache Proxy configuration for that service. As you can see, it uses websockets. Are websockets supported with remote.it? Or is there something else that prevent Home Assistant from opening correctly?

■■■■ of a post for my first post, sorry :slight_smile:

BTW, I know about Nabu Casa for Home Assistant since that’s what I’m using for my Home Assistant at home but the cottage one is small enough with no integration with Alexa and Google Home that it’s not required.

PS. I’ll need to put the config in its own posts since it interprets the links there as URL and I’m only allowed two as a new user.

Thanks.

This is the proxy config file:

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName ha.${MYDOMAIN}
    CustomLog /var/log/apache2/${LOG} combined
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =ha.${MYDOMAIN}
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName ha.${MYDOMAIN}
  ProxyPreserveHost On
  ProxyRequests off
  ProxyPass /api/websocket ws://192.168.0.122:8123/api/websocket
  ProxyPassReverse /api/websocket ws://192.168.0.122:8123/api/websocket
        ProxyPass / http://192.168.0.122:8123/
        ProxyPassReverse / http://192.168.0.122:8123/
  RewriteEngine on
  RewriteCond %{HTTP:Upgrade} =websocket [NC]
  RewriteRule /(.*)  ws://localhost:8123/$1 [P,L]
  RewriteCond %{HTTP:Upgrade} !=websocket [NC]
  RewriteRule /(.*)  http://localhost:8123/$1 [P,L]
        CustomLog /var/log/apache2/${LOG} combined
        SSLCertificateFile /etc/letsencrypt/live/ha.${MYDOMAIN}/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/ha.${MYDOMAIN}/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
    </VirtualHost>
</IfModule>

Ha ha,

You’re correct that is one heck of a first post! The real answer is “I’m not sure unless I try to set it up myself”.

However, I can suggest a couple things.

One would be to configure the remoteit connection as an https Service, then use the “named connections” feature in desktop to enable a certificate on the client side as well.

If you continue to face any issue, please send an e-mail to support@remote.it to allow us to track this issue more closely.

Thanks, I’ll try again once I get back to the cottage

1 Like