diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh deleted file mode 100644 index 33a1d1ea2..000000000 --- a/ct/homeassistant-core.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.home-assistant.io/ - -APP="Home Assistant-Core" -var_tags="${var_tags:-automation;smarthome}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-10}" -var_os="${var_os:-ubuntu}" -var_version="${var_version:-24.10}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - if ! lsb_release -d | grep -q "Ubuntu 24.10"; then - msg_error "Wrong OS detected. This script only supports Ubuntu 24.10." - msg_error "Read Guide: https://github.com/community-scripts/ProxmoxVE/discussions/1549" - exit 1 - fi - check_container_storage - check_container_resources - if [[ ! -d /srv/homeassistant ]]; then - msg_error "No ${APP} Installation Found!" - exit 1 - fi - setup_uv - IP=$(hostname -I | awk '{print $1}') - UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ - "1" "Update Core" ON \ - "2" "Install HACS" OFF \ - "3" "Install FileBrowser" OFF \ - 3>&1 1>&2 2>&3) - - if [ "$UPD" == "1" ]; then - if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then - clear - header_info - echo -e "${GN}Updating to Beta Version${CL}" - BR="--pre" - else - clear - header_info - echo -e "${GN}Updating to Stable Version${CL}" - BR="" - fi - - msg_info "Stopping Home Assistant" - systemctl stop homeassistant - msg_ok "Stopped Home Assistant" - - if [[ -d /srv/homeassistant/bin ]]; then - msg_info "Migrating to .venv-based structure" - $STD source /srv/homeassistant/bin/activate - PY_VER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") - $STD deactivate - mv /srv/homeassistant "/srv/homeassistant_backup_$PY_VER" - mkdir -p /srv/homeassistant - cd /srv/homeassistant - - $STD uv python install 3.13 - UV_PYTHON=$(uv python list | awk '/3\.13\.[0-9]+.*\/root\/.local/ {print $2; exit}') - if [[ -z "$UV_PYTHON" ]]; then - msg_error "No local Python 3.13 found via uv" - exit 1 - fi - - $STD uv venv .venv --python "$UV_PYTHON" - $STD source .venv/bin/activate - $STD uv pip install homeassistant mysqlclient psycopg2-binary isal webrtcvad wheel - mkdir -p /root/.homeassistant - msg_ok "Migration complete" - else - source /srv/homeassistant/.venv/bin/activate - fi - - msg_info "Updating Home Assistant" - $STD uv pip install $BR --upgrade homeassistant - msg_ok "Updated Home Assistant" - - msg_info "Starting Home Assistant" - if [[ -f /etc/systemd/system/homeassistant.service ]] && grep -q "/srv/homeassistant/bin/python3" /etc/systemd/system/homeassistant.service; then - sed -i 's|ExecStart=/srv/homeassistant/bin/python3|ExecStart=/srv/homeassistant/.venv/bin/python3|' /etc/systemd/system/homeassistant.service - sed -i 's|PATH=/srv/homeassistant/bin|PATH=/srv/homeassistant/.venv/bin|' /etc/systemd/system/homeassistant.service - $STD systemctl daemon-reload - fi - - systemctl start homeassistant - sleep 5 - msg_ok "Started Home Assistant" - msg_ok "Update Successful" - echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}" - exit - fi - - if [ "$UPD" == "2" ]; then - msg_info "Installing Home Assistant Community Store (HACS)" - $STD apt update - cd /root/.homeassistant - $STD bash <(curl -fsSL https://get.hacs.xyz) - msg_ok "Installed Home Assistant Community Store (HACS)" - echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" - exit - fi - - if [ "$UPD" == "3" ]; then - set +Eeuo pipefail - read -r -p "${TAB3}Would you like to use No Authentication? " prompt - msg_info "Installing FileBrowser" - RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') - $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin - - if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - $STD filebrowser config init -a '0.0.0.0' - $STD filebrowser config set -a '0.0.0.0' - $STD filebrowser config set --auth.method=noauth - $STD filebrowser users add ID 1 --perm.admin - else - $STD filebrowser config init -a '0.0.0.0' - $STD filebrowser config set -a '0.0.0.0' - $STD filebrowser users add admin helper-scripts.com --perm.admin - fi - msg_ok "Installed FileBrowser" - - msg_info "Creating Service" - cat </etc/systemd/system/filebrowser.service -[Unit] -Description=Filebrowser -After=network-online.target - -[Service] -User=root -WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant - -[Install] -WantedBy=default.target -EOF - - systemctl enable --now -q filebrowser.service - msg_ok "Created Service" - - msg_ok "Completed Successfully!\n" - echo -e "FileBrowser should be reachable by going to the following URL. - ${BL}http://$IP:8080${CL} admin|helper-scripts.com\n" - exit - fi -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8123${CL}" diff --git a/frontend/public/json/homeassistant-core.json b/frontend/public/json/homeassistant-core.json deleted file mode 100644 index 0f1e24ca5..000000000 --- a/frontend/public/json/homeassistant-core.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Home Assistant Core", - "slug": "homeassistant-core", - "categories": [ - 16 - ], - "date_created": "2025-01-17", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8123, - "documentation": "https://www.home-assistant.io/docs/", - "website": "https://www.home-assistant.io/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/home-assistant.webp", - "config_path": "/root/.homeassistant", - "description": "A standalone installation of Home Assistant Core refers to a setup where the Home Assistant Core software is installed directly on a device or operating system, without the use of Docker containers. This provides a simpler, but less flexible and scalable solution, as the software is tightly coupled with the underlying system.", - "install_methods": [ - { - "type": "default", - "script": "ct/homeassistant-core.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 10, - "os": "ubuntu", - "version": "24.10" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.", - "type": "warning" - }, - { - "text": "Requires PVE 8.2.2 with kernel 6.8.4-3-pve or newer", - "type": "warning" - }, - { - "text": "Deprecation-Warning: This Core-based setup will be deprecated by August 2025. Use Home Assistant OS is strongly recommended to ensure long-term stability and updates.", - "type": "warning" - }, - { - "text": "config path: `/root/.homeassistant`", - "type": "info" - } - ] -} diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh deleted file mode 100644 index 2659509df..000000000 --- a/install/homeassistant-core-install.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.home-assistant.io/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y \ - git \ - ca-certificates \ - bluez \ - libtiff6 \ - tzdata \ - libffi-dev \ - libssl-dev \ - libjpeg-dev \ - zlib1g-dev \ - autoconf \ - build-essential \ - libopenjp2-7 \ - libturbojpeg0-dev \ - ffmpeg \ - liblapack3 \ - liblapack-dev \ - dbus-broker \ - libpcap-dev \ - libavdevice-dev \ - libavformat-dev \ - libavcodec-dev \ - libavutil-dev \ - libavfilter-dev \ - libmariadb-dev-compat \ - libatlas-base-dev \ - software-properties-common \ - libmariadb-dev \ - pkg-config -msg_ok "Installed Dependencies" - -setup_uv -msg_info "Setup Python3" -$STD apt-get install -y \ - python3.13 \ - python3.13-dev \ - python3.13-venv -msg_ok "Setup Python3" - -msg_info "Preparing Python 3.13 for uv" -$STD uv python install 3.13 -UV_PYTHON=$(uv python list | awk '/3\.13\.[0-9]+.*\/root\/.local/ {print $2; exit}') -if [[ -z "$UV_PYTHON" ]]; then - msg_error "No local Python 3.13 found via uv" - exit 1 -fi -msg_ok "Prepared Python 3.13" - -msg_info "Setting up Home Assistant-Core environment" -rm -rf /srv/homeassistant -mkdir -p /srv/homeassistant -cd /srv/homeassistant -$STD uv venv .venv --python "$UV_PYTHON" -source .venv/bin/activate -msg_ok "Created virtual environment" - -msg_info "Installing Home Assistant-Core" -$STD uv pip install homeassistant mysqlclient psycopg2-binary isal webrtcvad wheel -mkdir -p /root/.homeassistant -msg_ok "Installed Home Assistant-Core" - -msg_info "Creating Service" -cat </etc/systemd/system/homeassistant.service -[Unit] -Description=Home Assistant -After=network-online.target - -[Service] -Type=simple -WorkingDirectory=/root/.homeassistant -Environment="PATH=/srv/homeassistant/.venv/bin:/usr/local/bin:/usr/bin" -ExecStart=/srv/homeassistant/.venv/bin/python3 -m homeassistant --config /root/.homeassistant -Restart=always -RestartForceExitStatus=100 - -[Install] -WantedBy=multi-user.target -EOF - -systemctl enable -q --now homeassistant -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned"