Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Home Assistant: Add info about long install/build process #2897

Closed
Gill-Bates opened this issue Jun 7, 2019 · 10 comments
Closed
Labels
Enhancement 💨 META Everything that is not code related, e.g. GitHub, Wiki, website, community Solution available 🥂 Definite solution has been done
Milestone

Comments

@Gill-Bates
Copy link

Gill-Bates commented Jun 7, 2019

When I try to install Home Assistant, at the part of the Phyton installation, my Raspi stucks:

grafik

WARNING: seems you still have not added 'pyenv' to the load path.

Load pyenv automatically by adding the following to ~/.bashrc:
export PATH="/home/homeassistant/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Downloading Python-3.6.3.tar.xz...
-> https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
Installing Python-3.6.3...

@MichaIng
Copy link
Owner

MichaIng commented Jun 7, 2019

@Gill-Bates
It is expected that Home Assistant takes a very long time to install due to the pyenv and Python compilation. The 100% CPU load just verifies this.

Not sure about the warning, will have a look if this might imply an issue, but don't think so since it worked in the path and we didn't change something.

We are thinking about skipping the pyenv and start Home Assistant with the system-wide Python: #2374
But this requires intense testing/verification since the reason for pyenv is that Python + modules and their versions meet exactly the needs to Home Assistant. And it a slight security enhancement as well.

So try to be partitioned for now. Which RPi model is it?

@Gill-Bates
Copy link
Author

Gill-Bates commented Jun 7, 2019

I am using Versin 3. A Popup Message that the installation can take up to 1h before the installation starts would be helpful.

After installation the service is not bindend to Port 8123. went anything wrong? I get a timeout after trying to get access

t@dietpi:~# service home-assistant status
● home-assistant.service - Home Assistant (DietPi)
   Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vend
or preset: enabled)
   Active: active (running) since Sat 2019-06-08 00:52:01 CEST; 5m
in ago
 Main PID: 1060 (homeassistant-s)
   CGroup: /system.slice/home-assistant.service
           ├─1060 /bin/bash /srv/homeassistant/homeassistant-start.sh
           ├─1353 /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistan
t-3.6.3/bin/python3.6 /home/homeassistant/.pyenv/versions/homeassistant-3.6.3
/bin/hass -c /home/homeassistant/.homeassistant
           ├─1729 /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistan
t-3.6.3/bin/python3.6 -m pip install --quiet hass-nabucasa==0.13 --upgrade --
constraint /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3
/lib/python3.6/site-packages/homeassistant/package_constraints.txt
           ├─1866 /home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistan
t-3.6.3/bin/python3.6 -u -c import setuptools, tokenize;__file__='/tmp/pip-in
stall-tau_gfmy/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__fil
e__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file_
_, 'exec')) install --record /tmp/pip-record-c9v9eont/install-record.txt --si
ngle-version-externally-managed --compile --install-headers /home/homeassista
nt/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/include/site/python3.6/pycr
yptodome
           ├─2080 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_STDINT_H -DPYCRYPTO_LITTLE
_ENDIAN -DSYS_BITS=32 -DLTC_NO_ASM -DHAVE_POSIX_MEMALIGN -Isrc/ -I/home/homea
ssistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/include -I/home/homea
ssistant/.pyenv/versions/3.6.3/include/python3.6m -c src/raw_cfb.c -o build/t
emp.linux-armv7l-3.6/src/raw_cfb.o -O3
           └─2081 /usr/lib/gcc/arm-linux-gnueabihf/6/cc1 -quiet -I src/ -I /h
ome/homeassistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/include -I /
home/homeassistant/.pyenv/versions/3.6.3/include/python3.6m -imultilib . -imu
ltiarch arm-linux-gnueabihf -D_REENTRANT -D NDEBUG -D HAVE_STDINT_H -D PYCRYP
TO_LITTLE_ENDIAN -D SYS_BITS=32 -D LTC_NO_ASM -D HAVE_POSIX_MEMALIGN src/raw_
cfb.c -quiet -dumpbase raw_cfb.c -march=armv6 -mfloat-abi=hard -mfpu=vfp -mtl
s-dialect=gnu -auxbase-strip build/temp.linux-armv7l-3.6/src/raw_cfb.o -g -O3
 -O3 -Wno-unused-result -Wsign-compare -Wall -Wstrict-prototypes -fwrapv -fPI
C -o /tmp/ccSZCZ9e.s

Jun 08 00:53:57 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:53:57 INFO
 (SyncWorker_15) [homeassistant.util.package] Attempting install of distro==1
.4.0
Jun 08 00:54:05 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:05 INFO
 (MainThread) [homeassistant.setup] Setting up updater
