Home Assistant Core on Android Tablet

requires additional kernel modules (cp210x.ko), so you will need unlocked bootloader + custom kernel

Hi same issue at Bluetooth as above.

  1. How to

  2. With developer options, in running processes I see termux. How can I get more details, or where?

Thanks

Hello! I have the same problem (bus error), when trying to open HA web page with browser. Did you find the way to solve this problem?

hi, do not see the browser, try with previous versions, I started and it worked fine for a few days.

I have the same error “dlopen failed: library “libandroidicu.so” not found” on my Lenovo M10 FHD with android 10. Just wondering if you found a fix for this ?

[homeassistant.setup] Unable to set up dependencies of ‘frontend’. Setup failed for dependencies: [‘api’, ‘auth’, ‘config’, ‘diagnostics’, ‘file_upload’, ‘http’, ‘lovelace’, ‘onboarding’, ‘repairs’, ‘search’, ‘websocket_api’]
2024-10-02 14:38:28.200 ERROR (MainThread) [homeassistant.setup] Setup failed for ‘frontend’: Could not setup dependencies: api, auth, config, diagnostics, file_upload, http, lovelace, onboarding, repairs, search, websocket_api
2024-10-02 14:38:28.200 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of ‘webhook’. Setup failed for dependencies: [‘http’]
2024-10-02 14:38:28.200 ERROR (MainThread) [homeassistant.setup] Setup failed for ‘webhook’: Could not setup dependencies: http
2024-10-02 14:38:28.204 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of ‘cloud’. Setup failed for dependencies: [‘auth’, ‘http’, ‘repairs’, ‘webhook’]
2024-10-02 14:38:28.204 ERROR (MainThread) [homeassistant.setup] Setup failed for ‘cloud’: Could not setup dependencies: auth, http, repairs, webhook
2024-10-02 14:38:28.204 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of ‘recovery_mode’. Setup failed for dependencies: [‘frontend’, ‘cloud’]
2024-10-02 14:38:28.205 ERROR (MainThread) [homeassistant.setup] Setup failed for ‘recovery_mode’: Could not setup dependencies: frontend, cloud

A few months ago I installed HASS on a Xiaomi RN7 without 24/7 without problems, it works better than I expected, but I wanted to reinstall everything since I am modifying my automations and suddenly I could no longer install the hass or rather it no longer happens. I think it’s something related to python3.12 and some permissions, I’ve been trying to reinstall again as before for days but it just doesn’t happen, has anyone had a similar error

Working installation of HA 2024.9.0 on Python 3.12.

yes | pkg upgrade

pkg install python git build-essential rust binutils cmake ninja libopenblas libandroid-execinfo patchelf wget make  termux-exec clang libjpeg-turbo freetype libffi openssl libsodium ffmpeg -y

git clone https://github.com/numpy/numpy.git numpy-git
cd numpy-git
git checkout v1.26.0
git cherry-pick 040ed2d
git submodule update --init
cd ..


python -m venv hass
source hass/bin/activate

pip3 install setuptools wheel packaging pyproject_metadata cython meson-python versioneer tzdata 

LDFLAGS=" -lm -lpython3" pip install numpy-git/
  
CARGO_BUILD_TARGET="$(rustc -Vv | grep "host" | awk '{print $2}')" pip install maturin

env INCLUDE="$PREFIX/include" LDFLAGS=" -lm" pip install Pillow

pip install PyTurboJPEG==1.7.5

SODIUM_INSTALL=system pip install pynacl

wget https://files.pythonhosted.org/packages/1b/8f/daf60bbc06f4a3cd1cfb0ab807057151287df6f5c78f2e0d298acc9193ac/pycares-4.4.0.tar.gz
tar -xf pycares-4.4.0.tar.gz
sed -i s/'#define HAVE_GETSERVBYPORT_R 1'//g ./pycares-4.4.0/deps/build-config/config_android/ares_config.h
pip install ./pycares-4.4.0 --no-binary pycares  

pip install homeassistant==2024.9.0 
hass -v 

on one of the three devices, it was necessary to run the termux-chroot command before launching ha.to avoid bad system call mistake

source /data/data/com.termux/files/home/hass/bin/activate && termux-chroot  hass -v 

in my case the “bad system call” error was caused by the
dhcp:
cloud:
assist_pipeline:
components.
by disabling these I was able to run HA without termux-chroot and as a result the error “ImportError: dlopen failed: library “libandroidicu.so” not found” disappeared.
stream component is working now.

2 Likes

I managed to the install the latest Home Assistant Core on my OnePlus 5 running Oxygen OS 10.0.1 as well, did this via the proot-distro utility in termux. HACS also works here so far.

