2024年11月21日星期四 下午8:21:09

Installing Home Assistant Core 2023.5.4 on Raspberry Pi 3B+ step by step

1 年 前
#20506 引用
Installing Home Assistant Core 2023.5.4 on Raspberry Pi 3B+ debian 11 step by step


20230629

Home Assistant Core  upgrage from 2023.5.4  to Home Assistant Core 2023.6.2
https://www.matterxiaomi.com/boards/topic/14548/installing-home-assistant-core-202354-on-raspberry-pi-3b-step-by-step/page/2#20832



0
1 年 前
#20507 引用

Create and change to a virtual environment for Home Assistant Core

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


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

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

sudo -u homeassistant20230504 -H -s
cd /srv/homeassistant20230504
python3.11 -m venv .
source bin/activate
0
1 年 前
#20508 引用
pip3 install homeassistant==2023.5.4

(homeassistant20230504) homeassistant20230504@raspberrypi:/srv/homeassistant20230504 $pip3 install homeassistant==2023.5.4 


resolve some errors


(in a virtual environment)


curl https://sh.rustup.rs -sSf | sh  

#restart your current shell

pip3 install cryptography
sudo apt -y install rustc
pip3 install pyOpenSSL --upgrade
0
1 年 前
#20509 引用
Install Rust

error: Rust 1.48.0 does not match extension requirement >=1.56.0   ( in a virtual environment!)

1.uninstall your existing Rust

sudo apt remove rustc
output


root@raspberrypi:~# sudo apt remove rustc



2.curl https://sh.rustup.rs -sSf | sh

(homeassistant20230504) homeassistant20230504@raspberrypi:/srv/homeassistant20230504 $ curl https://sh.rustup.rs -sSf | sh


output

stable-armv7-unknown-linux-gnueabihf installed - rustc 1.70.0 (90c541806 2023-05-31)


3.restart your current shell

sudo -u homeassistant20230504 -H -s
cd /srv/homeassistant20230504

source bin/activate



In the Rust development environment, all tools are installed to the ~/.cargo/bin directory, and this is where you will find the Rust toolchain, including rustc, cargo, and rustup
https://www.rust-lang.org/tools/install


/home/homeassistant20221103/.cargo/bin

/home/homeassistant20221103/.cargo/bin/cargo
/home/homeassistant20221103/.cargo/bin/rustup
/home/homeassistant20221103/.cargo/bin/rustc
0
1 年 前
#20510 引用
pip3 install cryptography

(homeassistant20230504) homeassistant20230504@raspberrypi:/srv/homeassistant20230504 $ pip3 install cryptography


output

Looking in indexes: https://mirrors.aliyun.com/pypi/simple, https://www.piwheels.org/simple
Collecting cryptography
  Using cached https://mirrors.aliyun.com/pypi/packages/19/8c/47f061de65d1571210dc46436c14a0a4c260fd0f3eaf61ce9b9d445ce12f/cryptography-41.0.1.tar.gz (629 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cffi>=1.12 (from cryptography)
  Using cached cffi-1.15.1-cp311-cp311-linux_armv7l.whl
Collecting pycparser (from cffi>=1.12->cryptography)
  Using cached https://www.piwheels.org/simple/pycparser/pycparser-2.21-py2.py3-none-any.whl (119 kB)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (pyproject.toml) ... done
  Created wheel for cryptography: filename=cryptography-41.0.1-cp311-cp311-linux_armv7l.whl size=2058055 sha256=851455c498eb71baca0f856b3261f625e305d701d630e257a7e9b940569c7952
  Stored in directory: /home/homeassistant20230504/.cache/pip/wheels/bf/c0/ed/248604f455f0f9d4782b961e64da3e26619aeccc643ed39a3f
Successfully built cryptography
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.15.1 cryptography-41.0.1 pycparser-2.21
0
1 年 前
#20511 引用

(homeassistant20230504) homeassistant20230504@raspberrypi:/srv/homeassistant20230504 $ pip3 list
Package                    Version
-------------------------- --------
aiohttp                    3.8.4
aiosignal                  1.3.1
anyio                      3.7.0
astral                     2.2
async-timeout              4.0.2
atomicwrites-homeassistant 1.4.1
attrs                      22.2.0
awesomeversion             22.9.0
bcrypt                     4.0.1
certifi                    2023.5.7
cffi                       1.15.1
charset-normalizer         3.1.0
ciso8601                   2.3.0
cryptography               40.0.2
frozenlist                 1.3.3
h11                        0.14.0
home-assistant-bluetooth   1.10.0
homeassistant              2023.5.4
httpcore                   0.17.2
httpx                      0.24.1
idna                       3.4
ifaddr                     0.1.7
Jinja2                     3.1.2
lru-dict                   1.1.8
MarkupSafe                 2.1.2
multidict                  6.0.4
orjson                     3.8.10
pip                        23.1.2
pycparser                  2.21
PyJWT                      2.6.0
pyOpenSSL                  23.1.0
python-slugify             4.0.1
pytz                       2023.3
PyYAML                     6.0
requests                   2.28.2
setuptools                 65.5.0
sniffio                    1.3.0
text-unidecode             1.3
typing_extensions          4.6.3
ulid-transform             0.7.2
urllib3                    1.26.16
voluptuous                 0.13.1
voluptuous-serialize       2.6.0
wheel                      0.40.0
yarl                       1.9.2
0
1 年 前
#20512 引用
https://github.com/home-assistant/core/blob/dev/requirements.txt

```
-c homeassistant/package_constraints.txt

# Home Assistant Core
aiohttp==3.8.4
astral==2.2
async-timeout==4.0.2
attrs==22.2.0
atomicwrites-homeassistant==1.4.1
awesomeversion==22.9.0
bcrypt==4.0.1
certifi>=2021.5.30
ciso8601==2.3.0
httpx==0.24.1
home-assistant-bluetooth==1.10.0
ifaddr==0.2.0
Jinja2==3.1.2
lru-dict==1.1.8
PyJWT==2.7.0
cryptography==40.0.2
pyOpenSSL==23.1.0
orjson==3.8.12
pip>=21.0,<23.2
python-slugify==4.0.1
PyYAML==6.0
requests==2.31.0
typing_extensions>=4.5.0,<5.0
ulid-transform==0.7.2
voluptuous==0.13.1
voluptuous-serialize==2.6.0
yarl==1.9.2
```
[/quote]
0
1 年 前
#20515 引用
First-run setup fails



Raspi p3b+

Raspbian Bullseye

Home Assistant core 2023.6.3
Python 3.11 venv






After each restart I have

Unable to install package ha-av

Unfortunately I get some errors during startup which ends up in not workung integrations

hass -v


output

pip install ha-av==10.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple



note: This error originates from a subprocess, and is likely not a problem with pip.
2023-07-01 04:55:51.858 INFO (SyncWorker_1) [homeassistant.util.package] Attempting install of ha-av==10.1.0
2023-07-01 04:57:00.127 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package ha-av==10.1.0: error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Package libavformat was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavformat.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavformat' found
      Package libavcodec was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavcodec.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavcodec' found
      Package libavdevice was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavdevice.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavdevice' found
      Package libavutil was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavutil.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavutil' found
      Package libavfilter was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libavfilter.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libavfilter' found
      Package libswscale was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libswscale.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libswscale' found
      Package libswresample was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libswresample.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'libswresample' found
      pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.


0
1 年 前
#20830 引用
Solution

installed manually
0
1 年 前
#20831 引用
1
0