Jun 08 00:54:05 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:05 INFO
 (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds.
Jun 08 00:54:05 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:05 INFO
 (SyncWorker_17) [homeassistant.util.package] Attempting install of xmltodict
==0.12.0
Jun 08 00:54:13 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:13 INFO
 (MainThread) [homeassistant.components.sensor] Setting up sensor.yr
Jun 08 00:54:14 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:14 INFO
 (SyncWorker_2) [homeassistant.util.package] Attempting install of mutagen==1
.42.0
Jun 08 00:54:15 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:15 INFO
 (MainThread) [homeassistant.setup] Setup of domain sensor took 38.4 seconds.
Jun 08 00:54:32 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:32 INFO
 (SyncWorker_0) [homeassistant.loader] Loaded google_translate from homeassis
tant.components.google_translate
Jun 08 00:54:32 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:32 INFO
 (SyncWorker_19) [homeassistant.util.package] Attempting install of hass-nabu
casa==0.13
Jun 08 00:54:32 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:32 INFO
 (MainThread) [homeassistant.setup] Setting up tts

@MichaIng
Copy link
Owner

MichaIng commented Jun 24, 2019

@Gill-Bates

Jun 08 00:54:32 dietpi homeassistant-start.sh[1060]: 2019-06-08 00:54:32 INFO
(MainThread) [homeassistant.setup] Setting up tts

I know from recent Mycroft AI setup that TTS compilation indeed can take a long while. I am just trying on VM now to check which steps take how long here.


Okay initial start and web UI indeed took a while: [homeassistant.bootstrap] Home Assistant initialized in 226.59s

  • As your service status has shown active (running) and the log does not show an error but processing logs, I think it is indeed just taking longer. Has it finished meanwhile?

Indeed I think we should add a hint to our online docs or when installing, that this can take a while, as well as first service start and first open of web UI.

@MichaIng
Copy link
Owner

Added hint to online docs: https://dietpi.com/phpbb/viewtopic.php?p=10416#p10416
Reviewing install process and adding hint to dietpi-software with v6.27.

@MichaIng MichaIng modified the milestones: v6.26, v6.27 Oct 15, 2019
@MichaIng MichaIng added the META Everything that is not code related, e.g. GitHub, Wiki, website, community label Oct 15, 2019
@MichaIng MichaIng changed the title Installation of Home Assistant (Software) stuck DietPi-Software | Home Assistant: Add info about long install/build process Oct 15, 2019
@marioarranzr
Copy link

For me, it took nearly 20min with just the message Installing Python-3.6.3.. . So be patient, it finally makes it.
In the meantime, you can open a new ssh connection and set the missing path export PATH="/home/homeassistant/.pyenv/bin:$PATH"

@MichaIng
Copy link
Owner

MichaIng commented Nov 6, 2019

PR up to inform about long install process and update Python to latest version: #3220

@akiltopu
Copy link

I just installed home assistant with diet-pi latest version to my Pi3+ but i could not get the server running on port 8123
I just did a clean install but it gives me some errors. What can i do ?

root@DietPi:~# service home-assistant status
● home-assistant.service - Home Assistant (DietPi)
Loaded: loaded (/etc/systemd/system/home-assistant.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2020-11-12 12:58:44 +03; 33min ago
Main PID: 594 (hass)
Tasks: 9 (limit: 2063)
CGroup: /system.slice/home-assistant.service
└─594 /home/homeassistant/.pyenv/versions/3.8.6/bin/python3.8 /home/homeassistant/.pyenv/versions/3.8.6/bin/hass
-c /mnt/dietpi_userdata/homeassistant

Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Unable to set up de
pendencies of map. Setup failed for dependencies: frontend
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Setup failed for ma
p: Could not set up all dependencies.
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Unable to set up de
pendencies of logbook. Setup failed for dependencies: frontend, http, recorder
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Setup failed for lo
gbook: Could not set up all dependencies.
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Unable to set up de
pendencies of tts. Setup failed for dependencies: http
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Setup failed for tt
s: Could not set up all dependencies.
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Unable to set up de
pendencies of media_source. Setup failed for dependencies: http
Nov 12 13:00:11 DietPi homeassistant[594]: 2020-11-12 13:00:11 ERROR (MainThread) [homeassistant.setup] Setup failed for me
dia_source: Could not set up all dependencies.
Nov 12 13:00:15 DietPi homeassistant[594]: 2020-11-12 13:00:15 ERROR (MainThread) [homeassistant.setup] Setup failed for up
dater: Unable to import component: No module named 'distro'
Nov 12 13:00:27 DietPi homeassistant[594]: 2020-11-12 13:00:27 ERROR (MainThread) [homeassistant.setup] Setup failed for ss
dp: Unable to import component: No module named 'defusedxml'

Thanks

@Joulinar
Copy link
Collaborator

did you followed the installation steps as describe on our online docs? https://dietpi.com/docs/software/home_automation/#home-assistant-open-source-home-automation-platform-running-on-python-3

HA would need to be restarted 2 times to get installation done

@akiltopu
Copy link

did you followed the installation steps as describe on our online docs? https://dietpi.com/docs/software/home_automation/#home-assistant-open-source-home-automation-platform-running-on-python-3

HA would need to be restarted 2 times to get installation done

thanks it is now working 👍

@Joulinar
Copy link
Collaborator

yes, it's taking quite some time. You could have watched htop to see how installation is going. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💨 META Everything that is not code related, e.g. GitHub, Wiki, website, community Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

5 participants