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

unable to install npm

$ npm install [email protected] -g
npm ERR! Cannot read property ‘length’ of undefined

npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2018-12-07T17_10_23_593Z-debug.log

What is your android version? Is it Oreo (8)?

Hi,
My installation of nmap was OK. It is on an android 6 with following command: pip install net-tools nmap

But then I had problem with the setup which generates:

“Error during setup of component device_tracker” and
" File “/data/data/com.termux/files/usr/lib/python3.7/site-packages/homeassistant/components/device_tracker/init.py”, line 671, in async_load_config
device.pop(‘vendor’, None)
TypeError: pop() takes at most 1 argument (2 given)"

Install nmap with pkg install nmap.

OK, I uninstalled pip and installed with pkg instead.
But exactly the same error msg at setup…

I will re-check my config file, maybe some problem there.

Samsung S7 with Android 8.0

In my case it was a config error in known_devices. nmap is up and running now. Thanks!

It seems there is a problem with npm and termux on android 8. Try to edit

$PREFIX/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js   
1 Like

fixed issue with npm.
thank you.

Hi, I cannot run hass (it says “no command ‘hass’ found”). Hass install finished with the following: “error: command ‘arm-linux-androideabi-clang’ failed with exit status 1”. Can you please give me some pointers how to fix this? Thanks

Is there anything in home-assistant.log?

Can’t find it. :frowning: No home/.homeassistant dir either. Anywhere else?

This is the full error when I try to install homeassistant:
Command "/data/data/com.termux/files/usr/bin/python -u -c "import setuptools, tokenize;__file__='/data/data/com.termux/files/usr/tmp/pip-install-8f_4hd4w/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-j1lf9orn/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-install-8f_4hd4w/cffi/

Did you install libffi?

pkg install libffi-dev

Now I did. Trying pip install homeassistant again…

Looks good now, thanks for the help!

Hi,
Like many, I confess to being a novice user. I have been through your process quite a few times on three different old phones.
With lots of false starts, I now have a “test” system running what seems to be reliably.
My big problem has been to keep the server “visible” on the network. From the weather sensor history, I am fairly sure that the termux-wake-lock keeps HA alive, but the phone keeps dropping off the network so that I can’t access the configuration without manually waking the phone.
My solution has been to install a “keep screen on” app that can be configured to keep many apps awake. I configured it to keep what i thought to be system culprits awake in a fire hose approach, better to keep everything awake.
It works and my phone has been reachable for over 48 hours.
But I feel there must be a more elequent way…

Any ideas would be welcome

PS As it is holiday period, I might not be online…

Do you have Keep wi-fi on during sleep option enabled?

Hi
Wifi on during sleep is set to always in the android advanced settings