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

Hi,
I got thru the first five steps ok and discovered the raw editor and looked at the config it contains.

At first I was confused by the inverted nature of the config; eg the title comes at the end of a section.

But I’m uncertain where and what to put for the button card config.

Could you post what you configured in a little context so I can figure out where it goes.

Happy Lockdown :slight_smile:

Under cards. Just watch for indentation. Button code begins with - type: ‘custom:button-card’
and ends with operator: default.

        title: Input boolean
        type: entities
      - type: 'custom:button-card'
        color_type: card
        entity: input_boolean.test2
        name: Intruder Alert
        state:
          - color: red
            icon: 'mdi:alert'
            styles:
              card:
                - animation: blink 2s ease infinite
            value: 'on'
          - color: green
            icon: 'mdi:shield-check'
            operator: default
      - entities:
          - entity: light.bed_light_2
          - entity: light.ceiling_lights_2

Wow, works OK.
Thanks a bunch; you’re a star…

1 Like

Do you know how can I use / install the Snapshot feature without Hass.io? I’m running it on Android too thanks to this post.

And I’d like to make a backup in case of loss.

You can’t install supervisor on termux. You can copy .homeassistant folder as a backup solution.

1 Like

Only that is enough? If I want to restore I just copy that, install the dependencies and I’m done?

Yes. All homeassistant configuration is in .homeassistant folder. Install homeassistant in python venv. Copy .homeassistant folder to termux home. Start homeassistant.

As I add new integrations, I see more and more warnings in the log about unknown host addresses and connections refused.

I finally got the error log below saying the system can’t process messages fast enough.

I am no techie, but I suspect Termux has a websockets ( what ever they are) bottleneck.

Has anyone else experienced this problem?

(Not sure if it is relevant, but I’m running NitrogenOS on old Nexus 4)

## Log Details (ERROR)

Logger: homeassistant.components.websocket_api.http.connection.2915967208
Source: components/websocket_api/http.py:138
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 11:55:45 (1 occurrences)
Last logged: 11:55:45

Client unable to keep up with pending messages. Stayed over 512 for 5 seconds

I don’t think this is related to termux. I also got those errors on pi. When you edit lovelace ui try to refresh browser after saving.

Thks.
I read the link, it seems this is not Termux related.
I was using the android front end; so refreshing the front end doesn’t seem possible.
I deleted HACS and the custom button card, but the error happened once again.
I’ll keep an eye on things. Errors are disconcerting.

Hi
first of all thank you for this tutorial
I am following this https://www.youtube.com/watch?v=0N_587XCWd0
nothing happened for hours
can u help me
thanks

Try to activate homeassistant venv and run hass from it. That way you will get much more verbose logs.

Thanks a lot I solved my problem but now I have another problem with Esphome


When I try to compile this happen
I you help I will be so happy

Hello!

I followed the guidance and everything is working so far, as I saw on earlier post, that the stream component is not working on termux, is this still the case?
I would like to view my rtsp cameras on lovelace.

please help me I couldnt solve this

I tried to fix your problem with esphome and i did manage to compile firmware with proot on termux. But then i get another error on upload. So
termux is not the best platform for esphome.

Just to let everybody know, starting from 0.115.0 betas it was not possible to start the frontend, logs said there was an issue with pillow, I was able to fix it by installing libjpeg-turbo package

pkg install libjpeg-turbo

3 Likes

Hi, thank you so much for this. I’m trying to I stall and mostly going well untill I got to starting Hass. t that point I get a long list of errors as the attached screenshot.


I realise this thread is getting on a bit so maybe sources have changed.
Very new to this so would much appreciate any guidance offered.
Thanks all

When I get to the step to install home assistant with venv I get the message
"Error: Unable to create directory ‘/data/data/com.termux/files/home/homeassistant/bin/activate’

How did you install hass? Did you install required packages libffi, openssl… Termux is a rolling release. So if you just installed termux or updated all packages that you have python3.9. I am not sure that hass supports python3.9.