Are you trying to access your Home Assistant user interface but no matter how long you wait, your browser just keeps you hanging on the error screen?
Don’t worry help is on hand! Everyone who has become proficient in Home Assistant configuration has been in this position and I know how frustrating and worrying it can be.
The chances are one of these simple steps will get you back up and running before you throw the computer on the floor in a rage fit!
1. Check the address
Sometimes the solution can be excruciatingly simple. We often overlook the easy fix when our mind goes round in circles, frustrated at some technically complex device not working as expected.
Many times in my engineering career my precious time went up in smoke whilst I strived to seek out a complex solution to a problem that just needed a typo fixing.
Are you absolutely certain that you are typing the correct address into the browser?
Did you recently enabled SSL, therefore are you now using HTTPS instead of HTTP in the address bar?
If you usually use a domain name in your browser you may want to try using the exact IP address of your Home Assistant server. You can find this on the management page of your router, or by using a third party service like Fing.
You will need to find the management page and login details for your specific router, as it is different for each make and model. In my case using the stock BT Hub manager I can see my Raspberry Pi IP address.
Now that we know the exactly IP address of our Home Assistant server, we can attempt to access it directly by navigating to the IP address.
You should of course replace the IP address with your own and don’t forget to use HTTP or HTTPS depending on whether you have SSH configured. If in doubt, try both!
A sight for sore eyes.
2. Power cycle your server
Continuing with the theme of simple solutions, the next thing to try is power cycling the server. Be a little patient when the system reboots as it may take a few minutes before you can access the user interface.
Go make a nice beverage, chill, put your feet up for 10 minutes. Allow the system ample time for a reboot and then come back, cross your fingers and try navigating to the user interface.
3. Ping your Home Assistant server
Ok so your browser address is correct and rebooting didn’t solve the problem. The next thing we need to do is check the network connection so go ahead and open the terminal.
We will ping the IP address of the server and see if it responds with data. Go ahead and enter the ping command, using your server IP address.
If you are using Mac or Linux you may need to press ctrl + C to stop the ping command from running. If your network connection is healthy, you should see 0% packet loss and the data returned in a sensible time (less than a few milliseconds).
4. Check your configuration with SSH
The first three solutions probably seemed very basic to mostly everyone, but they needed to be mentioned in order to help those few people who might need it, such as people like me who would frequently overlook simple things trying to find some super-complicated fix.
One of the biggest causes of a poorly Home Assistant server is a problem with the configuration. The file editor has certainly made it harder to get yourself into this situation, however it is still possible.
Problems in your YAML configuration can cause all sorts of issues, including refusal to boot up. The supervisor should have no problem starting but you just won’t be able to access Home Assistant.
In order to get to the Home Assistant command line without access to the user interface we will need to connect to Home Assistant using SSH. In most cases this will require us to SSH to the server using the root user and the correct port.
ssh email@example.com -p 22
Note that your port may be different if you are running Home Assistant on a Linux system using Docker as the default port may be in use for generic SSH access to the machine.
From the command prompt we can now run the command to check the configuration. We are looking to see if the configuration is confirmed to be correct.
ha core check
If something is not correct then we will get some feedback that gives some indication as to what needs to be corrected.
Now we are going to need to access the configuration.yaml file using Samba file sharing. In order to do this you will need to have already installed the Samba add-on.
Go ahead and open your configuration.yaml file, you should be able to find and correct the problem as stated by the configuration checker. Removing the error and saving the file should do the trick!
After correcting the file and running the core checking command again, we now get a successful output.
All we need to do is restart Home Assistant, wait a minute or two for it to reboot and we should be able to access the user interface again!
ha core reboot
5. Check your Home Assistant log file
If you are unable to determine the error in the configuration file, the next step is to use Samba to access the log file. Go ahead and open the following file with your favorite text editor.
This should give you some more insight into what is causing the problem. If you are unable to determine the problem then you could try asking for help in the Home Assistant community by posting your log.
6. Reset configuration YAML file
You could also try temporarily resetting your configuration. First you should make a backup of your configuration.yaml file using Samba.
Next create a new configuration.yaml file in the config directory with only the default config integration.
Save the file and restart Home Assistant from the command line. This will hopefully bring you back to a point where you can access the user interface.
You can then add items from your configuration.yaml backup file back into your configuration one item at a time to try to determine what is causing the problem.
7. Restore Home Assistant from your backup
You made a backup, right?!
The last resort if you just cannot figure out what the problem is or if you are just too impatient to wait for a response in the forum (honestly just wait, everyone there is super helpful) is to reinstall Home Assistant and then restore your most recent snapshot.
This solution is not really for those who already made a backup as you will already be aware that you can recover your system.
This solution is more of a lesson; always have a backup! If you were not already aware of the Google Drive add-on, make sure you install it on your new server build.
This add-on will backup snapshots of your Home Assistant configuration to your Google Drive. It is a no-brainer.
I am the king of slacking when it comes to backups and have caused myself many headaches. I certainly learnt the hard way, so I wanted to write this post to help you avoid some of the stress that it has caused me!
It can be frustrating when Home Assistant will not start and if you have spent time building an elaborate configuration, it can be nerve wracking!
I hope that you managed to recover your Home Assistant and whether or not you are returning to your build or starting fresh, there are three things you should be definitely doing in order to prevent stress, worry and frustration.
- Install the SSH & Web Terminal add-on and make sure you can access the Home Assistant command line remotely (not just in the UI).
- Install Samba file sharing and ensure you have access to your config directory outside of the UI.
- Install the Google Drive add-on to make sure you can always recover in the event of a catastrophic failure.
If you have any suggestions for the list I would love to hear from you, please let me know in the comments! Now that you are back online, why not go check out some of my other awesome Home Assistant tutorials!