Install Home Assistant, Mosquitto broker and Node-Red on android

Thanks @JeffLIrion and @vladosam, both your fixes worked! Had to specify path for adbkey for androidtv.

Now, I noticed google cast isn’t working. Enabled debug to see discovery starts but doesn’t find anything.

EDIT: Fixed by specifying in config instead of using discovery.
EDIT 2: Multicast seems to be broken so xiaomi gateway broadcasts are going unlistened.

Are you sure that is a termux problem? I have xiaomi gateway and it works with my phone.

Any issues with the Android TV component? I recently added a fix for an issue where newer devices would constantly become unavailable and then reconnect, and so far I’ve only had one tester.

Tengo en funcionando homeassistant en android pero no encuentro la carpeta configurations yalm e
n el almacenamiento alguna solucion ?

You must setup storage termux-setup-storage see this:
https://wiki.termux.com/wiki/Internal_and_external_storage
For remote access use ssh
https://wiki.termux.com/wiki/Remote_Access

Hi,
My Termux app grow out of storage so I made a new fresh install. When installing all pkg’s there were an error on ndk-stl saying "Package ndk-stl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
ndk-sysroot

So I followed this proposal and used the ndk-sysroot and the installation finished ok.

But now I have a integration problem with zeroconf that is updated in HA 0.94, this integration fails.

Do you think this is a result of the absent of ndk-stl or is it some other dependency I am missing?

Many thanks!

On my phone i still have ndk-stl and no problems with zeroconf but that’s an old package. Did you install all usual pkgs? clang, libffi, openssl, make.

Yes, but I did not include pkgs that was ended -dev.
Just checked the installation log for zeroconf which reported:

2019-10-05 16:08:18 ERROR (MainThread) [homeassistant.setup] Error during setup of component zeroconf
Traceback (most recent call last):                File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/homeassistant/setup.py", line 172, in _async_setup_component                    component.setup, hass, processed_config  # type: ignore                                       File "/data/data/com.termux/files/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run                                                result = self.fn(*self.args, **self.kwargs)

… etc

The message reports files from python3.7, so maybe it is caused by me removing the python-dev?
Thanks!

…but python-dev was not available when I tried…

There are no more dev pkgs. Dev is included in main pkgs. Do you get any more errors for zeroconf?

Could be device or termux. Since it works for you, its probably my device. I’m running a custom ROM 7.1.

I’ve abandoned trying this out till I find another device.

Could only find this error msg for zeroconf:

2019-10-05 16:08:18 ERROR (MainThread) [homeassistant.setup] Error during setup of component zeroconf
Traceback (most recent call last):                File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/homeassistant/setup.py", line 172, in _async_setup_component                    component.setup, hass, processed_config  # type: ignore                                       File "/data/data/com.termux/files/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run                                                result = self.fn(*self.args, **self.kwargs)   File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/homeassistant/components/zeroconf/__init__.py", line 61, in setup               zeroconf = Zeroconf()                         File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/zeroconf.py", line 1808, in __init__
    interfaces = normalize_interface_choice(interfaces)
  File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/zeroconf.py", line 1741, in normalize_interface_choice     return get_all_addresses()                    File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/zeroconf.py", line 1730, in get_all_addresses              for iface in ifaddr.get_adapters()            File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/ifaddr/_posix.py", line 44, in get_adapters                retval = libc.getifaddrs(ctypes.byref(addr))  File "/data/data/com.termux/files/usr/lib/python3.7/ctypes/__init__.py", line 377, in __getattr__                                                 func = self.__getitem__(name)                 File "/data/data/com.termux/files/usr/lib/python3.7/ctypes/__init__.py", line 382, in __getitem__                                                 func = self._FuncPtr((name_or_ordinal, self))                                               AttributeError: undefined symbol: getifaddrs

But the first error is I think from ssdp:

2019-10-05 15:54:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):                File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/homeassistant/components/ssdp/__init__.py", line 38, in initialize              await scanner.async_scan(None)                File "/data/data/com.termux/files/usr/lib/python3.7/site-packages/homeassistant/components/ssdp/__init__.py", line 60, in async_scan              entries = await self.hass.async_add_executor_job(ssdp.scan)
  File "/data/data/com.termux/files/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)   File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/netdisco/ssdp.py", line 226, in scan
    for addr in zeroconf.get_all_addresses():     File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/zeroconf.py", line 1730, in get_all_addresses              for iface in ifaddr.get_adapters()
  File "/data/data/com.termux/files/home/.homeassistant/deps/lib/python3.7/site-packages/ifaddr/_posix.py", line 44, in get_adapters                retval = libc.getifaddrs(ctypes.byref(addr))
  File "/data/data/com.termux/files/usr/lib/python3.7/ctypes/__init__.py", line 377, in __getattr__
    func = self.__getitem__(name)                 File "/data/data/com.termux/files/usr/lib/python3.7/ctypes/__init__.py", line 382, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: undefined symbol: getifaddrs

They both seems to relate to python3.7 files…
Thanks for any suggestion…

If you search this thread for undefined symbol there is a lot of problems with that error. It seems upgrading android or changing custom rom is only way to get rid of that problem.

OK, I see, thanks!
This is an old S5 that I am using only for HA evaluation so maybe I go for a custom rom.
Thanks for your conclusion.

Hi,

I have an Oneplus 6 with a with a broken screen so i want to use it as a smarthub. I have a custom android 10 rom on it but i have difficulties installing.
first i got it to work and i can login to the page but i cant see the hass.io tab.
I tried to reinstall it again but now i cant install node-red telling my my python version (3.7) is not the correct version (highest can be 3.0) and i cant get pm2 to work with anything anymore, can anyone help me out with this? (btw i’m using termux with sshd-putty for the install)

If pm2 give you problems check version with pm2 -v. If it is version 3 install older pm2 version.

pm2 kill
npm remove pm2 -g
npm i -g --unsafe-perm pm2

And for node-red install python2 and make.

pkg install python2 make 

Thanks fot the info, installing python worked :slight_smile:
i do still have a problem with pm2, when i reinstall it i get :
npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for [email protected]: wanted {“os”:"darwin,linux,win32,f…

I got it to work nonetheless :wink: my thermostat is added by default as well, now i like to add my LG tv with this LG connected apps, hopefully i can find it here somewhere

My bad. You have to specify pm2 version.

npm install [email protected] -g

I install hass on termux and it work, but someone tried to use Tileboard for create a user interface??
in hassio in the config folder crerate www folder and so on, here there is no config folder and if you create the www folder in .homeassistant it doesn’t work.
tnx