Système domotique résidentiel basé sur Domoticz et une série de bridges Node.js, déployé sur Raspberry Pi via Docker.
https://domatique.freeboxos.fr:38243/
│ (DNS Free → IP publique)
┌───────▼──────────────────────────────────────────────────┐
│ Freebox (routeur FAI) │
│ NAT : port 38243 (public) → 8243 (Raspberry Pi LAN) │
└───────────────────────┬──────────────────────────────────┘
│ HTTPS :8243
┌─────────────────────────────────────────────────────────┐
│ Externe : HTTPS :8243 Local : HTTP :8280 │
│ httpd-proxy (Apache 2.4) │
│ TLS termination CORS + accès libre │
│ Auth déléguée Domoticz Proxy HTTP │
└───────────────────────┬─────────────────────────────────┘
│ ProxyPass
┌─────────────────▼──────────────────────────────┐
│ Domoticz │
│ (moteur central d'automatisation) │
│ scripts dzVents (Lua) ←→ BDD SQLite │
│ :8080 (HTTP interne) :8443 (HTTPS interne) │
└──────────────┬──────────────────┬──────────────┘
│ │
┌───────────────▼──────┐ ┌───────▼─────────────────┐
│ tydom-bridge │ │ domoticz-ext-bridge │
│ (Node.js 22) │ │ (Node.js) │
│ port 9001 / 9101 │ │ port 80 │
└──────────┬───────────┘ └─────────────────────────┘
│
┌──────────▼───────────┐
│ Box Tydom │
│ (Delta Dore) │
│ volets + chauffage │
└──────────────────────┘
┌──────────────────────┐
│ deCONZ │
│ (passerelle Zigbee) │
│ port 9102 / 9143 │
└──────────┬───────────┘
│ plugin Domoticz-deCONZ
┌──────────▼───────────┐
│ Domoticz │
│ (capteurs Zigbee) │
└──────────────────────┘
| Chemin | URL / Port exposé | Protocole | Filtrage | Cible |
|---|---|---|---|---|
| Accès externe public | https://domatique.freeboxos.fr:38243/ → Pi :8243 |
HTTPS (TLS terminé par Apache) | Auth déléguée à Domoticz | Domoticz :8443 |
| Accès local LAN | :8280 |
HTTP | Aucun (Require all granted) + CORS * |
Domoticz :8080 |
| Direct interne | :8080 |
HTTP | Réseau Docker uniquement | — |
| Direct interne TLS | :8443 |
HTTPS | Réseau Docker uniquement | — |
Le proxy httpd est le seul point d'entrée depuis l'extérieur. Il assure :
- la terminaison TLS avec un certificat auto-signé embarqué dans l'image Docker, aligné sur
domatique.freeboxos.fr(CN/SAN), - la transmission transparente vers Domoticz — l'authentification est déléguée à Domoticz (login natif),
- la réécriture des headers CORS sur le VirtualHost local (
:8280).
Le routeur Freebox assure le NAT : le port public 38243 est redirigé vers le port 8243 du Raspberry Pi sur le LAN.
Voir
_docker/build_httpd/README.mdpour le détail de la configuration Apache.
| Composant | Rôle | Technologie |
|---|---|---|
domoticz/ |
Moteur d'automatisation + scripts Lua dzVents | Domoticz + dzVents |
tydom-bridge/ |
Pont Domoticz ↔ box Tydom (Delta Dore) — volets et thermostat | Node.js 22 |
domoticz-ext-bridge/ |
Proxy REST vers l'API JSON de Domoticz (CORS, TLS) | Node.js |
deCONZ/ |
Intégration des capteurs Zigbee via passerelle deCONZ | deCONZ (Phoscon) |
_docker/build_httpd/ |
Proxy Apache frontal : TLS, filtrage User-Agent, deux VirtualHosts | Apache 2.4 (Alpine) |
_docker/ |
Images Docker custom et manifests de déploiement | Docker Compose |
- Docker et Docker Compose (déploiement recommandé sur Raspberry Pi)
- Node.js ≥ 20 (pour tydom-bridge —
tydom-client@0.15.xutilisefetchnatif) - Architecture ARM (Raspberry Pi) ou amd64 selon les images utilisées
# Cloner le dépôt
git clone https://github.com/vzwingma/domotique.git
cd domotique/_docker
# Éditer domotique-compose.yml et renseigner les variables d'environnement :
# MAC, PASSWD, AUTHAPI, PASSWDAPI pour le bridge Tydom
# Démarrer la stack complète
docker compose -f domotique-compose.yml up -dWatchtower est intégré à la stack : il surveille et met à jour automatiquement les images toutes les 60 secondes.
Lien vers le wiki : https://github.com/vzwingma/domotique/wiki/