Maybe if i had the v14 files, I could donwgrade it…
I mean it’s embedded in the Termux package, and will most likely be this way for the future, so I’m not sure if it’s the way to go, rather to work around that or fix it.
If I could find it, could be quicker than looking for a way but I couldn’t find the Deb files.
About fixing, googled it around but couldn’t find a way yet
Ok. So, I managed to install it. What I did was:
orjson
pip download orjson==3.7.11
tar xvf orjson-3.7.11.tar.gz
cd orjson-3.7.11
nano Cargo.toml
commented out lto = "thin"
maturin build --release --strip
cd ..
rm orjson-3.7.11.tar.gz
tar -czvf orjson-3.7.11.tar.gz orjson-3.7.11
cryptography
pip download cryptography==37.0.4
tar xvf cryptography-37.0.4.tar.gz
cd cryptography-37.0.4/src/rust
nano Cargo.toml
commented out lto = "thin"
maturin build --release --strip
cd
cd ../../../
rm cryptography-37.0.4.tar.gz
tar -czvf cryptography-37.0.4.tar.gz cryptography-37.0.4
then i followed with installation steps, but manually installing orjson and cryptography:
python -m venv hass
source hass/bin/activate
pip install orjson-3.7.11.tar.gz
pip install cryptography-37.0.4.tar.gz
pip install homeassistant
Thank you for the guide and support! Comments from @Gnoupi and @leofuscaldi were very useful!
Managed to install it on an Asus ZenPad Z500M running Android 7. Did not have to install lineage OS. Also installed it in parallel on a OnePlus 7 Pro with LineageOS 18.1
Managed to connect multiple devices, works pretty well. I still have these issues in the log, if someone fixed these already, please share
Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: hardware')
October 2, 2022 at 11:29:43 PM – (ERROR) setup.py
Unable to set up dependencies of default_config. Setup failed for dependencies: hardware
October 2, 2022 at 11:29:43 PM – (ERROR) setup.py
Error during setup of component hardware
October 2, 2022 at 11:29:41 PM – (ERROR) components/hardware/websocket_api.py
The hardware error can be fixed by using this commit to psutils fix #2138 (critical): re-define ethtool_cmd_speed · giampaolo/psutil@b88f4d8 · GitHub
I had trouble using pip download so I used unearth to get the url link and downloaded it with wget.
python -m pip install --upgrade unearth
unearth psutil | grep url
wget https://files.pythonhosted.org/packages/8f/57/828ac1f70badc691a716e77bfae258ef5db76bb7830109bf4bcf882de020/psutil-5.9.2.tar.gz
tar xvf psutil-5.9.2.tar.gz
change 2 files like in the commit and then:
rm psutil-5.9.2.tar.gz
tar -czvf psutil-5.9.2.tar.gz psutil-5.9.2
pip install psutil-5.9.2.tar.gz
Hey, I’m rather new to Linux in general, so please bear with me. I was having issues installing any packages that needed to generate a wheel, and came across this forum. I was trying to install cryptography through termux. I’ve never used home assistant, so my use case may differ here. I did a little research and found I could set an environment variable to force rustc to not use the lto flag, something like
export RUSTFLAGS="-C lto=n"
If this is a dumb way to do this, please let me know, but I was finally able to install what I needed after setting the variable.
I don’t think its dumb, its easier and faster than changing the files.
Hey everyone,
Having trouble at the orjson point:
Collecting orjson==3.7.11
Using cached orjson-3.7.11.tar.gz (946 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [58 lines of output]
Collecting maturin<0.14,>=0.13
Using cached maturin-0.13.5.tar.gz (150 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting tomli>=1.1.0
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Building wheels for collected packages: maturin
Building wheel for maturin (pyproject.toml): started
Building wheel for maturin (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for maturin (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-310
creating build/lib.linux-aarch64-cpython-310/maturin
copying maturin/__main__.py -> build/lib.linux-aarch64-cpython-310/maturin
copying maturin/__init__.py -> build/lib.linux-aarch64-cpython-310/maturin
copying maturin/import_hook.py -> build/lib.linux-aarch64-cpython-310/maturin
running egg_info
creating maturin.egg-info
writing maturin.egg-info/PKG-INFO
writing dependency_links to maturin.egg-info/dependency_links.txt
writing requirements to maturin.egg-info/requires.txt
writing top-level names to maturin.egg-info/top_level.txt
writing manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'maturin.egg-info/SOURCES.txt'
running build_ext
running build_rust
error: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured.
Have already installed the Rust and Cargo packages, so I’m at a loss here.
Did you install rustup? I had that issue too on termux (sandboxed Linux app for Android), rustup doesn’t support termux based builds. I think I’d installed rust with my package manager, and then installed rustup on top of it (not good lol). Try doing rustup self uninstall
and then install rust (if you haven’t already) through your normal package manager, then try again.
Hello
So I managed to successfully install the recent version of HA on my Android11 tablet, without any errors.
However running the HA with hass -v gives me the following errors
Running HA in safe mode works fine.
Can someone please guide? Thanks in advance.
2022-10-10 21:30:19.962 ERROR (MainThread) [homeassistant.setup] [u]**[u]**Error during setup of component hardware**[/u]**[/u]
Traceback (most recent call last):
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/homeassistant/components/hardware/__init__.py", line 15, in async_setup
await websocket_api.async_setup(hass)
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/homeassistant/components/hardware/websocket_api.py", line 36, in async_setup
ha_psutil=await hass.async_add_executor_job(ha_psutil.PsutilWrapper),
File "/data/data/com.termux/files/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/psutil_home_assistant/__init__.py", line 15, in __init__
psutil_spec.loader.exec_module(psutil_module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/psutil/__init__.py", line 42, in <module>
from . import _common
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/psutil/__init__.py", line 102, in <module>
from . import _pslinux as _psplatform
File "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/psutil/_pslinux.py", line 26, in <module>
from . import _psutil_linux as cext
ImportError: dlopen failed: cannot locate symbol "ethtool_cmd_speed" referenced by "/data/data/com.termux/files/home/hass/lib/python3.10/site-packages/psutil/_psutil_linux.cpython-310.so"...
2022-10-10 21:30:19.986 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.5 seconds
2022-10-10 21:30:19.994 INFO (MainThread) [homeassistant.setup] Setup of domain schedule took 0.5 seconds
2022-10-10 21:30:19.997 INFO (MainThread) [homeassistant.setup] Setup of domain input_text took 0.5 seconds
2022-10-10 21:30:20.027 INFO (MainThread) [homeassistant.setup] Setting up tts
2022-10-10 21:30:20.030 INFO (MainThread) [homeassistant.setup] Setting up sensor
2022-10-10 21:30:20.032 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.0 seconds
2022-10-10 21:30:20.050 INFO (MainThread) [homeassistant.setup] Setup of domain input_select took 0.5 seconds
2022-10-10 21:30:20.063 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 0.5 seconds
2022-10-10 21:30:20.065 INFO (MainThread) [homeassistant.setup] Setup of domain input_button took 0.5 seconds
2022-10-10 21:30:20.082 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.energy
2022-10-10 21:30:20.086 INFO (SyncWorker_2) [homeassistant.loader] Loaded notify from homeassistant.components.notify
2022-10-10 21:30:20.194 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
2022-10-10 21:30:20.198 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.2 seconds
2022-10-10 21:30:20.202 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 0.0 seconds
2022-10-10 21:30:20.206 INFO (MainThread) [homeassistant.setup] Setting up notify
2022-10-10 21:30:20.207 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.0 seconds
2022-10-10 21:30:20.214 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: hardware
[u]**2022-10-10 21:30:20.225 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: hardware')**[/u]
2022-10-10 21:30:20.233 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
2022-10-10 21:30:40.029 ERROR (MainThread) [metno] Access to https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned error 'ClientConnectorError'
2022-10-10 21:30:40.040 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Home' for met integration not ready yet: Update failed: ; Retrying in background
2022-10-10 21:30:40.050 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 26.50s
2022-10-10 21:30:40.052 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2022-10-10 21:30:40.082 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
CRITICAL: Can't open /proc/net/dev !
2022-10-10 21:30:41.977 CRITICAL (SyncWorker_0) [scapy.loading] Can't open /proc/net/dev !
CRITICAL: Can't open /proc/net/route !
2022-10-10 21:30:41.998 CRITICAL (SyncWorker_0) [scapy.loading] Can't open /proc/net/route !
CRITICAL: Can't open /proc/net/dev !
2022-10-10 21:30:42.006 CRITICAL (SyncWorker_0) [scapy.loading] Can't open /proc/net/dev !
2022-10-10 21:30:42.291 WARNING (SyncWorker_1) [pyroute2.netlink.rtnl.tcmsg.common] tcmsg: [Errno 13] Permission denied: '/proc/net/psched'
2022-10-10 21:30:42.307 WARNING (SyncWorker_1) [pyroute2.netlink.rtnl.tcmsg.common] the tc subsystem functionality is limited
2022-10-10 21:30:50.614 ERROR (MainThread) [homeassistant.components.homeassistant_alerts] Timeout fetching homeassistant_alerts data
2022-10-10 21:31:00.102 ERROR (MainThread) [metno] Access to https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned error 'ClientConnectorError'
^C2022-10-10 21:31:01.188 INFO (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Pool recreatingte code here
In same point of install, stop with some errors:
Failed to find tool
Cargo build…
Failed building wheel for maturin…
… a very long log.
any tip?
Looks like the same error as in this message: Home Assistant Core on Android Tablet - #134 by snotfod
“A very long log” unfortunately does not help much when it comes to finding a solution. Unless you know what to find in the log and can provide it in your post, you’d have to post all the relevant log.
That said, @leofuscaldi reported issues in the cargo build and maturin failing, check if it’s the same error: Home Assistant Core on Android Tablet - #127 by leofuscaldi
He managed to work around it by doing a lot of things manually: Home Assistant Core on Android Tablet - #132 by leofuscaldi
With that in mind, this answer seem to suggest and easier way to deal with the issue, maybe you could try that: Home Assistant Core on Android Tablet - #135 by BeagleGreen
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.
Thanks for your help. How can I downgrade to 3.10?
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?