[solved] HA on RPi w. official 7" touchscreen: howto get Lovelace on touchscreen?

Is it possible to get the Lovelace UI on the touchscreen with a RPi running HassOS and the official 7" touchscreen?

Sure, run a browser on the RPi in kiosk mode, pointing to http://localist:8123/

Hi @m0wlheld, thanks for stepping in.
Can you give me some pointers on how to get a browser on this system with HassOS on it?

If you use Portainer (an addon) you can then probably run up a Firefox containerā€¦ I have seen reports of that working but never tried it myself

1 Like

No. I donā€˜t use it. Maybe you have to switch to using Debian with a Home Assistant Supervised installation.

Running Firefox or any other browser in a container should be no problem, but you need an X-Driver like X11, X.org or Wayland.

1 Like

Iā€™m not a strong supporter of HassOS albeit I do accept its simplistic model for newcomers and the benefits thereof. But it does take away the easy of installing packages over the linux base and adds ā€œcomplexitiesā€ of containers and etra bolt-ons needed , present company (good) advice above as an example!
Although there will be many supporters of the latter. Iā€™m ok with linux but only because I took time to learn, ask questions, make mistakes ā€¦ blahblah.
I like to have oversight administrative control of my hardware rather than let software control it (well :roll_eyes: automation being the exception :smiley:)
Consider running home assistant core . You will lean so much more over time. Otherwise, the above solutions will get you up and running even if you do not know how. :yum:

2 Likes

Hi @ninjaef, Iā€™m just doing a test since I have this system but am using it for other purposes.
Now I wanted to see whether it is possible to have the frontend on the touchscreen.
I run HA Core as an LXC on Proxmox for my main setup but Iā€™m not familiar with containers, other then on Proxmox and I have some knowledge of Linux.

How can it be done to achieve what I want?

I think @m0wlheld is on the money !

and @DavidFW1960

and a guide I once used but with vanilla firefox as opposed to a containered firefox.:

(p.s. it took me about 2 minutes to search/read this!!!)

1 Like

Thanks.

So with Raspbian (or is it not possible with Raspbian?), HA Core (venv) and a browser it should be possible I guess.
What is the role/reason for using a container just for a browser?
If I use Raspbian with desktop I could use Chromium in Kiosk mode.

Home Assistant Container ( Home Assistant Core in containers), unless you want to spend more time on fiddling with Python dependencies, than with your actual goal.

Browser should stay ā€žnativeā€œ, makes no sense to use a containerd version (not sure it even exists).

1 Like

Again, +1 with @m0wlheld

HA core would be my preference in this situation, with a slight modification: I would run HA core in a container and incorporate firefox in the container also. Several ways to achieve this but an imported container volume is an option, but so is firefox in another container with both containers accessing the host.

I tend to use docker-compose and this would get you up and running with HA core in a container on top of Raspbian (or Pi OS as I believe it is called now).

docker-compose.yaml

version: '3'
services:
 homeassistant:
   container_name: homeassistant
   image: homeassistant/raspberrypi3-homeassistant:stable
   volumes:
     - /home/xyz/homeassistant/CONFIG:/config #--REPLACE xyz with your HA install directory
   environment:
     - TZ=Europe/London
   restart: always
   network_mode: host
   devices:
     - /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0 #-- Z-Wave CONTROLLER
   privileged: true

Then it would just be a case of

docker-compose -f ${PATH_TO_HASS}/docker-compose.yaml up

You can disregard the Z-Wave controller - I threw it in as an example.

N.B. Note the privileged and network_mode - potential ā€œrisksā€ but I use them with care.

You could extend this to incorporate firefox running in the same container - or another - but the former is easier. There are docker images that include firefox as a base build , which you would then add HA core to. Or, open the web instance of the Firefox docker, put it in full screen, then navigate to the Home Assistant instance in Firefox (http://192.168.1.1:8123 - or whatever your exposed HA IP is when using network_mode: host , or a more secure method!)
Thereā€™s many ways to cook this egg. Depends on how you want to implement it.

The python venv method is awfully overcomplicated and loads a right load of knotted bloat - but it is a an option if you are so inclined.

Caveat: This is about the most of docker I would want on my system - but as I conceded, there will be others who laud it.

EDIT:
Just found this as an example.
https://hub.docker.com/r/jlesage/firefox

1 Like

The example says ā€žBrowse to http://your-host-ip:5800 to access the Firefox GUI.ā€œ - you need a browser for this :wink:

But - actually it is possible to run an X program inside a container, you need to provide the DISPLAY environment variable for your X-server, e.g.

docker run -e DISPLAY=192.168.178.47:0.0 ...
1 Like

Not if one is running a headless host system and/or the container does not have an Xserver installed, as many do not, there is no need for a display. - I never use X and overwhelming majority of IoT and Automation boxes I setup commercially and domestically, do not run X.

To get familiar with Docker Iā€™m giving this a try on Proxmox and I have HA Core running in Docker on a Buster VM (under Promox) thanks to your help guys.

I also managed to get FF running in another container with the link @ninjaef provided.
Last thing is to be able to run FF from the console in Proxmox (if possible); would that be the same as on a RPi?

what do you mean by ā€œrun it from the console in proxnoxā€ proxnox is a management gui so you just spin up FF in a vm or container orā€¦?

what are you actually trying to do as in your END objective

In the final setup I would like to have that RPi with HA AND be able to use the HA frontend on the touchscreen that is connected to that RPi.
Now Iā€™m getting familiar with Docker (never used before) and was wondering if I could simulate/test that kind of setup on my Proxmox server.

ah, i see.

no. proxmox vm or container etc will see the touchscreen as a mouse. you canā€™t get a vm head to a dumb touchscreen

Seems overcooked , why make it so complicated?

Why not just use a Ā£40 unbranded Android tablet ruining Firefox in kiosk mode , either of LAN or WiFi

The idea was to have a compact system, HA + UI in one.

What kind of tablet are you referring to thatā€™s worth looking at for that price?
And if going for an Android tablet, would it not be ā€˜betterā€™ to use the companion app?

EDIT: another option would be to run Raspbian Lite with docker for HA Core and the bare minimum for a GUI to have browser on the host.

Thatā€™s what i have.
Totally confused now.
Why are you running proxmox on a Pi? Just do what youā€™re thinking, Rasp Lite, apt install firefox, run HA in docker as per the guide i provided above, add a Pi touch 7" screen hat, all done.
Simple.

Seem to be going round in circles. I need zzzzzz

edit ā€¦
Ā£40 Android tabs are all over ebay but you donā€™t need this , it seems. you need to stop, step back and plan what you want. Iā€™m in a spin

ttfn