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

Only if you clone it in .homeassistant folder. But you don’t want to do that. Clone it in some folder then copy paste. Google is your friend.

Has anyone managed to get bluetooth tracker working? Get error hass can’t install pybluez. Any suggestions?

You can’t control bluetooth from termux. https://github.com/termux/termux-packages/issues/3044

Thank You Sir! i swear i have searched for several days and never once seen that git. you guys are search engine gods.I’m not worthy . lol
i notice though that grimler91 says " This particular error can be fixed by linking against liblog.so though, so LDFLAGS=" -llog" pip install bluepy solves it" in the last post . i do not understand what this means but sounds to me like a solution albeit over my head?
i could use bluetooth over network but it defeats the purpose of putting ha on android for me as i intend to place several old phones around 2.5 acres for presence detection and need the actual bluetooth to broadcast around the individual devices.

THANKS SO MUCH FOR YOUR HELP. AND ESPECIALLY THE TIME THAT YOU CONTINUE TO TAKE TO HELP HELPLESS OTHERS COMPLETE OUR TRIVIAL GOALS! Speaking for myself on the trivial part of course.lol

No problem. I also seek help from others on this forum. So it’s a circle. :slight_smile: that fix to install bluepy won’t help you because for now you can’t control bluetooth from termux. I don’t know is there bluetooth presence detection for ESP32? Look at openmqttgateway on esp32.

Thanks again, and as far as the esp32s I have been looking at those for a while there is tons of stuff that you can do with them I just can’t bring myself to buy more hardware when I literally have seven cell phones sitting here doing nothing everything from S3 all the way up to s6 plus as well as a couple of iPhones and LG g5 . No I do not steal them for a living LOL, I have four kids and have never thrown a single cell phone away or traded it in over a 20-year span.so you can imagine how happy I was whenever I saw that you had figured out a way to put homeassistant on Android but so far looks like I’m going to have to go the esp route After all. Thanks again for your time and most of all knowledge.

My google fu is strong today. :slight_smile: there is a version of termux with bluetooth support. You need to build it yourself. The problem is it’s older version of termux. https://github.com/termux/termux-app/pull/517#issuecomment-397219747

1 Like

Awesome! Thank you
I’ll check it out! I am not sure what it means build it myself, but I’ll figure it out :hugs::hugs:

Hello, i’m Trying to install HomeAssistant to my P10 but I can’t because there are some error.
I will attach the log and I have modified the link because I can’t add more than 2 links.
Thanks a lot for all your help.

Welcome to Termux!

Wiki:
Community forum:
IRC channel: #termux on freenode
Gitter chat:
Mailing list: [email protected]

Search packages: pkg search
Install a package: pkg install
Upgrade packages: pkg upgrade
Learn more: pkg help
$ pip install homeassistant
Collecting homeassistant
Using cached pythonhosted/packages/6f/58/10da82c33822117daf47bdf43bb6a8b69c04f329f35c7733a1f76f5dfad0/homeassistant-0.87.1-py3-none-any.whl
Collecting bcrypt==3.1.5 (from homeassistant)
Using cached pythonhosted/packages/91/a5/fd19eac0252e56b4ce65ced937ae40024782c21108da7d830003b7f76cdb/bcrypt-3.1.5.tar.gz
Installing build dependencies … error
Complete output from command /data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /data/data/com.termux/files/usr/tmp/pip-build-env-_zy3cehh/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i pypi . org/simple – setuptools wheel “cffi>=1.1; python_implementation != ‘PyPy’”:
Collecting setuptools
Using cached pythonhosted/packages/d1/6a/4b2fcefd2ea0868810e92d519dacac1ddc64a2e53ba9e3422c3b62b378a6/setuptools-40.8.0-py2.py3-none-any.whl
Collecting wheel
Using cached pythonhosted/packages/7c/d7/20bd3c501f53fdb0b7387e75c03bd1fce748a1c3dd342fc53744e28e3de1/wheel-0.33.0-py2.py3-none-any.whl
Collecting cffi>=1.1
Using cached pythonhosted/packages/10/fe/b6362c613a70ac29cf7cac36307d85f08ebe4a96d9d54b895b10a807e39b/cffi-1.12.0.tar.gz
Collecting pycparser (from cffi>=1.1)
Using cached pythonhosted/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status ‘done’
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status ‘error’
Complete output from command /data/data/com.termux/files/usr/bin/python -u -c “import setuptools, tokenize;file=’/data/data/com.termux/files/usr/tmp/pip-install-fcksficn/cffi/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /data/data/com.termux/files/usr/tmp/pip-record-nv1usfu6/install-record.txt --single-version-externally-managed --prefix /data/data/com.termux/files/usr/tmp/pip-build-env-_zy3cehh/overlay --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.7
creating build/lib.linux-aarch64-3.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/model.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/commontypes.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/error.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/cparser.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/api.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/lock.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/init.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/verifier.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/recompiler.py -> build/lib.linux-aarch64-3.7/cffi
copying cffi/_cffi_include.h ->
build/lib.linux-aarch64-3.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.7/cffi
copying cffi/_embedding.h -> build/lib.linux-aarch64-3.7/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.7/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-aarch64-3.7
creating build/temp.linux-aarch64-3.7/c
aarch64-linux-android-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Oz -Oz -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/data/data/com.termux/files/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.7/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ‘ffi.h’ file not found
#include <ffi.h>
^~~~~~~
1 error generated.
error: command 'aarch64-linux-

