I have HA running as docker containers on a UNC PC on an Ubuntu OS. On Ubuntu/Debian, default installs, there’s a cron task that will run apt update in the backend. When you log in via ssh, you’re given a nice display of # of updates are available, i.e.:
12 updates can be installed immediately.
3 of these updates are security updates.
Is there anyway to monitor / view this via the HA frontend? I don’t see any options in systemmonitor component.
It’s not as simple when HA is running as a Docker container. Ugh. Back to the drawing board. Need to find a way to access it’s output from inside a container…
For others: what I’ve done was create a cron task that will export the output into /usr/share/hassio/share/system_updates.out then I accessed that through HA’s already existing share mount: /share/system_updates.out
pz@hermes:/etc/cron.daily$ cat hassio-system-updates
#!/bin/sh
/usr/lib/update-notifier/apt-check 2>&1 | tee /usr/share/hassio/share/system_updates.out
Pretty simple method. apt-check echos out in STDERR, ish, requring the STDERR > STDOUT redirect in order to get it into the output. For some reason using > wouldn’t work, I had to use tee in order to properly catch the output for the .out file.
/usr/share/hassio/share is the -v mounted /share directory within HA.
If you are using docker, you can set up SSH to run the command. You will need to create a SSH key for the user running your container so it can access your host. It will be run as the user running your container so appropriate permissions need to be given based on what you want to do. Example: