HASSbian not working out of the box

@Redwards I’m also new to raspberry pi. I can walk you through how to change the file, but unfortunately it didn’t actually fix my problem :frowning:

Disclaimer: I apologize in advance for my rudimentary language describing everything, like I said I’m new at this.

Basically what you want to do is type in:
sudo nano /etc/systemd/system/[email protected]

“sudo” is what gives you permission to go into various files. “nano” is kind of like opening a document in Microsoft Word. It is a thing that lets you edit files.

Then all the code that @rchiarelly put will show up. I pasted it down here again for your reference:

# This is a simple service file for systems with systemd to tun HA as user.
#
# For details please check https://home-assistant.io/getting-started/autostart/
#

[Unit]
Description=Home Assistant for %i
After=network.target

[Service]
Type=simple
User=homeassistant
ExecStart=/srv/homeassistant/bin/hass
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

Basically put a “#” in front of where it currently says “ExecStart” and then make a new line and put in “ExecStart=/usr/local/bin/hass”. The “#” makes it so that the computer will skip that line, but if you needed to reference what you changed in the future it’s still there.

Then do CTRL+X and type “y” and the hit enter. This exits the program, says “yes” I want to save it, and then confirms that you want to save it in the same place.

This did not solve my problem though! Has anyone figured out where “hass” is located on the all-in-one installer? That’s what I’m using.

1 Like

Thank you. That makes much more sense. I am currently trying a clean install with the AIW installer.

Thanks Sam!

That fixed my issue as well.
The suggestion from EmilyBoda doesn’t work on the Hassbian image.
I had to roll back the change and restart the PI.

Rob.

I’m also having trouble. I’m on a mac and used the dd command (as described here) instead of “Etcher” to flash the HASSbian image to SD card.

I’m running the Pi headless (no display!) and it seemed to work ok but after booting the Pi (connected via ethernet cable to my internet router) and leaving it overnight, I can’t get the HASS web interface to load. When I use a LAN scanner, it finds Hassbian at 10.1.1.84 but only the SSH service (port 22) is running. There is no 8123 port!!

Any suggestions? Thank you.

One more thing, I can login via SSH but when I type “ls -l” there are no files visible! When I “cd” to the path rchiarelly suggested, it does change to that directory - weird. I also tried @rchiarelly suggestion to edit the hass setup file, but this didn’t help.

Forgot to ask, I don’t actually need to SSH in and manually start the “homeassistant” service do I?

Same boat here.

Has there been any updates to this issue on the out of box install.

I’ve also tried the Daemon instructions, and the error I get in the log says it can’t find service “hass”.
Tried “root” “user” “hassbian” “(hassbian) hassbian” “pi” in the user field

Losing my mind along with @oderuyter

Hassbian loads fine if I ssh in and do the following

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
hass

But if the SSH instance is closed, paused, or anything of that sort, hassbian turns off.

I have a few other ideas to try, but as a complete unix/raspberry pi/terminal newbie, I think I might just be chasing mythical options.

Same problems here, can’t connect to home assistant following the complete istructions on the website.
This is kind of shame and hope it gets fixed soon: I’ve been using HASS for some time and I’m in love with it, but these hassbian issues could potentially make new users look for alternatives. Just my two cents…

Just installed HASSbian 1.1, and had (I think) the same problems as others here – Pi booted fine, I could ssh in, but HASS wasn’t running.

I noted a message in syslog about not finding some YAML library. So I did a:

sudo apt-get install python3-yaml

and waited for it to install, then rebooted. Lo and behold, when it came back up, it completed the HASSbian configuration, and after ~10 minutes (doing ‘ps axuw’ to see what was going on; I have no screen on the raspi) it came up with the web interface.

YMMV…

Im getting the same problems… what was the solution?

I’m pretty new to Linux and HASS, but wanted to report in on what worked for me for posterity.

Problem
After burning the HASS1.1 image (2017-02-03-HASSbian.img) to an 8GB SD card in a USB adapter attached to my Pi3B (via linux command-line dd), then inserting the burned SD card into my Pi with attached monitor and keyboard/mouse (but no ethernet), I could boot the Pi to a login screen. I changed the password and waited at the command prompt for nothing to happen. I connected ethernet and rebooted, coming to the same command prompt. Logging in did not start any action other than blank/idle command prompt. I could not log in from another computer via HTTP to http://hassbian.local:8123/ nor to http://[THE_PI_IP_ADDRESS_HERE_NO_BRACKETS]:8123/ .

