Add heatpump compressor cycle analysis web app

Static page that plots Home Assistant on/off history of the heatpump
compressor with pan/zoom, per-phase hover durations and statistics
(min/max/mean/median, total on-time, duty cycle) for the visible range.
English/German UI. Served by nginx in Docker with basic auth, CSP and
a healthcheck; Plotly is vendored locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 10:21:07 +02:00
co-authored by Claude Opus 5.5
commit 77a594c3af
12 changed files with 704 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
# Creates nginx/.htpasswd for HTTP basic auth.
# Usage: ./set-password.sh <user> [password] (prompts for the password if omitted)
set -eu
user="${1:?usage: $0 <user> [password]}"
case "$user" in *:*) echo "user name must not contain ':'" >&2; exit 1 ;; esac
if [ $# -ge 2 ]; then
hash=$(openssl passwd -apr1 "$2")
else
hash=$(openssl passwd -apr1)
fi
file="$(dirname "$0")/nginx/.htpasswd"
[ -d "$file" ] && rmdir "$file" # docker creates a directory if the file was missing on first start
umask 077
printf '%s:%s\n' "$user" "$hash" > "$file"
chmod 644 "$file" # nginx workers must be able to read it
echo "Wrote $file for user '$user'. Run 'docker compose restart' if the container is already running."