Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add homeassistant-supervisor container to improve Home Assistant Voice Assistant stack onboarding on Jetson devices #505

Draft
wants to merge 38 commits into
base: dev
Choose a base branch
from

Conversation

ms1design
Copy link
Contributor

@ms1design ms1design commented May 8, 2024

homeassistant-supervisor

Hi @dusty-nv 👋

To keep Home Assistant on Jetson project progressing, I'm revisiting the experiments with the Home Assistant Supervisor container. My aim is to simplify the onboarding process for Home Assistant and Wyoming add-ons on Jetson devices based on our experiences during the latest Jetson AI Research Group meeting.

While I'm not sure whether containerizing Supervisor and making it work with all its system dependencies is feasible, I'm willing to give it a shot. Below is what I tried yesterday and what should be done or fixed based on the homeassistant-supervisor logs.

All questions and advice are warmly welcomed!

Updates:

May 8, 2024

Logs: _homeassistant-supervisor_logs.txt

  • Added the homeassistant-supervisor container.
  • Migrated common Home Assistant container dependencies (ciso8601 and psutil-home-assistant) to standalone, reusable containers in the smart-home/dependencies directory.
  • Added the homeassistant-supervisor dependency eudev in the smart-home/dependencies directory.
  • Resolved the 403 errors when fetching RAW files from GitHub in jetson_containers/utils.js. This was achieved by switching from urllib.request (which still uses HTTP/1.1) to the requests library, enabling the use of HTTP/2 requests.
  • Introduced new container versioning helper methods in jetson_containers/utils.py: handle_json_request, handle_text_request, github_latest_tag, and get_json_value_from_url.
  • Improved versioning in all Home Assistant containers in config.py.
  • Adjusted the homeassistant-core container's build.sh script.
  • [WIP] Added the experimental homeassistant-supervised container.

Quick Start

  1. Create those directories on host machine running docker using same user:
/usr/share/hassio/audio
/usr/share/hassio/dns
/usr/share/hassio/homeassistant
/usr/share/hassio/ssl
/usr/share/hassio/share
  1. Run docker-compose.yaml example

TODO

