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

Same problem :sob:

Did apt -y upgrade command worked? It seems that pkg command is broken for you. You can use apt -y install instead of pkg install.

1 Like

the command works apt -y upgrade

I ran the following commands:

apt -y install python libffi openssl coreutils clang libjpeg-turbo
python -m venv homeassistant
source homeassistant/bin/activate
pip install --upgrade pip
pip install wheel
pip install homeassistant

Resolved!
Thank you!
:smiling_face_with_three_hearts:

This is awesome, I was able to install home assistant on my Nvidia Shield. Has anyone successfully installed SSL? I can’t figure this one out

What about ssl? Maybe ssh instead of ssl?

no I mean SSL using letsencrypt. I’d like to access home assistant through https. There’s a tutorial how to do it

but it’s meant for Pi, it’s probably going to be problematic to achieve on Termux

That won’t work on termux. A see on internet some posts about termux and acme_tiny working with nginx reverse proxy. You can try to explore that.

Hello,
Is it possible to connect a zigbee gateway directly like conbee on termux with an OTG cable ?

No. There is no support for usb devices. Only usb disks or keyboards.

Hello,
what is the right pocedere to upgrade homeassistant to the actual version homeassistant 2021.3.1 from 2021.1.3? Please can you help me? Also I need Information for automatical startup via pm2.

If you install hass in venv activate it and than run this command

python -m pip install --upgrade homeassistant

To install pm2 first you need to install nodejs-lts. See post 313.

Hello vladosan,
thanks a lot for your friendly help, the procedere for the upgrade was working very well.
Regards Andy

1 Like

Greetings all,

Thank you @vladosam for this thread and introducing us to the termux/ha environment. It feels like it is one of the hidden gems and highly underrated.

I would like to contribute to this with a thread with a recent requirement I had and got working within the termux/ha ecosystem: Adding letsencrypt certs (wildcard) to your ha deployment running under termux and have them autorew.

This is not a beginners guide and it assumes the user is familiar with:

  • command line, pip, cron
  • has access to DNS (for TXT record changes)
  • make changes to their configuration.yaml for http on their own
  • is capable of using a search engine

This should serve as a sufficient starting point to adopt the commands issue a single domain cert.

In short:

  • Create venv for certbot
  • Install requirements for certbot to compile (rust)
  • Install certbot via pip
  • Run certbot with command line arguments to generate wildcard cert
  • Install crontab to update certs (untested to see if it does updates correctly)

The details are here: https://gist.github.com/meijerwynand/d2627fd2d45299ac70330f957de2d545

1 Like

Hi
My mosquitto broker is not working anymore. I may have deleted some conf file. It is starting on boot with pm2. I tried mosquitto -v

How can I restart mosquitto ?
I tried pkg uninstall mosquitto and pkg install mosquitto.
Can someone help me ?

That looks like mosquitto is already stared. pm2 restart mosquitto or just restart termux.


I restarded mosquitto but I can’t see my topic in hass


If I use localhost it seems to works but I can’t use my ip 's adress broker

From 2.0 version of mosquitto you need to define listeners to bind on specific interface or on all interfaces. If listener is not defined mosquitto listens only on localhost. You need to add something like this in mosquitto config to listen on all interfaces:

listener 1883 0.0.0.0
allow_anonymous true

Mosquitto local network access