VPS demo vs production home stack

How close the IONOS demo (_demo/) gets to the Raspberry Pi edge stack in dh40-software-and-hardware-architecture-master/wohnung/docker/.


URL mapping (production → demo)

Production serves HTTPS on the Pi hostname with separate ports. The demo uses one domain and Caddy path proxies (TLS at the edge).

Production (Pi) Demo (VPS)
https://<pi>:8080/homeid.txt https://<domain>/config/homeid.txt
https://<pi>:8080/config.json https://<domain>/config/config.json
https://<pi>:8087/ (Influx Flux) https://<domain>/influx/
mqtts://<pi>:8883 (tablet MQTT) wss://<domain>/mqtt
Mosquitto 1883 (sensors) Internal Docker only

Configured in _demo/config/demo-config.js at build time.


Component parity

Production Demo Notes
zwavejs2mqtt + Z-Wave USB mqtt-simulator No USB on VPS; simulator publishes the same zwavejs2mqtt/… topic tree + JSON shape
Mosquitto (1883 + 8883 WS/TLS) Mosquitto (1883 + 9001 WS) WS/TLS terminated by Caddy as wss://
Telegraf → Influx ✓ Same pipeline Topic list copied from mytelegraf.conf
InfluxDB 1.8 + Flux DB sensors; demo password (not production secret)
influxdb-proxy (nginx + CORS) Caddy /influx Same role
config-provider (nginx) Caddy /config homeid.txt, config.json, index.html
dh40-app → MQTT + Influx + config Button log → app/button_press; charts → Influx
Mosquitto → THD bridge (HiveMQ) Needs VPN, client certs, THD broker
OpenVPN / dh40-ca Not required for public demo
Chronograf Optional ops UI; not needed for tablet demo
rest2mqtt App uses MQTT directly in current code

Data path (what we replicate)

flowchart LR SIM[mqtt-simulator] MQ[Mosquitto] TG[Telegraf] INFL[InfluxDB] APP[dh40-app] LAB[laborvis] SIM -->|zwavejs2mqtt/…| MQ APP -->|app/button_*| MQ MQ --> TG --> INFL APP -->|Flux /influx| INFL APP -->|/config| CFG[config stubs] LAB -->|wss /mqtt| MQ

Demo-only differences (intentional)

Item Why
influx-seed 30 days of history so 7d/30d charts work without waiting
Chart downsampling in patch-security-chart.py MQTT every 3s would otherwise smear line charts
INFLUXDB_ADMIN_PASSWORD=demo Public server — not the Pi production password
DEMODEMO home ID Unlocks demo video week without study group
VOC chart unit patch Simulator values match display scale (see build script)

Getting closer (future, if needed)

  1. THD bridge — WireGuard/OpenVPN to THD + Mosquitto bridge config from mosquitto2mosquitto/config/mosquitto.conf (out of scope for public internet demo).
  2. Real Z-Wave — Edge device or lab Pi bridging MQTT to the VPS (replace simulator).
  3. Production Influx password — Only on private/LAN demos; requires volume reset.
  4. Chronograf — Add to compose on internal port for debugging.