Compare commits

...

11 Commits

Author SHA1 Message Date
CanbiZ
f9b37d754b
fix namings & msgs 2025-01-08 17:45:55 +01:00
CanbiZ
b5c5bcf820
Update homeassistant-core-install.sh 2025-01-08 17:39:39 +01:00
CanbiZ
fb260ae467
Update homeassistant-core-install.sh 2025-01-08 17:27:17 +01:00
CanbiZ
344e3a9f8b
Update homeassistant-core-install.sh 2025-01-08 17:06:49 +01:00
CanbiZ
0636e48803
Update homeassistant-core-install.sh 2025-01-08 17:03:01 +01:00
CanbiZ
7e93e5ee36
Update homeassistant-core-install.sh 2025-01-08 16:51:06 +01:00
CanbiZ
a4c62bba72
Update homeassistant-core-install.sh 2025-01-08 16:39:55 +01:00
CanbiZ
68f8c1e016
Update homeassistant-core-install.sh 2025-01-08 16:33:14 +01:00
CanbiZ
ef0a204395
Update install.func 2025-01-08 16:18:35 +01:00
CanbiZ
5815a706c9
Update homeassistant-core-install.sh 2025-01-08 16:09:45 +01:00
CanbiZ
1227605444
Update homeassistant-core.sh 2025-01-08 16:09:05 +01:00
3 changed files with 57 additions and 32 deletions

View File

@ -9,10 +9,10 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/d
APP="Home Assistant-Core"
var_tags="automation;smarthome"
var_cpu="2"
var_ram="1024"
var_disk="8"
var_ram="2048"
var_disk="10"
var_os="ubuntu"
var_version="24.04"
var_version="24.10"
var_unprivileged="1"
# App Output & Base Settings
@ -51,7 +51,7 @@ function update_script() {
echo -e "${GN}Updating to Stable Version${CL}"
BR=""
fi
if [[ "$PY" == "python3.11" ]]; then echo -e "⚠️ Home Assistant will soon require Python 3.12."; fi
if [[ "$PY" == "python3.11" ]]; then echo -e "⚠️ Home Assistant will soon require Python 3.13."; fi
msg_info "Stopping Home Assistant"
systemctl stop homeassistant
@ -128,4 +128,4 @@ 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}:8132${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8132${CL}"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@ -14,24 +14,66 @@ network_check
update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y git curl sudo mc bluez 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 pip python3.12-dev
$STD apt-get install -y \
curl \
git \
sudo \
mc \
gnupg \
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"
msg_info "Installing UV"
$STD pip install uv
msg_ok "Installed UV"
msg_info "Setup Python3/pip"
$STD apt-get update
$STD rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
$STD apt-get remove --purge -y python3.12 python3.12-dev python3.12-venv
$STD apt-get install -y \
python3.13 \
python3-pip \
python3.13-dev \
python3.13-venv
ln -sf /usr/bin/python3.13 /usr/bin/python3
msg_ok "Setup Python3"
msg_info "Setting up Home Assistant-Core environment"
mkdir /srv/homeassistant
cd /srv/homeassistant
uv venv . &>/dev/null
python3 -m venv .
source bin/activate
msg_ok "Created virtual environment with UV"
msg_ok "Created virtual environment"
msg_info "Installing Home Assistant-Core and packages"
$STD uv pip install webrtcvad wheel homeassistant mysqlclient psycopg2-binary isal
msg_info "Installing Home Assistant-Core"
$STD python3 -m pip install webrtcvad wheel homeassistant mysqlclient psycopg2-binary isal
mkdir -p /root/.homeassistant
msg_ok "Installed Home Assistant-Core and required packages"
msg_ok "Installed Home Assistant-Core"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/homeassistant.service

View File

@ -202,23 +202,6 @@ EOF
msg_ok "Updated Container OS"
}
# This function modifies the message of the day (motd) and SSH settings
motd_ssh() {
# Set terminal to 256-color mode
grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >> /root/.bashrc
# Get the current private IP address
IP=$(hostname -I | awk '{print $1}') # Private IP
# Get OS information (Debian / Ubuntu)
if [ -f "/etc/os-release" ]; then
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
elif [ -f "/etc/debian_version" ]; then
OS_NAME="Debian"
OS_VERSION=$(cat /etc/debian_version)
fi
# This function modifies the message of the day (motd) and SSH settings
motd_ssh() {
# Set terminal to 256-color mode