Command “/data/data/com.termux/files/usr/bin/python -u -c “import setuptools, tokenize;file=’/data/data/com.termux/files/usr/tmp/pip-install-fcksficn/cffi/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /data/data/com.termux/files/usr/tmp/pip-record-nv1usfu6/install-record.txt --single-version-externally-managed --prefix /data/data/com.termux/files/usr/tmp/pip-build-env-_zy3cehh/overlay --compile” failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-fcksficn/cffi/


Command “/data/data/com.termux/files/usr/bin/python /data/data/com.termux/files/usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /data/data/com.termux/files/usr/tmp/pip-build-env-_zy3cehh/overlay --no-warn-script-location --no-binary :none: --only-binary
:none: -i https://pypi.org/simple – setuptools wheel “cffi>=1.1; python_implementation != ‘PyPy’”” failed with error code 1 in None

Did you install all required packages before installing home assistant?

pkg install python-dev libffi-dev openssl-dev coreutils clang

Thanks a lot
Finally i think that i have solved the problem, i have installed one custom room and seems to work fine.
how can i modify configuration.yaml file?
thanks a lot
stefano

Search termux remote access if you want to edit files remotely. Mosh is good option if you are using linux.

Hello, when I try to install HA I get this error:

  1 error generated.
  error: command 'arm-linux-androideabi-clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cryptography
  Running setup.py clean for cryptography
Successfully built aiohttp bcrypt
Failed to build cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Thanks for your work and your help

Any errors above that 1 error generated?

reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘docs/_build’
warning: no previously-included files matching ‘*’ found under directory ‘vectors’
writing manifest file ‘src/cryptography.egg-info/SOURCES.txt’
running build_ext
generating cffi module ‘build/temp.linux-armv7l-3.7/_padding.c’
creating build/temp.linux-armv7l-3.7
generating cffi module ‘build/temp.linux-armv7l-3.7/_constant_time.c’
generating cffi module ‘build/temp.linux-armv7l-3.7/_openssl.c’
building ‘_openssl’ extension
creating build/temp.linux-armv7l-3.7/build
creating build/temp.linux-armv7l-3.7/build/temp.linux-armv7l-3.7
arm-linux-androideabi-clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -Os -fPIC -I/data/data/com.termux/files/usr/include/python3.7m -c build/temp.linux-armv7l-3.7/_openssl.c -o build/temp.linux-armv7l-3.7/build/temp.linux-armv7l-3.7/_openssl.o -Wconversion -Wno-error=sign-conversion
build/temp.linux-armv7l-3.7/_openssl.c:498:10: fatal error: ‘openssl/opensslv.h’ file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.

Install openssl-dev

pkg install openssl-dev
1 Like

Thank you very much, it worked.

after entering the hass command until I get this error

File “/data/data/com.termux/files/usr/lib/python3.7/ctypes/init.py”, line 374, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: undefined symbol: getifaddrs

That error is related to discovery component. Upgrading android or flashing custom rom helped some people. Search this thread.