Recently I have been working on fixing the configuration issues in my home assistant installation. I run the supervised mode on an Ubuntu VM that I setup myself with some scripts (since it’s not supported by the official installer). Due to this, I encountered a problem with network manager in home assistant that caused home assistant to lose Internet access (so unable to download updates) even though the VM has no problems accessing the Internet as a whole.
This all started after upgrading my VM to Ubuntu 20.04 LTS and working on the network manager configuration for home assistant to get rid of those configuration warnings. The machine itself doesn’t use network manager to handle all the network configuration (though network manager can work alongside ifconfig etc), but home assistant requests it as a part of the supervised install. This all adds into my odd configuration.
The specific error I encountered is below. When searching for it, I came up with a number of solutions for settings in the home assistant GUI, however due to my odd install setup, I figured these wouldn’t lead me to the right solution.
homeassistant.components.hassio.handler.HassioAPIError: 'HomeAssistantCore.update' blocked from execution, no host internet connection
We’ll be starting in /etc/NetworkManager/NetworkManager.conf. This file is called out as a part of the network manager configuration in home assistant so it’s a good place to start. We’ll be adding the suggested configurations from the home assistant documentation to our configuration, keeping all the contents currently in those files (so not editing any of the current setup, only adding to it).
The next file is /etc/NetworkManager/system-connections/default. It too is called out in the home assistant network manager configuration docs. This is the part of my configuration changes that I think were unnecessary. I left them in as I was able to get things working and why change what works.
Once all the changes were done, a simple “service NetworkManager restart” is enough to restart the service and check to see if home assistant is working yet (by trying out our update again).
I managed to get home assistant fully functional through this, and now I have fewer complaints about my configuration. I also still get to keep my unsupported configuration on an OS that I know very well. This was simple enough, taking some lines from the suggested configurations for home assistant and adding them into my default files, while keeping the current settings in them.