Home Assistant Password in Linux Console

As not managed to install HASSIO image on Raspberry Pi installed it manually and got it working.

But when I stop the homeassistant in Linux and then try to start it using command
(homeassistant) [email protected]:~$ sudo systemctl start hassio-supervisor.service

The system asks:-

[sudo] password for homeassistant:

Tried , “raspberry” (default for raspberry), , “homeassistant” etc., nothing works.

What is the password?

The only way I can restart homeassistant is re-installing it again through below command, but it takes ages.

(homeassistant) [email protected]:~$ hass

If I try without sudo
[email protected]:~$ systemctl start hassio-supervisor.service

It prompts “Authenticating as: root”

Tried same passwords, etc, no luck. What would be the password. Have not set any other passwords than through the web-console on initial start-up of the web-page.

Where can I find the password?

Maybe this will help some of you as I am getting some progress. Summary of my understanding so far (being dummy trying to understand as official instructions do not explain any background, so if something does not work as per them, it’s challenge to debug)

  • If you install Home Assistant manually using -venv method as described in the instructions, the Home Assistant is installed under Python Virtual environment

  • Now when you restart Raspberry Pi the Home Assistant code under Python environment is not running.

  • If you try to run Home Assistant using command hass directly after logging in to Pi using user: pi password: raspberry, it will not run as it should be run under python virtual environment

  • To activate Python you need to first run command sudo -u homeassistant -H -s as otherwise although Home Assistant runs, it seems it does not have access rights to add integrations

  • Then to activate python virtual environment you can use command first activate Python venv source /src/homeassistant/bin/activate. This runs the activate shell script under folder /srv/homeassistant/bin folder (activating python).
    -Then running command hassio the home assistant will start (but it takes ages on raspberry pi

Now if in the Raspberry Linux console you want to do some modifications, the console is not running as the Python Home Assistant code is running. What I don’t know yet, if Mosquitto server can run on the background at the same time.

  • On the Raspberry console, if you want to stop Home Assistant to access console again press Ctrl + C
  • This will then take you to the Python Virtual Environment e.g (homeassistant) [email protected]:~$ This means that you are running inside Python Virtual Environment and I believe it is not possible to run Linux command. Now write exit and it takes you back to Linux root.

Modifying the configuration.yaml file after -venv istallation
The next challenge I had how to modify the configuration.yaml file. The instruction videos all refer to install the text editor in the web-browser. But apparently you cannot do that if you used -venv environment (which I had to use as hassio image did not install on the Raspberry Pi 3 B+).

You can do this by

  • Enabling the SSH Access on the Raspberry Pi

sudo systemctl enable ssh
sudo systemctl start ssh

  • Then connecting from PC using SSH console such as putty.exe by entering the IP ADDRESS of the raspberry Pi and logging is using the raspberry pi username and password
  • Now you can find the configuration.yaml file under default directory

[email protected]:/ $ cd /home/homeassistant/.homeassistant

  • And then using text editor such as nano. Sudo command in front means that SuperUser access rights are used (without it it is not possible to save the changes).

[email protected]:/home/homeassistant/.homeassistant $ sudo nano configuration.yaml

1 Like

Thank you for that. Works for me