Homeassistant core on Android (Guide Dec'22)

Why not build ffmpeg?

~/termux-packages $ ./build-package.sh ffmpeg -s
./build-package.sh: line 60: jq: command not found
ERROR: No package ffmpeg found in any of the enabled repositories. Are you trying to set up a custom repository?

You need to install jq:

pkg i jq

Or, here’s a compiled package of ffmpeg 5.1.2-7 for aarch64 that I have just built for Termux

Obviously, this is a binary provided by an internet stranger (me), so scan and use at your own risk

Use dpkg -i ffmpeg_5.1.2-7_aarch64.deb to install.

https://github.com/talss89/termux-ffmpeg-5/raw/main/ffmpeg_5.1.2-7_aarch64.deb

2 Likes

My aiodiscover/network.py was giving
FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf'

If you are rooted (and don’t want to use termux-chroot), you can solve this error as follows: (thanks to askubuntu.com/a/175742)

Run
mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1 "\n Mountpoint: " $3}'
and look for the mountpoint / (on my device it’s the first printed). You need the partition identifier for this mountpoint. In my case it was /dev/block/platform/soc/624000.ufshc/by-name/system

Then you can run:

sudo mount -o remount,rw THE_PARTITION_IDENTIFIER /
sudo cp /data/data/com.termux/files/usr/etc/resolv.conf /etc/resolv.conf
sudo mount --bind /data/data/com.termux/files/usr/etc/resolv.conf /etc/resolv.conf

Now resolv.conf exists in the /etc folder.

1 Like

Thanks, it’s work on HA 2023.5.1!

1 Like

Susesfully installed 2023.5.4 on Android 7 Huawey tablet using main, jambalaya posts and
pip install git+https://github.com/gilcu2/aiodiscover.git for /etc/resolv.conf problem when no root

Like that ```
aiohttp-3.8.1 step doesn’t needed any more because homeassistant install remove it and install 3.8.4

  1. Has any of you mitgated this?
[homeassistant] Error doing job: Exception in callback BaseSelectorEventLoop._accept_connection(<aiohttp.web_... 

In my case, it spits out upto 700 such events per second… Must be somekind of a loop.

It happens when internet connection is changed to other interface - f.e. WiFi to Ethernet in my case (I have a USB hub with ethernet port hooked up).

After disconnecting ethernet and restarting HASS, it worked fine for hours.
The moment I plugged in the Ethernet cable, the loop started.

  1. Has anyone tried the chrootted HASS?
    My device is rooted and maybe just switching to the chrooted install will solve most issues?

Hello, thanks for this guide! I’ve managed to apparently succesfully install this on two separate android devices, different phones, on different android versions, but with both, once I actually run home assistant, I seem to be forever stuck in ‘home assistant is starting, please wait…’, even though I left one such device running overnight, seeing if that would magically help. There doesn’t seem to be any errors showing up in termux either, to try and point me in any direction.

Did anyone encounter this too? Any idea what I could try?

Thanks!

you can install htop and navigate with arrows (right and down)
it’s enough to see what HA is trying to install

This is great!

It’s been over a year since you posted this, how’s life been using it over that time?

This widens the available off the shelf hardware enormously and tablets have internal batteries so will cope with power cuts up to a point. Many Zigbee sensors will run on the internal battery for a few hours too. As well as run of the mill tablets, there are loads of low cost wall mounted and table top Android tablets for smart home use out there.

Cool, I also have a plan to get running home assistant on galaxy tab s7 which is mostly at home. Pity that there is not a simple way to do it as even most mid range phones are more powerful than raspberry.

Hi @Ramblingman thank you very much for this complete guide.
I would like to know which version of homeassistant is the one you installed in this guide, since when initializing home assistant I am having several errors and I think it may be due to incompatibilities when using a newer version, so I would like to try with the version that you used. Thank you so much
PS: sorry for the English, use Google Translate

@matimaglia Your smartphone have other processor
I have tested samsung a3 2017 have problem
And to samsung a40 work fine

:heart_eyes: