Raspberry Pi 0 W

@tensopiseth . Finally… its working :wink: the custom_ components folder ( for RPI GPIO ) should be under directory /.homeassitant
I do with WinSCP / Filezilla just more easier and faster than Putty, since not sure and know where need to be landed . Just a rookie and do trial & error
c_conf

so is it possible to help me walk through?
step by step…
now start with reflash new Hassio. ? should i go with 4+ or 6+.
than i config wifi connection .
and what to do next?

As our discussion above because currently having problem with fresh new installation Hass OS 6.6,4.XX, 5.XX ,6.X on Pi 0 W , so one of the alternative installation method is Hass Core .
and explained step by step :
‘’ Raspberry Pi - Home Assistant "

The cons of this Core installation method , there is no supervisor and add-ons option.
Without having these options are ok for me , because my goal is to control 2 Zigbee lights only + 1 door switch contact .

Tutorial for clean install on RaspberryPi Zero W

Use copy button command by command, and always wait finish before next command.

  1. Install Raspbian OS Lite Bullseye
  2. Configure HomeAssistant installation with SSH
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata
sudo useradd -rm homeassistant -G dialout,gpio,i2c
sudo mkdir /srv/homeassistant
sudo chown homeassistant:homeassistant /srv/homeassistant
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
python3 -m pip install wheel
pip3 install homeassistant 

( wait about 1 hour, its look freeze but is running )

hass -V

Wait full load of HomeAssistant (About 30min), you can know when all itens on left panel show.

  1. AutoStart
sudo nano -w /etc/systemd/system/[email protected]

Paste:

[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"

RestartForceExitStatus=100

[Install]

WantedBy=multi-user.target
sudo systemctl --system daemon-reload


sudo systemctl enable home-assistant@homeassistant
sudo systemctl start home-assistant@homeassistant

Now you can close ssh and finish

Is running smooth and fast on RPIzero W V1

4 Likes

Here step by step

Really nice step by step, thank you. However, it’s stuck for hours after “hass -v” command. Do you have any idea why?

It is not stuck, it actually works. Try to connect to it from web browser after an hour, you should see the installation screen already. Finish the installation in web browser, shut HA down from web browser and continue with the rest of instructions via SSH.

Thank you this worked perfectly but now I want to install HACS which is only possible on versions 2022.10.0 or newer how do I install or upgrade to this version?

The version installed in this method is the latest available 2022.10.5

Any error before ? Try another SD card or send print of log

Apparently not, any way to update?

I could complete the installation via browser. Is not possible do install add-on in this HA version?

No, the addons is running on Docker, you can install direct in the Raspberry OS.

First thanks to Duda Souza for this tutorial.
I followed procedure step by step and on the first attempt I ended up with version 2022.6.7
Probably this was caused by not executing the suggested command:
source “$HOME/.cargo/env”
In my first attempt a got a lot of red error messages concerning RUST and that attempt ended in a working 2022.6.7. version.

In my second attempt which started around 5PM the procedure lasted very long.
After the command: pip3 install homeassistant some logging was there but after this lines:
Collecting orjson==3.8.1
Downloading orjson-3.8.1.tar.gz (860 kB)
|████████████████████████████████| 860 kB 950 kB/s
It took at least 7 hours to see any new logs appearing.
I logged in with other session and used the top command for monitoring any progress and I noticed a lot of CPU and memory load by the rustc compiler

I found one error in the tutorial:
hass -V needs to be changed in hass -v
Now I have version 2022.12.6 installed but unfortunately with some errors for some integrations:
cloud, mobile_app and default_config
see from line 1487 in logfile
For this I need some suggestions how to solve because my python version is 3.9.2 and NumPy version.
I checked bin/py directory:

Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> print("PYTHONPATH:", os.environ.get('PYTHONPATH'))
PYTHONPATH: None
>>> print("PATH:", os.environ.get('PATH'))
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
>>> exit()
ted@raspberrypi:~ $ cd /bin/
ted@raspberrypi:/bin $ pwd
/bin
ted@raspberrypi:/bin $ ls -l |grep python
-rwxr-xr-x 1 root root        3222 Mar 12  2021 arm-linux-gnueabihf-python3.9-config
lrwxrwxrwx 1 root root          36 Apr  5  2021 arm-linux-gnueabihf-python3-config -> arm-linux-gnueabihf-python3.9-config
lrwxrwxrwx 1 root root          23 Mar 12  2021 pdb3.9 -> ../lib/python3.9/pdb.py
lrwxrwxrwx 1 root root          31 Apr  5  2021 py3versions -> ../share/python3/py3versions.py
lrwxrwxrwx 1 root root           7 Mar  2  2021 python -> python3
lrwxrwxrwx 1 root root           9 Apr  5  2021 python3 -> python3.9
-rwxr-xr-x 1 root root     4703672 Mar 12  2021 python3.9
lrwxrwxrwx 1 root root          36 Mar 12  2021 python3.9-config -> arm-linux-gnueabihf-python3.9-config
lrwxrwxrwx 1 root root          16 Apr  5  2021 python3-config -> python3.9-config
ted@raspberrypi:/bin $

I have also some screenshots
But I don’t know how to attach my logile yet.


ha2012.6_invalid_config

1 Like

Great guide @dudusandi , thank you for writing it.

I tried this today on my Pi Zero W, I see no errors until I get to the “Hass -V” part where I get “Illegal Instruction”. Doesn’t this indicate wrong cpu architecture?

Hi @Asbjoern
I experienced exactly the same behaviour you have had. DId you find any solution for it?

BR

It’s hass -v. Lower case. Case does matter.

The error also appears when I try lower or upper case -v parameter.

@kauli80 I believe it was caused by the CPU architecture of the Pi Zero 1.x is no longer supported by Home Assistant.

The Pi Zero 1 W works fine here for me, HA Core 2023.3.0b3 without issues.