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 [email protected]
sudo systemctl start home[email protected]
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