It’s better to do this on a clean installation of Termux to avoid conflicting paths. After that, you can more or less follow the commands on the documentation for Home Assistant Core, but I had to export CPATH manually due to some missing header files.

I didn’t get bad system calls on launching hass but some configurations still failed. Namely, usb, bluetooth, map, and zeroconf. The error from zeroconf came from a call to the if_nametoindex() function in the socket module. I only get this error within proot. Maybe someone more experienced can help figure out why this happens.

Here’s the error log:

2024-10-20 21:58:00.984 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration octopus_energy which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-20 21:58:01.002 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-20 21:58:01.016 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-20 21:58:05.142 WARNING (MainThread) [aiohttp_fast_zlib] zlib_ng and isal are not available, falling back to zlib, performance will be degraded.
2024-10-20 21:58:06.336 ERROR (MainThread) [homeassistant.setup] Error during setup of component zeroconf
Traceback (most recent call last):
  File "/root/hass/lib/python3.12/site-packages/homeassistant/setup.py", line 416, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/zeroconf/__init__.py", line 224, in async_setup
    aio_zc = await _async_get_instance(hass, **zc_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/zeroconf/__init__.py", line 163, in _async_get_instance
    zeroconf = HaZeroconf(**zcargs)
               ^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/zeroconf/_core.py", line 179, in __init__
    listen_socket, respond_sockets = create_sockets(interfaces, unicast, ip_version, apple_p2p=apple_p2p)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/zeroconf/_utils/net.py", line 383, in create_sockets
    if add_multicast_member(cast(socket.socket, listen_socket), i):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/zeroconf/_utils/net.py", line 288, in add_multicast_member
    iface_bin = struct.pack("@I", cast(int, interface[1]))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: required argument is not an integer
2024-10-20 21:58:09.257 ERROR (MainThread) [homeassistant.setup] Error during setup of component usb
Traceback (most recent call last):
  File "/root/hass/lib/python3.12/site-packages/homeassistant/setup.py", line 416, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/usb/__init__.py", line 154, in async_setup
    await usb_discovery.async_setup()
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/usb/__init__.py", line 209, in async_setup
    await self._async_start_monitor()
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/usb/__init__.py", line 232, in _async_start_monitor
    observer := await self.hass.async_add_executor_job(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/usb/__init__.py", line 261, in _get_monitor_observer
    monitor = Monitor.from_netlink(context)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/pyudev/monitor.py", line 119, in from_netlink
    raise EnvironmentError("Could not create udev monitor")
OSError: Could not create udev monitor
2024-10-20 21:58:09.293 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'bluetooth'. Setup failed for dependencies: ['usb']
2024-10-20 21:58:09.294 ERROR (MainThread) [homeassistant.setup] Setup failed for 'bluetooth': Could not setup dependencies: usb
2024-10-20 21:58:11.160 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'sonoff'. Setup failed for dependencies: ['zeroconf']
2024-10-20 21:58:11.161 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'sonoff': Could not setup dependencies: zeroconf
2024-10-20 21:58:13.609 ERROR (MainThread) [homeassistant.setup] Error during setup of component map
Traceback (most recent call last):
  File "/root/hass/lib/python3.12/site-packages/homeassistant/setup.py", line 416, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/map/__init__.py", line 49, in async_setup
    await _create_map_dashboard(hass)
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/lovelace/__init__.py", line 282, in _create_map_dashboard
    await dashboards_collection.async_create_item(
  File "/root/hass/lib/python3.12/site-packages/homeassistant/helpers/collection.py", line 316, in async_create_item
    validated_data = await self._process_create_data(data)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/hass/lib/python3.12/site-packages/homeassistant/components/lovelace/dashboard.py", line 283, in _process_create_data
    raise vol.Invalid("Panel url path needs to be unique")
voluptuous.error.Invalid: Panel url path needs to be unique
2024-10-20 21:58:17.389 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'default_config'. Setup failed for dependencies: ['bluetooth', 'map', 'usb', 'zeroconf']
2024-10-20 21:58:17.390 ERROR (MainThread) [homeassistant.setup] Setup failed for 'default_config': Could not setup dependencies: bluetooth, map, usb, zeroconf
2024-10-20 21:58:31.770 ERROR (SyncWorker_3) [aiodhcpwatcher] Cannot watch for dhcp packets: [Errno 13] Permission denied
2024-10-20 21:58:33.357 WARNING (SyncWorker_2) [pyroute2.netlink.rtnl.tcmsg.common] tcmsg: [Errno 13] Permission denied: '/proc/net/psched'
2024-10-20 21:58:33.358 WARNING (SyncWorker_2) [pyroute2.netlink.rtnl.tcmsg.common] the tc subsystem functionality is limited

Hey folks. I’m currently on 2024.9.3 and I can’t seem to get over one last hurdle - SSL. I keep getting errors like:

2024-10-27_03:15:16.13684 2024-10-27 04:15:16.135 ERROR (MainThread) [metno] Access to https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned error 'ClientConnectorError'
2024-10-27_03:15:16.57953 2024-10-27 04:15:16.578 ERROR (MainThread) [homeassistant.components.homeassistant_alerts.coordinator] Error requesting homeassistant_alerts data: Cannot connect to host alerts.home-assistant.io:443 ssl:default [None]

Worst thing is that I cannot add HACS because upon adding I get:

2024-10-27_03:19:29.75595 Traceback (most recent call last):
2024-10-27_03:19:29.75597   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/resolver.py", line 104, in resolve
2024-10-27_03:19:29.75598     resp = await self._resolver.getaddrinfo(
2024-10-27_03:19:29.75599            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75600 aiodns.error.DNSError: (11, 'Could not contact DNS servers')
2024-10-27_03:19:29.75601 
2024-10-27_03:19:29.75602 The above exception was the direct cause of the following exception:
2024-10-27_03:19:29.75603 
2024-10-27_03:19:29.75604 Traceback (most recent call last):
2024-10-27_03:19:29.75605   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/connector.py", line 1301, in _create_direct_connection
2024-10-27_03:19:29.75606     hosts = await self._resolve_host(host, port, traces=traces)
2024-10-27_03:19:29.75608             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75609   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/connector.py", line 911, in _resolve_host
2024-10-27_03:19:29.75610     return await asyncio.shield(resolved_host_task)
2024-10-27_03:19:29.75614            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75615   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/connector.py", line 948, in _resolve_host_with_throttle
2024-10-27_03:19:29.75617     addrs = await self._resolver.resolve(host, port, family=self._family)
2024-10-27_03:19:29.75618             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75624   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/resolver.py", line 113, in resolve
2024-10-27_03:19:29.75625     raise OSError(msg) from exc
2024-10-27_03:19:29.75626 OSError: Could not contact DNS servers
2024-10-27_03:19:29.75627 
2024-10-27_03:19:29.75628 The above exception was the direct cause of the following exception:
2024-10-27_03:19:29.75629 
2024-10-27_03:19:29.75630 Traceback (most recent call last):
2024-10-27_03:19:29.75631   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiogithubapi/client.py", line 139, in async_call_api
2024-10-27_03:19:29.75632     result = await self._session.request(**request_arguments)
2024-10-27_03:19:29.75632              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75633   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/client.py", line 657, in _request
2024-10-27_03:19:29.75638     conn = await self._connector.connect(
2024-10-27_03:19:29.75639            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75640   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/connector.py", line 564, in connect
2024-10-27_03:19:29.75641     proto = await self._create_connection(req, traces, timeout)
2024-10-27_03:19:29.75642             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75642   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/connector.py", line 975, in _create_connection
2024-10-27_03:19:29.75644     _, proto = await self._create_direct_connection(req, traces, timeout)
2024-10-27_03:19:29.75645                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75645   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiohttp/connector.py", line 1307, in _create_direct_connection
2024-10-27_03:19:29.75647     raise ClientConnectorError(req.connection_key, exc) from exc
2024-10-27_03:19:29.75647 aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host github.com:443 ssl:default [None]
2024-10-27_03:19:29.75648 
2024-10-27_03:19:29.75649 The above exception was the direct cause of the following exception:
2024-10-27_03:19:29.75650 
2024-10-27_03:19:29.75651 Traceback (most recent call last):
2024-10-27_03:19:29.75655   File "/data/data/com.termux/files/home/.homeassistant/custom_components/hacs/config_flow.py", line 98, in async_step_device
2024-10-27_03:19:29.75656     response = await self.device.register()
2024-10-27_03:19:29.75657                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75658   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiogithubapi/device.py", line 103, in register
2024-10-27_03:19:29.75659     response = await self._client.async_call_api(
2024-10-27_03:19:29.75660                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-27_03:19:29.75661   File "/data/data/com.termux/files/home/hass/lib/python3.12/site-packages/aiogithubapi/client.py", line 141, in async_call_api
2024-10-27_03:19:29.75662     raise GitHubConnectionException(
2024-10-27_03:19:29.75663 aiogithubapi.exceptions.GitHubConnectionException: Request exception for 'https://github.com/login/device/code' with - Cannot connect to host github.com:443 ssl:default [None]

Any ideas anyone?

1 Like

Another approach:

Simple and Fast Installing Home Assistant Core (and Matter Server) on Android: No Root, No QEMU

I am having the same ssl issues mentioned by @Neurovert after installing 2024.9.0 using the instructions here: Home Assistant Core on Android Tablet - #257 by derrij

Thanks @derrij for the detailed instructions :slight_smile: