Can you do an (obsolete) netstat -an | grep 8123?
Or ss -a | grep 8123?
To check that HA is well listening to the port.
Should look like
IP v4 tcp LISTEN 0 128 0.0.0.0:8123 0.0.0.0:*
IP v6 tcp LISTEN 0 128 [::]:8123 [::]:*
Can you also do an
ip addr
And try to connect with the IP address and :8123?
EDIT Oops, answer to fast. Your HA is not starting
Did you install the requirements specified in the guide?
Are you using the venv?
Are you using python 3.10? Because this is not available out-of-the-box on a RaspberryPi.
I’ve no issue, but I had to install Python 3.10.9 and in the venv, sqlite is installing whatever version is needed by HA.
That’s the beauty of a venv, every software its own version of the packages.
That’s an excellent question, and unfortunately, I’m not certain.
However, it appears that it installs SQLAlchemy 2.0.4, and from a Python standpoint, it enables the manipulation of the sqlite3 database in the homeassistant directory.
I don’t have any sqlite packages installed otherwise, but I do have numerous apt packages that are incompatible with what HA installs in the venv. In the past, following the venv creation from the installation guide has always resolved my conflicts.
Moreover, I no longer use the sqlite3 DB because it was on the SD card, and I encountered corruption issues previously. Currently, the HA database is on my NAS using MariaDB.
If you have created the venv, then we need to investigate the matter further.
I assume that you really need sqlite for something else …
How did you install it?
From sqlite-devel and libsqlite3-dev packages or compiling it?
Did you (re)compile python3.10 after installing it?
For what it’s worth, I don’t have sqlite3 installed but can use the sqlite3 module in the python3.10 venv of HA:
(homeassistant) homeassistant@hassbian:~/.homeassistant $ python3
Python 3.10.9 (main, Feb 2 2023, 09:53:17) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> print(sqlite3.version)
2.6.0
But it is an old version compared to the one you installed.
In your linked post, did you try the solution of exporting the LD_LIBRARY_PATH before starting hass as suggested in post #18
# How to Install Python 3.10.7 on the Raspberry Pi - https://aruljohn.com/blog/python-raspberrypi/
sudo su -
wget https://www.python.org/ftp/python/3.10.10/Python-3.10.10.tgz
apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev
tar -xzvf Python-3.10.10.tgz
cd Python-3.10.10/
./configure --enable-optimizations
sudo make altinstall
# test
/usr/local/bin/python3.10 -V
Python 3.10.10
As it was complaining about sqlite3 as already depicted in my former post, I have installed it:
sudo chmod a+wr /opt
cd /opt
wget https://sqlite.org/2023/sqlite-autoconf-3410000.tar.gz
tar -xvf sqlite-autoconf-3410000.tar.gz
cd sqlite-autoconf-3410000
./configure --prefix=/opt/sqlite
make
sudo make install
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ python
Python 3.10.10 (main, Feb 26 2023, 09:31:27) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/sqlite3/__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.10/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
(homeassistant) homeassistant@raspberrypi:/srv/homeassistant $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sqlite/lib hass
2023-02-28 18:40:10.462 ERROR (MainThread) [homeassistant.setup] Setup failed for analytics: Unable to import component: No module named '_sqlite3'
2023-02-28 18:40:10.521 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: analytics
hass still complains and the service does not start.
Same with export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sqlite/lib before running hass.
I could not try to edit /etc/systemd/system/[email protected] since I do not have this file.
I swear that it is not installed on my system, here is a “proof”
(homeassistant) homeassistant@hassbian:~/.homeassistant $ python3
Python 3.10.9 (main, Feb 2 2023, 09:53:17) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> print(sqlite3.version)
2.6.0
>>>
(homeassistant) homeassistant@hassbian:~/.homeassistant $ which sqlite3
(homeassistant) homeassistant@hassbian:~/.homeassistant $ sqlite3
bash: sqlite3: command not found