2024年12月4日星期三 上午1:26:13

Installing Home Assistant Core 2023.9.3 on Raspberry Pi 3B+ debian 12 step by step

1 年 前
#22433 引用
Installing Home Assistant Core 2023.9.3 on Raspberry Pi 3B+ debian 12 step by step

https://www.home-assistant.io/installation/raspberrypi#create-the-virtual-environment
0
1 年 前
#22434 引用
update os  (from debain 11 to debian 12)

old



root@raspberrypi:~# cat /etc/apt/sources.list
#deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi








new



root@raspberrypi:~# cat /etc/apt/sources.list
#deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'

#deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi



#deb http://mirrors.aliyun.com/raspbian/raspbian/ bullseye main
#deb-src http://mirrors.aliyun.com/raspbian/raspbian/ bullseye main

# 20230926
deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi








sudo apt-get update
sudo apt-get upgrade -y



20231208


root@raspberrypi:~# lsb_release -a
No LSB modules are available.
Distributor ID:  Raspbian
Description:  Raspbian GNU/Linux 12 (bookworm)
Release:  12
Codename:  bookworm
root@raspberrypi:~# cat /etc/debian_version
12.1




20231209

root@debian12:/home/husband# cat /etc/debian_version
12.2




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 ffmpeg liblapack3 liblapack-dev libatlas-base-dev
0
1 年 前
#22435 引用

Create and change to a virtual environment for Home Assistant Core

sudo useradd -rm homeassistant20230900 -G dialout,gpio,i2c


#create a directory for the installation of Home Assistant Core
sudo mkdir /srv/homeassistant20230900

#change the owner to the homeassistant20230201 account
sudo chown homeassistant20230900:homeassistant20230900 /srv/homeassistant20230900

sudo -u homeassistant20230900 -H -s
cd /srv/homeassistant20230900
python3.11 -m venv .
source bin/activate



sudo useradd -rm homeassistant20230903 -G dialout,gpio,i2c


#create a directory for the installation of Home Assistant Core
sudo mkdir /srv/homeassistant20230903

#change the owner to the homeassistant20230201 account
sudo chown homeassistant20230903:homeassistant20230903 /srv/homeassistant20230903

sudo -u homeassistant20230903 -H -s
cd /srv/homeassistant20230903
python3.11 -m venv .
source bin/activate


python3 -m pip install wheel

pip3 install homeassistant==2023.9.3
0
1 年 前
#22436 引用

Home Assistant Core upgrage

https://www.home-assistant.io/common-tasks/os


sudo -u homeassistant20230903 -H -s
cd /srv/homeassistant20230903
#python3.11 -m venv .
source bin/activate

pip3 install --upgrade homeassistant


output


Installing collected packages: homeassistant
  Attempting uninstall: homeassistant
    Found existing installation: homeassistant 2023.6.2
    Uninstalling homeassistant-2023.6.2:
      Successfully uninstalled homeassistant-2023.6.2
Successfully installed homeassistant-2023.6.3



20231209 update to homeassistant==2023.12.0

(homeassistant20230903) homeassistant20230903@raspberrypi:/srv/homeassistant20230903 $ pip3 install --upgrade homeassistant
Looking in indexes: https://mirrors.aliyun.com/pypi/simple, https://www.piwheels.org/simple
Requirement already satisfied: homeassistant in ./lib/python3.11/site-packages (2023.10.1)
Collecting homeassistant
  Downloading https://www.piwheels.org/simple/homeassistant/homeassistant-2023.12.0-py3-none-any.whl (32.6 MB)

0
1 年 前
#22447 引用
1
0