What worked for me
After trying the below, getting stuck in a boot loop, and re-flashing the image with win32diskimager, I got mine working with

sudo ./usr/local/bin/install_homeassistant.sh

It takes about 2 minutes to connect through http://hassbian.local:8123

HTTP access is still functional after rebooting

There should be directory in ~ now called hassbian-scripts

update: After installing duckdns cron, I learned that I had to follow the other suggestions from above posters too:
add “127.0.1.1 hassbian” to /etc/hosts using

sudo nano /etc/hosts



Other attempted solutions (didn’t work for me)
I added “127.0.1.1 hassbian” to /etc/hosts, as suggested by this thread (and another forum), which didn’t fix immediately

sudo nano /etc/hosts

I attempted to install services suggested by another thread

sudo pip3 install --upgrade aiohttp
sudo pip3 install --upgrade homeassistant

I checked to see if the HASS service was running via

sudo systemctl status [email protected]

(note: I had to change keyboard bindings from UK to US to get the @ sign working. I did this via sudo raspi-config then changing the keyboard in “localization settings”)

It had been loaded, but had failed to run:
Started Home Assistant for homeassistant.
[email protected]: main process exited, code=exited, status=203/EXEC
Unit [email protected] entered failed state

I attempted rchiarelly’s fix (this thread) by navigating to

sudo nano /etc/systemd/system/[email protected]

and trying “ExecStart=/usr/local/bin/hass” to no avail.

Like the previous commenters, I noticed that there is no “hass” located in /srv/homeassistant/bin/ but there is a “hass” located in /usr/local/bin/ . I navigated to the directory and ran hass manually. This engaged the setup of hass, and after 5 minutes of updating the HTTP server was working on my network!

cd ~
cd /sur/local/bin/
hass

However, rebooting the pi did not autostart hass again. I tried

sudo nano /etc/systemd/system/[email protected]

again to check spelling of “ExecStart=/usr/local/bin/hass” and to try “ExecStart=hass”, to no avail.

Addding hass to rc.local caused my Pi to be stuck in a forever-booting-and-not-responding-to-console-during-hass-launch-while-no-http-access loop.

Hello, I’m new in the forum. I have problems with the image I have downloaded.
No connection to the host. Then I tried to add a monitor to the raspberry pi how it boots but gives a “kernel panic” message at the end of the initial lines.

Make sure you’re connected via Ethernet when you first boot. See how that goes…

I have the same issue. i have ethernet connected (has to be a DHCP enabled port) but when i load hasbian for the first time it runs for 1 minute then askes for hasbian logiin and just does nothing else.

In my limited experience, it does some stuff without showing what it’s doing. I thought it wasn’t working, then a few minutes later, hassbian.local became available. Maybe yours is doing the same.

I seem to have found the problem.

for some reason after you have installed hassbian, and set the dhcpcd file to static the pi gets lost and will not connect to any network, change the settings back to dhcp and use a Ip scanner to look for it then it works and can connect.

Thanks a lot for your help. It was a SD issue B.Rgds.

I have the same problem and I am going mad now. What are the steps to get home assistant working please as I have tried everything.

I likewise just tried to install the latest Hasbian (1.23) on a Raspberry Pi v1 (which has run HomeAssistant before using the all in one installer), and have the problem of no WebUI, but I can SSH in fine.

Running
sudo systemctl status [email protected]

Gives the following output
[email protected] - Home Assistant for homeassistant Loaded: loaded (/etc/systemd/system/[email protected]; enabled) Active: failed (Result: exit-code) since Tue 2017-05-09 20:04:04 UTC; 9h ago Process: 746 ExecStart=/srv/homeassistant/bin/hass (code=exited, status=203/EXEC) Main PID: 746 (code=exited, status=203/EXEC)

May 09 20:04:04 hassbian systemd[1]: Started Home Assistant for homeassistant.
May 09 20:04:04 hassbian systemd[746]: Failed at step EXEC spawning /srv/homeassistant/bin/hass: No such file or directory
May 09 20:04:04 hassbian systemd[1]: [email protected]: main process exited, code=exited, status=203/EXEC
May 09 20:04:04 hassbian systemd[1]: Unit [email protected] entered failed state.

And indeed, looking at the failure, there is no directory /srv/homeassistant/bin/hass

Does anyone have any suggestions as to a solution?

I’ve also just noticed my Pi seems to think its May 9th, but I’m guessing that is unrelated?

Credit to @Kem this is what you need to do

sudo apt-get update
sudo apt-get upgrade
reboot