Based on homeassistant-supervisor logs

  • Make the required dependencies work inside container or work on easy onboarding using install.sh script for host machine if conterization is impossible
  • Ensure that homeassistant-core can detect the homeassistant-supervisor container and vice versa
  • Sort out the homeassistant-supervisor container docker volumes & paths
  • Refactor eudev dependency container to support independent build & install stages to allow dpkg upload
  • Fix the SUPERVISOR_MACHINE value to properly configure coresys (generic-aarch64 is used for now) to enable OTA updates:
    • INFO (MainThread) [supervisor.bootstrap] Setting up coresys for machine: generic-aarch64
    • WARNING (MainThread) [supervisor.updater] Can't process version data: 'generic-aarch64'~
  • Fix the docker availability:
    • WARNING (MainThread) [supervisor.resolution.evaluations.base] The configuration of Docker is not supported (more-info: https://www.home-assistant.io/more-info/unsupported/docker_configuration)
    • CRITICAL (MainThread) [supervisor.supervisor] Can't setup Supervisor Docker container!
    • WARNING (SyncWorker_0) [supervisor.docker.manager] Can't get None for cleanup
  • Configure the docker deamon on host machine to support required method of logging (or find an easy way of doing that for users):
    • WARNING (MainThread) [supervisor.resolution.evaluations.docker_configuration] Docker logging driver json-file is not supported!
  • Introduce AppArmor (but where? in container or on host?):
    • WARNING (MainThread) [supervisor.host.apparmor] AppArmor is not enabled on host
    • WARNING (MainThread) [supervisor.resolution.evaluations.base] AppArmor is required for Home Assistant. (more-info: https://www.home-assistant.io/more-info/unsupported/apparmor)
  • Run container in priviliged mode:
    • WARNING (MainThread) [supervisor.resolution.evaluations.base] Supervisor does not run in Privileged mode. (more-info: https://www.home-assistant.io/more-info/unsupported/privileged)
    • CRITICAL (MainThread) [supervisor.hardware.monitor] Not privileged to run udev monitor!
  • Sort out trusted content security:
    • WARNING (MainThread) [supervisor.resolution.evaluations.base] System run with disabled trusted content security. (more-info: https://www.home-assistant.io/more-info/unsupported/content_trust)
    • WARNING (MainThread) [supervisor.security.module] Disabled content-trust, skip validation
  • Sort this out (could be because of use SUPERVISOR_DEV: 1):
    • 0.00s - Debugger warning: It seems that frozen modules are being used, which may make the debugger miss breakpoints. Please pass -Xfrozen_modules=off to python to disable frozen modules. Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
  • Fix the missing cli docker plugin in container:
    • INFO (MainThread) [supervisor.plugins.base] No cli plugin Docker image None found.
    • WARNING (MainThread) [supervisor.plugins.base] Error on installing cli plugin, retrying in 30sec
  • Unknown issue: INFO (MainThread) [supervisor.docker.interface] Found None versions: [<AwesomeVersion CalVer '22.04'>, <AwesomeVersion SpecialContainer 'latest'>, <AwesomeVersion SpecialContainer 'latest'>, <AwesomeVersion SpecialContainer 'latest'>, <AwesomeVersion SpecialContainer 'latest'>, <AwesomeVersion SemVer '2.19.4'>, <AwesomeVersion SpecialContainer 'latest'>]

docker-compose example:

x-shared-properties: &shared-properties
  init: false                     # Do not use init process
  restart: unless-stopped         # Restart policy
  devices:
    - /dev/snd:/dev/snd           # to share audio devices
    - /dev/bus/usb                # to share usb devices

name: home-assistant-jetson
version: "3.9"
services:
  hassio_supervisor:
    image: ms1design/homeassistant-supervisor:latest-r36.2.0-cu122-cp312
    <<: *shared-properties
    container_name: hassio_supervisor
    hostname: supervisor
    privileged: true
    security_opt:
      - seccomp=unconfined
      - apparmor=unconfined # or apparmor=hassio-supervisor
    ports:
      - "80:80"
    volumes:
      # Data
      - ha-config:/config
      - ha-share:/share
      - ha-media:/media
      # Supervisor data
      - ha-supervisor:/data
      - ha-supervisor-share:/tmp/supervisor/data
      # Docker
      - /usr/bin/docker:/usr/bin/docker
      - /var/run/docker.sock:/var/run/docker.sock:rw
      - /run/docker.sock:/run/docker.sock:ro # https://github.com/home-assistant/supervisor/blob/main/supervisor/const.py#L37
      - /etc/docker/daemon.json:/etc/docker/daemon.json:ro
      # dbus, NetworkManager, udisks2
      - /run/dbus:/run/dbus:ro
      # udev
      - /run/udev:/run/udev:ro
      # audio
      - /run/audio:/run/audio:ro
      - /etc/asound.conf:/etc/asound.conf:ro
      - /etc/pulse/client.conf:/etc/pulse/client.conf:ro
      # systemd
      - /run/systemd/system:/run/systemd/system
      - /var/log/journal:/var/log/journal:ro
      - /run/log/journal:/run/log/journal:ro
      # id, time
      - /etc/machine-id:/etc/machine-id:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    environment:
      SUPERVISOR_SHARE: /usr/share/hassio
      SUPERVISOR_NAME: hassio_supervisor
      SUPERVISOR_MACHINE: qemuarm-64

volumes:
  ha-config:
    name: ha-config
  ha-share:
    name: ha-share
  ha-media:
    name: ha-media
  ha-backup:
    name: ha-backup
  ha-addons:
    name: ha-addons
  ha-supervisor:
    name: ha-supervisor
  ha-supervisor-share:
    name: ha-supervisor-share

@dusty-nv
Copy link
Owner

dusty-nv commented May 8, 2024

This is awesome @ms1design, good luck in your mission! 🙏

The crew from Seeed Studio would also probably be interested to help you with this if you didn't already show it to them.

@ms1design
Copy link
Contributor Author

It's funny—I discussed it with Elaine, but back then, I advised against using supervisor because I found it too complicated to support or use. 🙈 Welcome to my world 😆

@ms1design
Copy link
Contributor Author

May 15, 2024 update

Logs: _hassio_supervisor_logs.txt

  • homeassistant-supervisor container is not immediately restarting anymore due to many issues
  • homeassistant-supervisor is able to detect homeassistant-core container running in same docker network
  • fixed homeassistant-supervisor installation script
  • fixed docker availability inside homeassistant-supervisor container
  • fixed the SUPERVISOR_MACHINE value to properly configure coresys using git patch
  • fixed homeassistant-supervisor docker image labels required for proper system and machine detection
  • fixed debugger warnings (SUPERVISOR_DEV: 1)
  • fixed the missing cli docker plugin in container
  • fixed homeassistant-supervisor and other HA related docker image labels required for proper versions detection
  • no more trusted content security issues

@ms1design
Copy link
Contributor Author

ms1design commented May 20, 2024

May 16, 2024 Update

I'm happy to share a significant breakthrough: the successful setup of the homeassistant-supervisor with homeassistant container on my Jetson device 🎉

This bringing us one step closer to harnessing the power of edge computing for AI/ML Home Assistant solutions 🦾 🤖 The next step would be streamlined install and uninstall process for Jetson devices.

Screenshot 2024-05-20 at 12 01 11 Screenshot 2024-05-20 at 12 01 45 Screenshot 2024-05-20 at 12 02 27 Screenshot 2024-05-20 at 12 02 50

How it Works

The journey to this milestone has been marked by quirks and challenges, but overall idea was to:

  • Dockerize everything, ensuring efficient containerization
  • Leverage native hardware capabilities from the Jetson host machine.
  • Jetson host machine is not dedicated to run only Home Assistant – should also host LLMs backends, among other things.
  • Docker within Docker, where currently it utilizes the host machine's Docker installation (experimental but promising).

Quick Start Guide

Note: This is a work-in-progress version, so instructions may evolve.

Before launching the homeassistant-supervisor container on your Jetson device, ensure you meet the necessary requirements:

Jetson Host Machine Configuration

  1. Set up essential directories on your Jetson:

    sudo mkdir -p \
        /usr/share/hassio/audio/asound \
        /usr/share/hassio/dns \
        /usr/share/hassio/homeassistant \
        /usr/share/hassio/ssl \
        /usr/share/hassio/share \
        /usr/share/hassio/media \
        /usr/share/hassio/tmp
  2. Create symbolic links:

    sudo ln -sf /etc/pulse/client.conf /usr/share/hassio/tmp/homeassistant_pulse

Initiating Containers

Execute the following command to launch the hassio_supervisor container:

docker run -d \
    --name hassio_supervisor \
    --hostname supervisor \
    --privileged \
    --cap-add=ALL \
    --security-opt seccomp=unconfined \
    --security-opt apparmor=unconfined \
    -p 80:80 \
    -v ha-config:/config \
    -v ha-share:/share \
    -v ha-media:/media \
    -v ha-supervisor:/data \
    -v ha-supervisor-share:/tmp/supervisor/data \
    -v /usr/bin/docker:/usr/bin/docker \
    -v /run/docker.sock:/run/docker.sock:ro \
    -v /etc/docker/daemon.json:/etc/docker/daemon.json:ro \
    -v /var/run/dbus:/var/run/dbus \
    -v /run/NetworkManager:/run/NetworkManager \
    -v /etc/NetworkManager:/etc/NetworkManager \
    -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro \
    -v /run/udev:/run/udev:ro \
    -v /etc/udev/rules.d:/etc/udev/rules.d:ro \
    -v /run/audio:/run/audio:ro \
    -v /etc/asound.conf:/etc/asound.conf:ro \
    -v /etc/pulse/client.conf:/etc/pulse/client.conf:ro \
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    -v /etc/systemd/resolved.conf:/etc/systemd/resolved.conf \
    -v /run/systemd/system:/run/systemd/system \
    -v /var/log/journal:/var/log/journal:ro \
    -v /run/log/journal:/run/log/journal:ro \
    -v /etc/machine-id:/etc/machine-id:ro \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/timezone:/etc/timezone:ro \
    --device /dev/snd:/dev/snd \
    --device /dev/bus/usb \
    ms1design/homeassistant-supervisor:latest-r36.2.0-cu122-cp312

hassio_supervisor container, powered by Docker running on the host machine, will seamlessly download all necessary dependencies, including hassio_audio, hassio_cli, hassio_dns, hassio_multicast, hassio_observer, and finally, the homeassistant, as shown in the screenshot below.

Screenshot 2024-05-16 at 14 04 55 Screenshot 2024-05-16 at 13 58 12

Note: hassio_supervisor autonomously manages all containers prefixed with hassio_ and homeassistant container. Manual intervention is not recommended.

Logs

homeassistant-supervisor logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/udev.sh
[13:55:20] INFO: Using udev information from host
cont-init: info: /etc/cont-init.d/udev.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun supervisor (no readiness notification)
services-up: info: copying legacy longrun watchdog (no readiness notification)
s6-rc: info: service legacy-services successfully started
[13:55:20] INFO: Starting local supervisor watchdog...
2024-05-16 13:55:20.994 INFO (MainThread) [__main__] Initializing Supervisor setup
2024-05-16 13:55:21.052 INFO (MainThread) [supervisor.bootstrap] Setting up coresys for machine: qemuarm-64
2024-05-16 13:55:21.058 INFO (MainThread) [supervisor.docker.supervisor] Attaching to Supervisor ms1design/homeassistant-supervisor with version 2024.05.1
2024-05-16 13:55:21.058 INFO (MainThread) [supervisor.docker.supervisor] Connecting Supervisor to hassio-network
2024-05-16 13:55:21.263 WARNING (SyncWorker_0) [supervisor.docker.manager] ms1design/homeassistant-supervisor not found for cleanup
2024-05-16 13:55:21.264 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state initialize
2024-05-16 13:55:21.265 WARNING (MainThread) [supervisor.resolution.evaluations.docker_configuration] Docker logging driver json-file is not supported!
2024-05-16 13:55:21.265 WARNING (MainThread) [supervisor.resolution.evaluations.base] The configuration of Docker is not supported (more-info: https://www.home-assistant.io/more-info/unsupported/docker_configuration)
2024-05-16 13:55:21.266 WARNING (MainThread) [supervisor.resolution.evaluations.base] AppArmor is required for Home Assistant. (more-info: https://www.home-assistant.io/more-info/unsupported/apparmor)
2024-05-16 13:55:21.267 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-16 13:55:21.268 INFO (MainThread) [__main__] Setting up Supervisor
2024-05-16 13:55:21.432 INFO (MainThread) [supervisor.api] Starting API on 172.30.32.2
2024-05-16 13:55:21.830 CRITICAL (MainThread) [supervisor.hardware.monitor] Not privileged to run udev monitor!
2024-05-16 13:55:21.832 INFO (MainThread) [supervisor.dbus.manager] Connected to system D-Bus.
2024-05-16 13:55:21.832 INFO (MainThread) [supervisor.dbus.agent] Load dbus interface io.hass.os
2024-05-16 13:55:21.832 INFO (MainThread) [supervisor.dbus.hostname] Load dbus interface org.freedesktop.hostname1
2024-05-16 13:55:21.833 INFO (MainThread) [supervisor.dbus.logind] Load dbus interface org.freedesktop.login1
2024-05-16 13:55:21.833 INFO (MainThread) [supervisor.dbus.network] Load dbus interface org.freedesktop.NetworkManager
2024-05-16 13:55:21.833 INFO (MainThread) [supervisor.dbus.rauc] Load dbus interface de.pengutronix.rauc
2024-05-16 13:55:21.833 INFO (MainThread) [supervisor.dbus.resolved] Load dbus interface org.freedesktop.resolve1
2024-05-16 13:55:21.834 INFO (MainThread) [supervisor.dbus.systemd] Load dbus interface org.freedesktop.systemd1
2024-05-16 13:55:21.834 INFO (MainThread) [supervisor.dbus.timedate] Load dbus interface org.freedesktop.timedate1
2024-05-16 13:55:21.834 WARNING (MainThread) [supervisor.dbus.agent] No OS-Agent support on the host. Some Host functions have been disabled.
2024-05-16 13:55:21.834 WARNING (MainThread) [supervisor.dbus.rauc] Host has no rauc support. OTA updates have been disabled.
2024-05-16 13:55:22.088 INFO (MainThread) [supervisor.host.services] Updating service information
2024-05-16 13:55:22.097 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
2024-05-16 13:55:22.101 WARNING (SyncWorker_0) [supervisor.host.sound] Can't update PulseAudio data: Failed to connect to pulseaudio server
2024-05-16 13:55:22.373 INFO (MainThread) [supervisor.host.network] Updating local network information
2024-05-16 13:55:22.610 INFO (MainThread) [supervisor.host.apparmor] Loading AppArmor Profiles: set()
2024-05-16 13:55:22.611 WARNING (MainThread) [supervisor.host.apparmor] AppArmor is not enabled on host
2024-05-16 13:55:22.617 INFO (MainThread) [supervisor.docker.monitor] Started docker events monitor
2024-05-16 13:55:22.618 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
2024-05-16 13:55:22.929 INFO (MainThread) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-cli versions: [<AwesomeVersion CalVer '2024.05.0'>]
2024-05-16 13:55:22.939 INFO (MainThread) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-cli with version 2024.05.0
2024-05-16 13:55:22.985 INFO (MainThread) [supervisor.plugins.cli] Starting CLI plugin
2024-05-16 13:55:23.664 INFO (MainThread) [supervisor.docker.cli] Starting CLI ghcr.io/home-assistant/aarch64-hassio-cli with version 2024.05.0 - 172.30.32.5
2024-05-16 13:55:23.856 INFO (MainThread) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-dns versions: [<AwesomeVersion CalVer '2024.04.0'>]
2024-05-16 13:55:23.865 INFO (MainThread) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-dns with version 2024.04.0
2024-05-16 13:55:23.901 INFO (MainThread) [supervisor.plugins.dns] Starting CoreDNS plugin
2024-05-16 13:55:24.565 INFO (MainThread) [supervisor.docker.dns] Starting DNS ghcr.io/home-assistant/aarch64-hassio-dns with version 2024.04.0 - 172.30.32.3
2024-05-16 13:55:24.567 INFO (MainThread) [supervisor.plugins.dns] Updated /etc/resolv.conf
2024-05-16 13:55:24.736 INFO (MainThread) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-audio versions: [<AwesomeVersion CalVer '2023.12.0'>]
2024-05-16 13:55:24.743 INFO (MainThread) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-audio with version 2023.12.0
2024-05-16 13:55:24.765 INFO (MainThread) [supervisor.plugins.audio] Starting Audio plugin
2024-05-16 13:55:25.425 INFO (MainThread) [supervisor.docker.audio] Starting Audio ghcr.io/home-assistant/aarch64-hassio-audio with version 2023.12.0 - 172.30.32.4
2024-05-16 13:55:25.532 INFO (MainThread) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-observer versions: [<AwesomeVersion CalVer '2023.06.0'>]
2024-05-16 13:55:25.537 INFO (MainThread) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-observer with version 2023.06.0
2024-05-16 13:55:25.569 INFO (MainThread) [supervisor.plugins.observer] Starting observer plugin
2024-05-16 13:55:26.227 INFO (MainThread) [supervisor.docker.observer] Starting Observer ghcr.io/home-assistant/aarch64-hassio-observer with version 2023.06.0 - 172.30.32.6
2024-05-16 13:55:26.366 INFO (MainThread) [supervisor.docker.interface] Found ghcr.io/home-assistant/aarch64-hassio-multicast versions: [<AwesomeVersion CalVer '2024.03.0'>]
2024-05-16 13:55:26.375 INFO (MainThread) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/aarch64-hassio-multicast with version 2024.03.0
2024-05-16 13:55:26.405 INFO (MainThread) [supervisor.plugins.multicast] Starting Multicast plugin
2024-05-16 13:55:26.827 INFO (MainThread) [supervisor.docker.multicast] Starting Multicast ghcr.io/home-assistant/aarch64-hassio-multicast with version 2024.03.0 - Host
2024-05-16 13:55:26.829 INFO (MainThread) [supervisor.homeassistant.secrets] Loaded 0 Home Assistant secrets
2024-05-16 13:55:26.971 INFO (MainThread) [supervisor.docker.interface] Found ghcr.io/home-assistant/qemuarm-64-homeassistant versions: [<AwesomeVersion CalVer '2024.5.3'>]
2024-05-16 13:55:26.976 INFO (MainThread) [supervisor.docker.interface] Attaching to ghcr.io/home-assistant/qemuarm-64-homeassistant with version 2024.5.3
2024-05-16 13:55:26.995 INFO (MainThread) [supervisor.os.manager] No Home Assistant Operating System found
2024-05-16 13:55:26.998 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/esphome/home-assistant-addon repository
2024-05-16 13:55:27.999 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/hassio-addons/repository repository
2024-05-16 13:55:27.001 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/home-assistant/addons repository
2024-05-16 13:55:28.356 INFO (MainThread) [supervisor.store] Loading add-ons from store: 77 all - 77 new - 0 remove
2024-05-16 13:55:28.390 INFO (MainThread) [supervisor.addons.manager] Found 0 installed add-ons
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.backups.manager] Found 0 backup files
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.discovery] Loaded 0 messages
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.ingress] Loaded 0 ingress sessions
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state setup
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-05-16 13:55:28.406 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state setup
2024-05-16 13:55:28.407 WARNING (MainThread) [supervisor.resolution.evaluations.base] OS-Agent is not correctly working (more-info: https://www.home-assistant.io/more-info/unsupported/os_agent)
2024-05-16 13:55:28.407 WARNING (MainThread) [supervisor.resolution.evaluations.base] Detected unsupported OS: Ubuntu 22.04.3 LTS (more-info: https://www.home-assistant.io/more-info/unsupported/os)
2024-05-16 13:55:28.407 WARNING (MainThread) [supervisor.resolution.evaluations.base] Systemd journal is not working correctly or inaccessible (more-info: https://www.home-assistant.io/more-info/unsupported/systemd_journal)
2024-05-16 13:55:28.407 WARNING (MainThread) [supervisor.resolution.evaluations.base] Docker cgroup version 2 is not supported! {'1'} (more-info: https://www.home-assistant.io/more-info/unsupported/cgroup_version)
2024-05-16 13:55:28.407 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-16 13:55:28.407 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not healthy - privileged
2024-05-16 13:55:28.408 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state setup
2024-05-16 13:55:28.408 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-16 13:55:28.408 INFO (MainThread) [__main__] Running Supervisor
2024-05-16 13:55:28.410 WARNING (MainThread) [supervisor.core] System running in a unsupported environment!
2024-05-16 13:55:28.410 CRITICAL (MainThread) [supervisor.core] System is running in an unhealthy state and needs manual intervention!
2024-05-16 13:55:28.410 INFO (MainThread) [supervisor.jobs] 'OSManager.mark_healthy' blocked from execution, no Home Assistant OS available
2024-05-16 13:55:28.410 INFO (MainThread) [supervisor.addons.manager] Phase 'initialize' starting 0 add-ons
2024-05-16 13:55:28.434 INFO (MainThread) [supervisor.addons.manager] Phase 'system' starting 0 add-ons
2024-05-16 13:55:28.434 INFO (MainThread) [supervisor.addons.manager] Phase 'services' starting 0 add-ons
2024-05-16 13:55:28.439 INFO (MainThread) [supervisor.core] Start Home Assistant Core
2024-05-16 13:55:28.460 INFO (MainThread) [supervisor.homeassistant.module] Update pulse/client.config: /data/tmp/homeassistant_pulse
2024-05-16 13:55:28.978 INFO (MainThread) [supervisor.docker.homeassistant] Starting Home Assistant ghcr.io/home-assistant/qemuarm-64-homeassistant with version 2024.5.3
2024-05-16 13:55:28.978 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
2024-05-16 13:55:33.746 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state startup
2024-05-16 13:55:33.746 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-16 13:55:33.994 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-05-16 13:55:34.001 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to NOT_RUNNING
2024-05-16 13:55:39.013 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to RUNNING
2024-05-16 13:55:39.014 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
2024-05-16 13:55:39.014 INFO (MainThread) [supervisor.addons.manager] Phase 'application' starting 0 add-ons
2024-05-16 13:55:39.039 INFO (MainThread) [supervisor.misc.tasks] All core tasks are scheduled
2024-05-16 13:55:39.040 INFO (MainThread) [supervisor.core] Supervisor is up and running
2024-05-16 13:55:39.041 INFO (MainThread) [supervisor.host.info] Updating local host information
2024-05-16 13:55:39.042 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-05-16 13:55:39.042 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-05-16 13:55:39.047 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-05-16 13:55:39.047 INFO (MainThread) [supervisor.resolution.module] Create new suggestion create_full_backup - system / None
2024-05-16 13:55:39.047 INFO (MainThread) [supervisor.resolution.module] Create new issue no_current_backup - system / None
2024-05-16 13:55:39.047 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-05-16 13:55:39.048 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-05-16 13:55:39.048 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-05-16 13:55:39.048 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-05-16 13:55:39.049 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-05-16 13:55:39.049 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-05-16 13:55:39.049 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-05-16 13:55:39.080 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-05-16 13:55:39.081 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-05-16 13:55:39.082 INFO (MainThread) [supervisor.jobs] 'OSManager.reload' blocked from execution, no Home Assistant OS available
2024-05-16 13:55:39.082 INFO (MainThread) [supervisor.host.services] Updating service information
2024-05-16 13:55:39.098 INFO (MainThread) [supervisor.host.network] Updating local network information
2024-05-16 13:55:39.104 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-05-16 13:55:39.105 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-05-16 13:55:39.449 WARNING (MainThread) [supervisor.resolution.evaluations.base] Found unsupported images: {'1dev/agent', 'ms1design/text-generation-webui', 'docker.n8n.io/n8nio/n8n', 'portainer/agent', 'redis', 'ghcr.io/getzep/postgres', 'ghcr.io/tecnativa/docker-socket-proxy', 'ghcr.io/getzep/zep'} (more-info: https://www.home-assistant.io/more-info/unsupported/software)
2024-05-16 13:55:39.450 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-05-16 13:55:39.450 INFO (MainThread) [supervisor.jobs] 'ResolutionFixup.run_autofix' blocked from execution, system is not healthy - privileged
2024-05-16 13:55:39.537 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
2024-05-16 13:55:39.540 WARNING (SyncWorker_12) [supervisor.host.sound] Can't update PulseAudio data: Failed to connect to pulseaudio server
2024-05-16 13:55:39.541 INFO (MainThread) [supervisor.host.manager] Host information reload completed

hassio_audio logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/filesystem.sh
cont-init: info: /etc/cont-init.d/filesystem.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service alsa: starting
s6-rc: info: service alsa successfully started
s6-rc: info: service alsa-init: starting
[13:55:25] INFO: Adjust ALSA mixer settings for /dev/snd/controlC0
[13:55:26] INFO: Adjust ALSA mixer settings for /dev/snd/controlC1
[13:55:26] INFO: Adjust ALSA mixer settings for /dev/snd/controlC2
s6-rc: info: service alsa-init successfully started
s6-rc: info: service pulseaudio: starting
[13:55:58] WARNING: No supervisor configuration found
W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
W: [pulseaudio] main.c: Home directory of user 'root' is not '/var/run/pulse', ignoring.
W: [pulseaudio] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
W: [pulseaudio] main.c: OK, so you are running PA in system mode. Please make sure that you actually do want to do that.
W: [pulseaudio] main.c: Please read http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ for an explanation why system mode is usually a bad idea.
W: [pulseaudio] module-udev-detect.c: Failed to open /proc/asound/card0: No such file or directory
W: [pulseaudio] module-udev-detect.c: Failed to open /proc/asound/card1: No such file or directory
W: [pulseaudio] module-udev-detect.c: Failed to open /proc/asound/card2: No such file or directory
s6-rc: info: service pulseaudio successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
E: [pulseaudio] main.c: Failed to acquire org.pulseaudio.Server: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.6842" is not allowed to own the service "org.pulseaudio.Server" due to security policies in the configuration file
N: [pulseaudio] bluez5-util.c: Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
W: [pulseaudio] bluez5-util.c: org.bluez.Media1.RegisterApplication() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "RegisterApplication" with signature "oa{sv}" on interface "org.bluez.Media1" doesn't exist
W: [pulseaudio] bluez5-util.c: Couldn't register media application for adapter /org/bluez/hci0
W: [pulseaudio] bluez5-util.c: Only SBC codec is available for A2DP profiles
E: [pulseaudio] bluez5-util.c: org.bluez.Media1.RegisterEndpoint() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "RegisterEndpoint" with signature "oa{sv}" on interface "org.bluez.Media1" doesn't exist
E: [pulseaudio] bluez5-util.c: org.bluez.Media1.RegisterEndpoint() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "RegisterEndpoint" with signature "oa{sv}" on interface "org.bluez.Media1" doesn't exist

hassio_cli logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started

hassio_dns logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/corefile.sh
2024/05/16 13:55:24 open /config/coredns.json: no such file or directory
[13:55:24] ERROR: Corefile fails to generate. Use fallback corefile!
cont-init: info: /etc/cont-init.d/corefile.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun coredns (no readiness notification)
[WARNING] plugin/hosts: File does not exist: /config/hosts
.:53
.:5553
CoreDNS-1.8.7
linux/arm64, go1.22.2, a9adfd5-dirty
s6-rc: info: service legacy-services successfully started

hassio_multicast logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mdns (no readiness notification)
mdns-repeater (6): dev hassio addr 172.30.32.1 mask 255.255.254.0 net 172.30.32.0
s6-rc: info: service legacy-services successfully started

hassio_observer logs

2024/05/16 11:55:26 Start webserver on http://0.0.0.0:80

homeassistant logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
2024-05-16 13:59:31.011 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /supervisor/options request 0, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url=URL('http://172.30.32.2/supervisor/options')

@dusty-nv
Copy link
Owner

Wow, okay! This is awesome @ms1design ! Hopefully this makes things a lot easier for everyone 🙏

That docker run command 🤣

If making those /usr/share/hassio directories on the host is the only host-side changes required, that's not too bad at all. Or perhaps you were alluding to something bigger?

@ms1design
Copy link
Contributor Author

ms1design commented May 21, 2024

@dusty-nv, I’m rolling hard on this docker run command too 😂 it's a huge roll forward 🤣 especially when we realise how complicated it is to port all HA repositories and integrate them together.

I was trying to make it work with almost no changes to the host machine, which leaves us with one critical error regarding udev permissions, among many other warnings as shown in the previous screenshots.

These are not the best results from a user perspective. I’m tempted to extend the jetson-containers API to support installation and uninstallation scripts for host machines, which would essentially make the Dockerfile unnecessary for this container. We can tackle that with a little reorganisation:

  • Create a new repository for HA-supervisor install/uninstall scripts for the Jetson host machine, along with a registry for HA Jetson Add-ons (Wyoming or other).
  • CUDA-related containers will stay in the jetson-containers repository.

My ideal plan is for the user to issue just one command on the host machine, which will install HA Supervisor with all system dependencies and optionally the full Wyoming Voice Assistant pipeline from jetson-containers. This might take some time :)

@dusty-nv
Copy link
Owner

Sounds like a good plan @ms1design. Thank you for looking into this - that's okay if it takes time, I appreciate you wanting to go about it the right way that is easiest for users. My guess/hope is this will all come together nicely around the time we have the more advanced agents operating and hopefully the new AI API's defined by HA. I have been working with the NousResearch/Hermes-2-Pro-Llama-3-8B model for controller LLM and been getting some encouraging initial results from that, way better than what Llama3 could do for function calling.

Anyways, yea - your HA Supervisor repo could include jetson-containers as a submodule if that aids in the one-click/one-command scripted setup. Others in the group have been using jetson-containers as a submodule in their projects and that design seems to be working well for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants