I. Requirements:
1. Android phone has root running andoid 5.0 (according to theory, it is possible for iphone to do it but I should not stop it)Â
2. Termux software, keyboard with ctrl (option but should install because it has 4 navigation keys handy for editing the command)
II. Proceed to install.Â
1. Install dependencies:
Code:
pkg updates pkg upgrade pkg install python python-dev nano coreutils ndk-sysroot clang mosquitto nodejs nodejs-dev openssh openssl openssl-dev tsu libuxi libffi-dev # upgrade pip (option) pip install --upgrade pip pip install pycrypto sqlalchemy npm i -g node-gyp node-pre-gyp bcryptjs bcrypt # assigns root permissions to termux (this is depending on the phone but will usually be in phones running systemless using Magisk) exit tsudo (exit root permissions)
2. Install HASS, node-red, pm2
Code:
npm i -g --unsafe-perm node-red pm2 # CÃ i HASS : pip install homeassistant
3. Launch to create the original config file
Code:
node-red # Wait for it to finish, press ctrl + c to interrupt mosquitto # Wait for it to finish running then press ctrl + c to stop hass # Wait for it to finish, press ctrl + c to interrupt[code]
4. Activate:
[code]start pm2 mosquitto – -v -c /data/data/com.termux/files/usr/etc/mosquitto/mosquitto.conf pm2 start node-red –node-args = “- max-old- space-size = 128 “- -v pm2 start hass –interpreter = python – –config /data/data/com.termux/files/home/.homeassistant
5. Support commands
Code:
#dump and save config processes running pm2 save #Show list of processes running pm2 list # View process hass details running pm2 shows hass pm2 logs hass # Stop process or delete process without using curly braces. pm2 stop pm2 delete
So you have finished installing HASS server on your old android phone. The rest is config.
Access to HASS Server:Â
If you use the phone itself, open the browser and type in http://127.0.0.1:8123Â or use the HASS app to type the server address.
If you have already installed version 0.75.3, then reinstall the dependencies in section 1 and upgrade hass.
Code:
pip install --upgrade homeassistant