Password to start HA in SSH

Hi,

I installed HA on an rpi, got it working fine. I restarted the rpi and now when I try to start HA in SSH, it now asks for a password. My rpi password nor the HA web GUI log in works. What password is it asking for?

Screen shot
HA_Password|690x192

Thanks
Rob

There is no need to use sudo there.

Also, this is why init scripts exist :wink: See this entry and follow the section titled Python virtual environment.

I tried sudo as I was getting the below error and randomly hoped it woud help =)
-bash: hass: command not found
Even if I go to /srv/homeassistant/bin I still get that error. I can see itā€™s listed in the folder.

I tried reinstalling ā€œpip3 install homeassistantā€ and the hass, same errorā€¦whatā€™s going on?

Thanks,
Rob

Using:
/srv/homeassistant/bin/hass -c ā€œ/home/homeassistantā€

But it looks like Iā€™ve lost my config when I reinstalled HA. I tried this based on your Autostart link but its command was:
/srv/homeassistant/bin/hass -c ā€œ/home/%i/.homeassistantā€

My homeassistant folder is not hidden plus the command didnā€™t work with /%i included. Does that matter?

-bash: hass: command not found

You didnā€™t activate the venv.

pip3 install homeassistant

You made a fresh install, possibly not in a venv.

/srv/homeassistant/bin/hass -c ā€œ/home/homeassistantā€

Your config is likely in /home/homeassistant/.homeassistant

Though, given your username, are you sure you did a manual venv install?

I followed this guide https://www.home-assistant.io/docs/installation/raspberry-pi/

Yeah, I think youā€™re right when I did the reinstall I didnā€™t do the other stepsā€¦so what Iā€™ve got two versions installed? How do I run the version in the venv?

About a year ago I played around with Hassio but there were some Cbus integrations that didnā€™t work on that setup.

Thanks for you help Tinkerer.
Rob

I provided the answer in my first response :wink:

Create /etc/systemd/system/[email protected] with:

[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"

[Install]
WantedBy=multi-user.target

then type:

sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant@homeassistant
sudo systemctl start home-assistant@homeassistant
1 Like

Thanks for perservering with me Tinkerer I did read the link in the first post but it was beyond meā€¦

You have solved my problem and very happy to report my settings are all still there.

Thanks again!
Rob

1 Like