Error while installing Home Assistant for the first time (discovery)

Hi there,

I’ve just installed Home Assistant for the first time, using the manual installation how to from this site: Installation - Home Assistant

While installing, I got the following error:

INFO:homeassistant.util.package:Attempting install of netdisco==0.8.1
Command "/srv/homeassistant/homeassistant_venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-od4liftl/netifaces/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-tccvvi4r-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.4/netifaces --home=/tmp/tmpw6obr3sm" failed with error code 1 in /tmp/pip-build-od4liftl/netifaces/
ERROR:homeassistant.bootstrap:Not initializing discovery because could not install dependency netdisco==0.8.1

When I now start Home Assistant, I get the following message

Invalid Config

The following components and platforms could not be set up:

discovery

And idea what I can do to fix this

Regards
Dan

1 Like

You could try to install the dependency manually:

pip3 install netdisco==0.8.1

If it won’t install, you should at least get an error message in the manual process that will help figure out why.

Thanks for your quick reply! I just tried that and get the following error message, which I don’t really understand to be honest:

Command "/srv/homeassistant/homeassistant_venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2lhnv_wp/netifaces/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-82l96sef-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/homeassistant_venv/include/site/python3.4/netifaces" failed with error code 1 in /tmp/pip-build-2lhnv_wp/netifaces/

1 Like

My guess is that your system is missing a compiler.

Take a look at the existing topics: https://community.home-assistant.io/search?q=netdisco

1 Like

Thanks, fabaff - I did a “apt-get dist-upgrade”, and after that the installation went fine.

What I can’t get to work is the autostart via init.d as described here: Autostart using init.d - Community Guides - Home Assistant Community

I changed “RUN_AS” from “USER” to “homeassistant” and left the rest as it is. When I type “sudo service hass-daemon start” the shell waits for a second but does nothing, not even showing a status or error message.

/var/opt/homeassistant/home-assistant.log says

bash: hass: Kommando nicht gefunden.

What could be wrong here? Maybe the script isn’t up to date, or it’s not compatible with the manual installation method on the Raspberry Pi?

Here’s some testing output:

pi@RPiSmartHome ~ $ sudo service hass-daemon install
Installing Home Assistant Daemon (hass-daemon)
pi@RPiSmartHome ~ $ sudo service hass-daemon start
pi@RPiSmartHome ~ $ sudo service hass-daemon stop
pi@RPiSmartHome ~ $ sudo service hass-daemon asdfghjk
Usage: /etc/init.d/hass-daemon {start|stop|restart|install|uninstall}
pi@RPiSmartHome ~ $

Any idea? The only way I can start HA at the moment is with the commands from the installation guide:

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