A rewrite of this guide, using different methods, is now available at gist.github.com/BillyNate/856f62dfc480506e0116220bf24b01b4.
This guide is only kept for archival purposes.
These are the steps taken to have Home Assistant 2024.2 on piCore 14
Newer version might work as well (or maybe even better), but have not been tested.
- Download the piCore image
- Unpack the
.zipfile and write the.imgfile to the SD-Card (using USB Image Tool for example) - Move the SD-Card to the Pi, plug the Pi into the network and plug in the power source
- SSH into the Pi (using Putty for example)
Login usingtc/piCore - Execute
backupshell command after the first boot to save generated unique SSH keys which will be used during next boots. - Expand the partition:
- Start the partition tool:
sudo fdisk -u /dev/mmcblk0 - List partitions with
pcommand and write down the StartLBA and EndLBA of the second partition - Delete second partition with
dthan recreate it withncommand
SelectpforPrimary Partitionand2forPartition Number
Use the same starting sector as deleted had and use the default value forLast Cylinder
Exit fdisk withwcommand - Reboot the Pi:
sudo reboot - After reboot expand the partition:
sudo resize2fs /dev/mmcblk0p2(may take a while)
- Start the partition tool:
- Optionally install the nano text editor (or keep using vi):
tce-load -wi nano - Install tools to create extensions
tce-load -wi squashfs-tools liblz4
- Install dependencies:
tce-load -wi compiletc cmake rust python3.11 python3.11-dev python3.11-pip python3.11-wheel - Install Home Assistant:
- Install Home Assistant:
pip3 install --user --extra-index-url https://www.piwheels.org/simple homeassistant - Create a temporary directory:
mkdir -p /tmp/homeassistant/usr/local/bin /tmp/homeassistant/usr/local/lib/python3.11/site-packages - Move over binary:
mv ~/.local/bin/* /tmp/homeassistant/usr/local/bin - Move over package files:
mv ~/.local/lib/python3.*/site-packages/* /tmp/homeassistant/usr/local/lib/python3.11/site-packages - Create extension:
mksquashfs /tmp/homeassistant /mnt/mmcblk0p2/tce/optional/homeassistant.tcz - Add
homeassistant.tczto/mnt/mmcblk0p2/tce/onboot.lst
- Install Home Assistant:
- Make new directory:
mkdir -p ~/.homeassistant/deps - Install Numpy, either:
- Use the attached wheel:
- Download:
wget https://gist.github.com/BillyNate/d3124edfa903f288bfc8b7f37a155971/raw/numpy-1.26.4-cp311-cp311-linux_armv7l.whl - Install:
pip3 install --prefix ~/.homeassistant/deps numpy*.whl
- Download:
- Or build and install:
- Run
export MAKEFLAGS="-j$(nproc)" - Build & install:
pip3 install --prefix ~/.homeassistant/deps numpy==1.26.4(use version mentioned in requirements_all.txt if higher)
- Run
- Use the attached wheel:
- Install more dependencies:
tce-load -wi bluez libffi_base-dev openssl-dev openjpeg-dev zlib_base-dev autoconf ffmpeg libtiff libjpeg-turbo-dev libxcb - Add piwheels as source for pip:
- Create directory:
mkdir ~/.pip - Create file
~/.pip/pip.confand add:[global] extra-index-url=https://www.piwheels.org/simple
- Create directory:
- Install frontend seperately:
- Install package:
pip3 install --user home-assistant-frontend==20240207.1(use version mentioned in requirements_all.txt) - Create directory for persistent files:
mkdir -p /mnt/mmcblk0p2/tce/persistent/.frontend(this is actually on the micro sd-card, not in RAM) - Move frontend files to persistent directory:
mv ~/.local/lib/python3.11/site-packages/hass_frontend /mnt/mmcblk0p2/tce/persistent/.frontend - Create symlink:
ln -s /mnt/mmcblk0p2/tce/persistent/.frontend ~/.frontend - Set custom frontend directory in
~/.homeassistant/configuration.yaml:
frontend: development_repo: /home/tc/.frontend- Move the rest of the files:
mv ~/.local/lib/python3.11/site-packages/home_assistant_frontend*.dist-info ~/.homeassistant/deps/lib/python3.11/site-packages/
- Install package:
- Install missing dependency:
pip3 install --prefix ~/.homeassistant/deps tzdata - Run Home Assistant once:
hass -v --skip-pip, this generates the needed configuration - Remove
default_configfrom~/.homeassistant/configuration.yaml - Run Home Assistant again:
hass -v --skip-pip-packages numpyand let it install the needed integrations. Once it says "Starting Home Assistant" it's finished! - Open the web interface and create your basic config. Once done exit through
Developer tools->Services->Home Assistant Core Integration: Stop - Create an extension:
- Create a temporary directory:
mkdir -p /tmp/homeassistant-deps/usr/local/ - Move over files:
mv ~/.homeassistant/deps/* /tmp/homeassistant-deps/usr/local/ - Create extension:
mksquashfs /tmp/homeassistant-deps /mnt/mmcblk0p2/tce/optional/homeassistant-deps.tcz - Add
homeassistant-deps.tczto/mnt/mmcblk0p2/tce/onboot.lst
- Create a temporary directory:
- Clean up the home directory as much as possible
- Add
.homeassistant/home-assistant.log*,.homeassistant/ttsand.homeassistant/depsto/opt/.xfiletool.lst - Create startup script
/opt/hassboot.shcontainingsu - tc -c "hass -c /home/tc/.homeassistant --skip-pip-packages numpy" - Turn startup script into executable:
sudo chmod +x /opt/hassboot.sh - Add
/opt/hassboot.sh &to/opt/bootlocal.shin order to have Home Assistant auto start at boot - Save changes:
backup
- Install iptables:
tce-load -wi iptables - Prepend
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8123to/opt/hassboot.sh
- Install unzip:
tce-load -wi unzip - Download latest package:
wget https://github.com/hacs/integration/releases/latest/download/hacs.zip - Create directory:
mkdir ~/.homeassistant/custom_components/hacs - Unzip package:
unzip hacs.zip -d ~/.homeassistant/custom_components/hacs - Clean up the home directory
- Restart Home Assistant
- Go to
Settings>Devices & services>Add integration, and add HACS - Check if everything is installed correctly
- Package the
depsup again - Save changes:
backup
- Run Home Assistant as user (instead of from boot)
- Add Zigbee Home Automation integration from the interface
- Package the
depsup again - Save changed configuration:
backup
https://community.home-assistant.io/t/how-can-i-disable-the-cloud-component/106697/27
Hi Billy, thanks for this guide. I am trying to follow it to get home assistant working on my picoreplayer raspberry 5.
I have gotten quite far although at the step where I need to acess the gui site, step 12. Here I run into some (form me) undefinable errors.
As you are the expert in this and nobody els seems to have done this before I have come here for your help.
For now I tried running python 3.12 but there I have problem than no pip is included.
With newer or oldcer versions of HASS I am getting the same messages.
Can you please share your insights in my problem (kan ook in het nederlands).
Thank you so much.
Ps. I posted more info on the hass forum https://community.home-assistant.io/t/can-install-hass-on-picoreplayer-tinycore-linux/873408