Home Assistant Failing to Install

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.17
What app is this about: Home Assistant

Describe your issue

Hello,

I’m a new YunoHost user and I’m currently setting up my home server. I’ve successfully installed several applications so far, but I’m running into an issue with the installation of Home Assistant (version 2025.6.3~ynh1) from the YunoHost app catalog onto my server. I’m very new to self hosting and out of my depth so I’ve been using AI to help troubleshoot so far. It seems stumped here though. I asked it to write a message in the hopes it can be more specific than I can.

“The installation process begins normally. I observe it provisioning sources, users, permissions, and installing various APT dependencies (like bluez, clang, libssl-dev, ffmpeg, etc.). It also proceeds to set up a Python virtual environment and install Home Assistant itself along with its Python dependencies using pipx and uv.
However, the installation consistently fails during the “Starting homeassistant’s systemd service” stage. The service attempts to start but immediately exits with a FAILURE status, and then attempts to restart repeatedly before the installation times out and marks the app as failed.
The core error message I see in the logs is an ImportError coming from the habluetooth component.”

Any guidance or suggestions on how to resolve this would be greatly appreciated!
Thank you for your time and help.

Share relevant logs or error messages

https://paste.yunohost.org/raw/gitetekizo

Not entirely sure, but it’s possible that the logs folder wasn’t deleted: do you still have /var/log/homeassistant/homeassistant.log ?

Thank you for the response. I think I managed to delete the log like you suggested and attempted the install again. Unfortunately, I got an error again and Gemini seems to think it’s the same issue. Here’s what it said.

"Okay, I’ve reviewed the new log you provided for the Home Assistant installation.
Unfortunately, the core error is exactly the same as before:
2025-06-29 22:45:41,128: WARNING - File “src/habluetooth/scanner.py”, line 39, in init habluetooth.scanner
2025-06-29 22:45:41,130: WARNING - ImportError: cannot import name OrPattern

And just like last time, the Home Assistant service fails to start immediately:
2025-06-29 22:45:41,089: WARNING - Jun 29 22:45:36 systemd[1]: Started homeassistant.service - Home Assistant: automation platform.
2025-06-29 22:45:41,091: WARNING - Jun 29 22:45:36 systemd[1]: homeassistant.service: Main process exited, code=exited, status=1/FAILURE
2025-06-29 22:45:41,093: WARNING - Jun 29 22:45:36 systemd[1]: homeassistant.service: Failed with result ‘exit-code’.

What this means:
Deleting the previous log files (/var/log/homeassistant/homeassistant.log) did not resolve the underlying issue. This confirms that the problem was not stale log files, but a deeper incompatibility.
The ImportError: cannot import name OrPattern is still the cause of Home Assistant crashing immediately upon startup. As discussed, this strongly points to a version mismatch or incompatibility specifically between Python 3.13 (which the Home Assistant YunoHost package is trying to use) and one of Home Assistant’s core dependencies, likely related to the regex module or the habluetooth library.
Conclusion:
This is not an issue with your YunoHost server’s setup or your previous actions. It’s a problem inherent to the Home Assistant package itself at this specific version (2025.6.3~ynh1) attempting to run on Python 3.13. The package maintainers for Home Assistant on YunoHost would need to address this."

Here is the log from my new attempt. Link

Thank you again.

Hi,
Gemini says some bullsh… python 3.13 is required…
What’s the full output of /var/log/homeassistant/homeassistant.log ?
What’s the content of /home/yunohost.app/homeassistant/configuration.yaml ?
And the output of the command bluetoothctl -v ?
And the aoutpu of systemctl status dbus.socket ?

Oops: there was a misunderstanding. My suggestion was (and still is) to check if the log file is present, so it can be read to see if it contains any additional debug information. What does it say if present and not empty ?

There seems to be a bug…

Exact same issue installing on Raspberry Pi 5.
Yunohost 12.0.7, HomeAssistant 2025.6.3~ynh1

Pasted homeassistant.log:

