Compare commits

...

4 Commits

Author SHA1 Message Date
tteckster 53e5964633
Update changedetection-install.sh
add libasound2
fixes https://github.com/tteck/Proxmox/issues/1535
2023-06-23 13:34:16 -04:00
tteckster dfb79fbc4e
Update esphome.sh
default Debian 12
2023-06-23 13:20:55 -04:00
tteckster 4651827151
Update esphome-install.sh
install esphome in a python virtual environment
2023-06-23 13:17:03 -04:00
tteckster 22b77fdb76
Update esphome.sh
update the installation of either standard or venv
2023-06-23 13:12:18 -04:00
3 changed files with 18 additions and 7 deletions

View File

@ -23,7 +23,7 @@ var_disk="4"
var_cpu="2"
var_ram="1024"
var_os="debian"
var_version="11"
var_version="12"
variables
color
catch_errors
@ -52,13 +52,16 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -f /usr/local/bin/esphome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Stopping ESPHome"
systemctl stop esphomeDashboard
msg_ok "Stopped ESPHome"
msg_info "Updating ESPHome"
pip3 install esphome --upgrade &>/dev/null
if [[ -d /srv/esphome ]]; then
source /srv/esphome/bin/activate &>/dev/null
fi
pip3 install -U esphome &>/dev/null
msg_ok "Updated ESPHome"
msg_info "Starting ESPHome"

View File

@ -23,6 +23,7 @@ $STD apt-get install -y \
dumb-init \
gconf-service \
libatk-bridge2.0-0 \
libasound2 \
libatk1.0-0 \
libcairo2 \
libcups2 \

View File

@ -30,20 +30,27 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Updated Python3"
msg_info "Installing ESPHome"
mkdir /srv/esphome
cd /srv/esphome
python3 -m venv .
source bin/activate
$STD pip install esphome tornado esptool
msg_ok "Installed ESPHome"
msg_info "Creating Service"
service_path="/etc/systemd/system/esphomeDashboard.service"
echo "[Unit]
cat <<EOF >/etc/systemd/system/esphomeDashboard.service
[Unit]
Description=ESPHome Dashboard
After=network.target
[Service]
ExecStart=/usr/local/bin/esphome dashboard /root/config/
ExecStart=/srv/esphome/bin/esphome dashboard /root/config/
Restart=always
User=root
[Install]
WantedBy=multi-user.target" >$service_path
WantedBy=multi-user.target
EOF
systemctl enable -q --now esphomeDashboard.service
msg_ok "Created Service"