Hello,
i just created my account to be able to reply to this.
I highly recommend looking into the app Linux Deploy
I started with the suggested approach here but I struggled a lot with fixing all the compilation errors and it was very slow on my Samsung Galaxy S5. Also I forogt the wake lock and all the time my mobile CPU went to sleep. But in the end it was running. But other issues with the bluetooth and so on made me crazy so I started this evening with Linux Deploy and the Homeassistant Server is already running.
Long story short : Linux Deploy is worth a try.
Iām trying to install Home Assistant on a Samsung S2 tablet running LineageOs.
Iām following the instructions from Home Assistant Core on Android Tablet - #64 by deividAlfa excepted for Python version where I have followed the instructions from Home Assistant Core on Android Tablet - #96 by Gnoupi to run it on the latest version (I have 3.11). Iām getting some errors during āpip install wheel homeassistantā (see below). Would you know what could be wrong? The log is long so I have only copied the errors below.
Thank you
/////////////
creating build/temp.linux-armv7l-cpython-311/aiohttp
arm-linux-androideabi-clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -DNDEBUG -g -fwrapv -O3 -Wall -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -fPIC -I/data/data/com.termux/files/home/hass/include -I/data/data/com.termux/files/usr/include/python3.11 -c aiohttp/_websocket.c -o build/temp.linux-armv7l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found #include "longintrepr.h"
^~~~~~~~~~~~~~~ 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
/////////////
Compiling arrayvec v0.7.2
error: could not compile `orjson` due to 2 previous errors
š„ maturin failed
Caused by: Failed to build a native library through cargo
/////////////
ERROR: Failed building wheel for cryptography
/////////////
ERROR: Failed building wheel for orjson
/////////////
Failed to build aiohttp cryptography orjson
ERROR: Could not build wheels for aiohttp, cryptography, orjson, which is required to install pyproject.toml-based projects
For aiohttp, would be good to check which version is required. Looks like there are some issues with python 3.11 (note that I still have 3.10) which should be fixed, though only recently: https://github.com/aio-libs/aiohttp/issues/6600 So we might just have a requirement which is not up to date in HA.
Or you could try downgrading python to 3.10 for the time being, I suppose.
For the rest, itās hard to say as the errors are missing the context and actual causes. For cryptography and orjson, there are several messages earlier about potential solutions. I havenāt tried them yet as Iām still running a 2022.8, so I canāt tell much more about them.
This message had decent steps for that, though I cannot find 3.10 in termux-pod, so the file will have to come from somewhere else (like an old version of termux).
After, if youāre anyway installing your own OS, you might want to follow the advice from this message Home Assistant Core on Android Tablet - #124 by fran6120 and just make it a docker deployment, which will save you from the hassle of the dependency hell. (not an option for me as Iām using a few android apps on my tablet which I cannot replace)
I had seen the same.
I have also tried to move back to 3.9.7 but Iām getting an SSL error.
I donāt want to replace LineageOs by another OS. My kids are using the tablet so I want to keep it an Android tablet.
Is this Docker solution possible with LineageOs?
I tried it on my OnePlus 5 running stock Android 10 and it works, but it takes a long time to boot up and feels slow (both host and guest) which is normal for a different architecture virtualized OS.
Welcome to Termux!
Community forum: https://termux.com/community
Gitter chat: https://gitter.im/termux/termux
IRC channel: #termux on libera.chat
Working with packages:
* Search packages: pkg search <query>
* Install a package: pkg install <package>
* Upgrade packages: pkg upgrade
Subscribing to additional repositories:
* Root: pkg install root-repo
* X11: pkg install x11-repo
Report issues at https://termux.com/issues
~ $ cd alpine
qemu-system-x86_64 -machine q35 -m 2048 -smp cpus=4 -cpu qemu64 \
-drive if=pflash,format=raw,read-only=on,file=$PREFIX/share/qemu/edk2-x86_64-code.fd \
-netdev user,id=n1,hostfwd=tcp::8123-:8123,hostfwd=tcp::9000-:9000,hostfwd=tcp::6052-:6052,hostfwd=tcp::49154-:49154,hostfwd=tcp::61208-:61208,hostfwd=tcp::3218-:3218 \
-device virtio-net,netdev=n1 \
-nographic alpine_2.qcow2
BdsDxe: failed to load Boot0001 "UEFI QEMU DVD-ROM QM00005 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x2,0xFFFF,0x0): Not Found
BdsDxe: loading Boot0002 "UEFI QEMU HARDDISK QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
BdsDxe: starting Boot0002 "UEFI QEMU HARDDISK QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
Welcome to GRUB!
Welcome to Alpine Linux 3.16
Kernel 5.15.78-0-virt on an x86_64 (/dev/ttyS0)
alpineop5 login: root
Password:
Welcome to Alpine!
The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.
You can setup the system with the command: setup-alpine
You may change this message by editing /etc/motd.
alpineop5:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b302dadea6a2 ghcr.io/home-assistant/home-assistant:latest "/init" 44 minutes ago Up 2 minutes homeassistant
e59c38ef7d00 causticlab/hass-configurator-docker:latest "/app/run.sh" 51 minutes ago Up 13 seconds 0.0.0.0:3218->3218/tcp, :::3218->3218/tcp configurador-hass-configurator-1
a37544f8da52 esphome/esphome "/entrypoint.sh dashā¦" 5 hours ago Up 2 minutes esphome
b7ea2ae49547 filebrowser/filebrowser:latest "/filebrowser --noauā¦" 5 hours ago Up 13 seconds (health: starting) 0.0.0.0:49154->80/tcp, :::49154->80/tcp archivos-filebrowser-1
645d8e7d288e portainer/portainer-ce:latest "/portainer" 5 hours ago Up 58 seconds 8000/tcp, 9443/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp portainer
alpineop5:~#
if (!_Py_InIntegralTypeRange(_PyTime_t, d)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:228:82: note: expanded from macro ā_Py_InIntegralTypeRangeā #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~ ./Include/pymath.h:221:124: note: expanded from macro ā_Py_IntegralTypeMaxā #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (((((type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Python/bootstrap_hash.c:141:17: error: call to undeclared function āgetrandomā; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] n = getrandom(dest, n, flags); ^ Python/bootstrap_hash.c:145:17: error: call to undeclared function āgetrandomā; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] n = getrandom(dest, n, flags); ^ 2 errors generated. make[3]: *** [Makefile:1855: Python/bootstrap_hash.o] Error 1 make[3]: *** Waiting for unfinished jobsā¦
I have 3 possibilities. None of the following versions of python is working for me but i would like to concentrate my efforts on one of them. Iām wondering which one.
Version 3.9.7: I had SSL error.
Version 3.10.4 build from source : I had an error in āgetrandomā
Version 3.11 I had an error due to longintrep.h
I have chosen to try again the installation with python 3.11. So I had again the error due to ālongintrep.hā.
I have found an interesting solution here:
I have created the file requirements.txt with: pip3 freeze > requirements.txt
I have then edited the versions indicated in the requirements.txt file (aiohttp, yarl, frozenlist) and then used: pip install -r requirements.txt
I donāt have anymore the error due to ālongintrep.hā but I have stopped the installation because I have a version conflict.
I have described it here: Dependency on AIOHTTP
Hi! Iāve just try for the first time to do this and i have no basic on programming or python & Co. i use a old nexus 7 (2012) tablet for this and i have some issue with Homeassistant. I try all day to install this 2 components make me mad. all other thing is alredy installed ( and also here i have some hard time to resolve the issue)
Hi all, after installing HA it is not possible to start itā¦ I have python 3.11. This is my error massage. (hass) ~ $ hass -v Traceback (most recent call last): File "/data/data/com.termux/files/home/hass/bin/hass", line 5, in <module> from homeassistant.__main__ import main File "/data/data/com.termux/files/home/hass/lib/python3.11/site-packages/homeassistant/__main__.py", line 19 from homeassistant.util.async import run_callback_threadsafe ^^^^^ SyntaxError: invalid syntax (hass) ~ $ hass -v Traceback (most recent call last): File "/data/data/com.termux/files/home/hass/bin/hass", line 5, in <module> from homeassistant.__main__ import main File "/data/data/com.termux/files/home/hass/lib/python3.11/site-packages/homeassistant/__main__.py", line 19 from homeassistant.util.async import run_callback_threadsafe ^^^^^ SyntaxError: invalid syntax
If you had a working version of Home Assistant on Python 3.10, but it all broke down in Python 3.11, then here are the steps to go back to Python 3.10:
How to Downgrade Python from 3.11 to 3.10 in Termux
If you already installed python version 3.11 first uninstall it
You will get an error, ignore it. Just give next commands
ls
mkdir build
cd build
ar x ../python.deb
tar Jvxf data.tar.xz
cp -R data/data/pl.sviete.dom/files/usr/* $PREFIX/
cd ..
rm -rf data
echo "export LD_LIBRARY_PATH=$PREFIX/lib" > .bashrc
source .bashrc