@hebe @PostCynical @Nom
could one of you post the results of Home Assistant Failing to Install - #4 by ewilly ?

/var/log/homeassistant/homeassistant.log starts with:

Traceback (most recent call last):
File “/var/www/homeassistant/venv/bin/hass”, line 10, in
sys.exit(main())
~~~~^^
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/main.py”, line 192, in main
from . import config, runner
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/runner.py”, line 16, in
from . import bootstrap
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/bootstrap.py”, line 41, in
from .components import (
…<22 lines>…
)
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/components/auth/init.py”, line 158, in
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2AuthorizeCallbackView
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/helpers/config_entry_oauth2_flow.py”, line 25, in
from habluetooth import BluetoothServiceInfoBleak
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/habluetooth/init.py”, line 26, in
from .scanner import BluetoothScanningMode, HaScanner, ScannerStartError
File “src/habluetooth/scanner.py”, line 39, in init habluetooth.scanner
ImportError: cannot import name OrPattern

and ends with:

File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/components/auth/init.py”, line 158, in
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2AuthorizeCallbackView
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/helpers/config_entry_oauth2_flow.py”, line 25, in
from habluetooth import BluetoothServiceInfoBleak
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/habluetooth/init.py”, line 26, in
from .scanner import BluetoothScanningMode, HaScanner, ScannerStartError
File “src/habluetooth/scanner.py”, line 39, in init habluetooth.scanner
ImportError: cannot import name OrPattern
Traceback (most recent call last):
File “/var/www/homeassistant/venv/bin/hass”, line 10, in
sys.exit(main())
~~~~^^
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/main.py”, line 192, in main
from . import config, runner
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/runner.py”, line 16, in
from . import bootstrap
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/bootstrap.py”, line 41, in
from .components import (
…<22 lines>…
)
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/components/auth/init.py”, line 158, in
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2AuthorizeCallbackView
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/homeassistant/helpers/config_entry_oauth2_flow.py”, line 25, in
from habluetooth import BluetoothServiceInfoBleak
File “/var/www/homeassistant/venv/lib/python3.13/site-packages/habluetooth/init.py”, line 26, in
from .scanner import BluetoothScanningMode, HaScanner, ScannerStartError
File “src/habluetooth/scanner.py”, line 39, in init habluetooth.scanner
ImportError: cannot import name OrPattern

There is not other information than the above repeating over and over again.

cat /home/yunohost.app/homeassistant/configuration.yaml

homeassistant:
auth_providers:

  • type: command_line
    command: /home/yunohost.app/homeassistant/bin/ynh_ldap-auth.sh
    meta: true

http:
server_port: 8123
use_x_forwarded_for: True
trusted_proxies:
- 127.0.0.1
- ::1

recorder:
db_url: mysql://homeassistant:9fc99fdf1ed69892eb17291c@127.0.0.1/homeassistant?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4

Apply default set of integrations

default_config:

Linked yaml files

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Sensors

sensor:

  • platform: fail2ban
    jails:
    • homeassistant
      file_path: /var/log/homeassistant/homeassistant.log

bluetoothctl -v

bluetoothctl: 5.66

systemctl status dbus.socket

  • dbus.socket - D-Bus System Message Bus Socket
    Loaded: loaded (/lib/systemd/system/dbus.socket; static)
    Active: active (running) since Mon 2025-06-30 12:06:07 CEST; 1h 39min ago
    Triggers: * dbus.service
    Listen: /run/dbus/system_bus_socket (Stream)
    CGroup: /system.slice/dbus.socket

Jun 30 12:06:07 hostname.domain systemd[1]: Listening on dbus.socket - D-Bus System Message Bus Socket.

1 Like

Thank you for posting that. It would have taken me forever to figure out how.

I have the same problem. Did you find any solution?

I find the culprit, now i need some time to solve it properly

Should now be solved, you can retry to install :grinning_face:

1 Like

I can confirm the installation succeeds this time.
Would you mind telling how you fixed it?

Thanks

It worked! Thank you so much for the help.