2024年11月21日星期四 下午7:15:55

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

2 年 前
#1213 引用
First boot Home Assistant

#hass -v

Unable to find configuration. Creating default one in /home/homeassistant20221103/.homeassistant



output


/home/homeassistant/.homeassistant
Creating default one in /home/homeassistant/.homeassistant。Creating default one in /home/homeassistant/.homeassistant


WARNING (Recorder) [homeassistant.components.recorder.util] Version 3.16.2 of SQLite is not supported; minimum supported version is 3.31.0

sqlite3 database at //home/homeassistant/.homeassistant/home-assistant_v2.db
0
2 年 前
#1214 引用
SQLite Database on Raspberry Pi 3b+

Sqlite3 is a Python standard library.

非py虚拟环境下安装

root@raspberrypi:~# sudo apt-get install sqlite3


root@raspberrypi:~# sqlite3 myfirstdatabase.db
SQLite version 3.34.1 2021-01-20 14:10:07
Enter ".help" for usage hints.
sqlite> exit
0
2 年 前
#1257 引用
修改时区命令


sudo timedatectl set-timezone 'Asia/Shanghai'


0
2 年 前
#1295 引用
Home Assistant配置文件

Path to configuration.yaml: /home/homeassistant/.homeassistant

/home/homeassistant/.homeassistant


Python Version  3.9.2




System Health
Version  core-2022.3.0
Installation Type  Home Assistant Core
Development  false
Supervisor  false
Docker  false
User  homeassistant
Virtual Environment  true
Python Version  3.9.2
Operating System Family  Linux
Operating System Version  6.1.53-v7+
CPU Architecture  armv7l
Timezone  UTC


0
2 年 前
#1304 引用
install  or upgrade to  sqlite3 3.31

Version 3.22.0 of SQLite is not supported

i’ve see the following warning message in my logs …
Version 3.22.0 of SQLite is not supported; minimum supported version is 3.31.0. Starting with Home Assistant 2022.2 this will prevent the recorder from starting. Please upgrade your database software before then


root@raspberrypi:~# sudo apt-get install sqlite3



root@raspberrypi:~# sqlite3 myfirstdatabase.db
SQLite version 3.34.1 2021-01-20 14:10:07



$ sqlite3 home-assistant_v2.db
SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
sqlite>


https://www.home-assistant.io/docs/backend/database/


https://sqlitebrowser.org/dl/




home-assistant_v2.db

Useful links


https://community.home-assistant.io/t/raspberrypi-ha-core-version-3-27-2-of-sqlite-is-not-supported/352858/5


I found an alternative solution by updating Raspberry Pi package list:

sudo nano /etc/apt/sources.list
then I added this line:

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
Save & exit the file, then type:

sudo apt update
sudo apt install sqlite3 -t bullseye
Once it’s done installing/updating you can check the sqlite3 version by typing:

sqlite3 --version
It should output something like this:

3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ealt



0
2 年 前
#2324 引用
Restart hass

come from:https://www.home-assistant.io/installation/raspberrypi



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



sudo -u homeassistant -H -s
cd /srv/homeassistant
source bin/activate
hass --version


hass -v
0
2 年 前
#3505 引用
home-assistant.log

/home/homeassistant/.homeassistant/home-assistant.log
0
2 年 前
#3590 引用
Home Assistant Core upgrage



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


sudo -u homeassistant -H -s
cd /srv/homeassistant
source bin/activate
pip3 install --upgrade homeassistant


Install a specific version


pip3 install homeassistant==2022.5.4






Bash


Update Home Assistant core to the latest dev version。The official syntax was:


pip3 install --upgrade homeassistant




0
2 年 前
#3591 引用
How to upate Home Assistant Core?



Here are the steps to update HA in a venv (old but I think they are still valid):

$ sudo systemctl stop [email protected] 
$ sudo -u homeassistant -H -s
$ source /srv/homeassistant/bin/activate
$ pip3 install --upgrade homeassistant
$ exit
$ sudo systemctl start [email protected]

If necessary change the user “homeassistant” in the second line to whatever user you used to install HA.
0
2 年 前
#3592 引用
1
0