Renaming, add TailScale and update my "VanAssistant"?
By Rob Litjens
In my previous blogs about the VanAssistant i showed you that it is wise to assemble a nice good case around your Raspberry Pi. We configured that Raspberry PI with an m2 SSD in a NAS case. That case has room for ventilation, a fan and less important some nice lights. Next was the Router, a RUTX50 from Tektonika. After the router base config we were trying to implement MQTT from the Router to our Homeassistant. Which somehow did not work out that well and we needed to switch to Modbus. The update to MQTT is still waiting.
The fourth blog was about the installation of a Zigbee stick and use it with zigbee2mqtt. I even added a sensor for an open door. A left over is a way on how to connect it safely to a door. Probably a 3d printer would be helpfull to create a house to place the magnet and holder
While I promised to start with a own build thingie for my Victron MPPT charger, I decided to change topics a bit. In this Blog we are going to setup a VPN connection from HomeAssitant to the Cloud.
What are we going to do?
Yes, you read it right. We are going to setup a VPN from your Homeassistant to a free service. For other reasons I am investing time in Wireguard to setup multi a VPN container from multiple locations that should be highly available. We are not going to implement WireGuard on its own, but we will be using TailScale.
Another thing I want to talk about is renaming your HomeAsisstant and explain you that you must update your HomeAssistant regularly.
Rename your HomeAssistant
First action for me is to rename my HomeAssistant to VanAssistant. This task is rather simple:
- settings > System > Network.
At this place you can change the host name of your homeassistant.
After changing you need to reboot your raspberry. For this do the following:
- Settings > system
In the right upper corner you will find a off/on button. Look at advanced and choose to reboot the host.
setting an IP address
One of the recommendations is that you make sure that your HA instance has a way to publish its IP address. “TailScale” requires it to update its properties as part of their application. HomeAsisstant has a simple plugin to achieve it. It is called ‘Local IP Address’
You can simply install it by going to the Integrations of your HomeAsisstant installation (Settings > Devices and Services) and Click on the blue button in the right bottom named “+ Add Integration” It will ask you to start the Setup. Do so by clicking Setup. Thats it…
TailScale
For me there are a few reasons to integrate with “TailScale”. One of the advantages is the usage of the WireGuard VPN technology which is really fast and secure. I have multiple locations where I do have a HomeAssistant. Now they are all accessible by one VPN.
Looking at the picture, you can see how I would translate all heads in the image to Campervans.
Another good reason is the perfect integrating app with your mobile phone. Do you see the benefits already??
How to get started with Tailscale
First of all you need to go to their website and create a Login. I recommend you that you use an oAuth provider. Any of these is sufficient.
After this you do need to consent for “TailScale” to use your identity provider as a way to authenticate yourself. You will get a free trial for 30 days.
When that is expired, you will receive an email from them where they ask you to choose a plan. First action there should be to choose personal. That is sufficient for three users and 100 devices. So nothing to worry there.
Next step is to go to HomeAssistant
To start the setup of “TailScale”, go to settings > add-ons and press the blue button at the bottom named “Add-on Store” In the search bar type “TailScale”
click on the button to install the add-on. You will then see the following:
Press install at the bottom. This can take a some time to activate.
When installed, you need to start the Addon. You can do that by clicking on start. When done, you will see a change in the bottombar of the addon:
Click on “Open Web UI” and a Tailscale Login page will appear:
I expect this will end up in something like this:
No worries. Go back to HomeAssistant by pressing the arrow to the Left next to TailScale. It will bring you back to the AddOn page.
At the top bar of this page, you will see Log (see picture). Somewhere in that log you will find a unique url.
Search it and copy it to your clipboard. Go to a new browser window or tab and paste the copied url. If you press enter, it will open the page. It looks similar to the one from one of the previous chapters. Press Login and authenticate yourself.
This page is shown after your authentication. Press Connect to add your device.
If you go back to the Info tab of your HomeAssistant page, you should now switch the “Watchdog” and “Auto Update” to on.
That is it.
Quick introduction to VPN on your phone
Because every phone is a bit different, and i only have an Iphone, I will roughly tell you how to install TailScale on your phone. If you go to the app store of your phone and search for the TailScale app. Press Install to install it.
After that you only need to enable it and you should be able to use the HA companion app or simply a webbrowser to connect to the HA instance.
Reminder to update your HomeAssistant
Every month multiple updates are made available for your HomeAssistant. These updates are for HomeAssistant, HomeAssistant Core (the operating system of your HASS) or for addons and integrations. The updates are always announced in your configuration when clicking on Settings. Please update them
There is a blueprint available that does updates, but I have not tested it. One of them can be found here
Next time I will also spend some time on setting up a backup of your home or vanassistant.
Additional Information
Used resources in this blog:
- Local IP Address
- TailScale VPN
- TailScale Homeassistant integration
- How to get started with TailScale under 10 minutes