docker-compose.yaml
Code : Tout sélectionner
version: '3.7'
services:
nginx:
image: nginx:latest
container_name: domoticz_proxy
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
restart: unless-stopped
extra_hosts:
- "host.docker.internal:192.168.1.XX"
nginx.conf
Code : Tout sélectionner
server {
listen 80;
server_name domoticzproxy.local;
location / {
proxy_pass http://host.docker.internal:8081/; # IP et port de Domoticz
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
location = /json {
return 301 /json.htm$is_args$args;
}
location /json.htm {
if ($args ~* "type=settings") { return 301 /json.htm?type=command¶m=getsettings; }
if ($args ~* "type=users") { return 301 /json.htm?type=command¶m=getusers; }
if ($args ~* "type=devices") { return 301 /json.htm?type=command¶m=getdevices; }
if ($args ~* "type=hardware") { return 301 /json.htm?type=command¶m=gethardware; }
if ($args ~* "type=notifications") { return 301 /json.htm?type=command¶m=getnotifications; }
if ($args ~* "type=createdevice") { return 301 /json.htm?type=command¶m=createdevice; }
if ($args ~* "type=scenes") { return 301 /json.htm?type=command¶m=getscenes; }
if ($args ~* "type=plans") { return 301 /json.htm?type=command¶m=getplans; }
if ($args ~* "type=scenelog") { return 301 /json.htm?type=command¶m=getscenelog; }
if ($args ~* "type=mobiles") { return 301 /json.htm?type=command¶m=getmobiles; }
if ($args ~* "type=cameras_user") { return 301 /json.htm?type=command¶m=getcameras_user; }
if ($args ~* "type=cameras") { return 301 /json.htm?type=command¶m=getcameras; }
if ($args ~* "type=schedules") { return 301 /json.htm?type=command¶m=getschedules; }
if ($args ~* "type=timers") { return 301 /json.htm?type=command¶m=gettimers; }
if ($args ~* "type=scenetimers") { return 301 /json.htm?type=command¶m=getscenetimers; }
if ($args ~* "type=setpointtimers") { return 301 /json.htm?type=command¶m=getsetpointtimers; }
if ($args ~* "type=floorplans") { return 301 /json.htm?type=command¶m=getfloorplans; }
if ($args ~* "type=lightlog") { return 301 /json.htm?type=command¶m=getlightlog; }
if ($args ~* "type=textlog") { return 301 /json.htm?type=command¶m=gettextlog; }
if ($args ~* "type=setused") { return 301 /json.htm?type=command¶m=setused; }
if ($args ~* "type=graph") { return 301 /json.htm?type=command¶m=graph; }
if ($args ~* "type=events") { return 301 /json.htm?type=command¶m=events&evparam=$arg_evparam; }
proxy_pass http://192.168.1.45:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Code : Tout sélectionner
docker compose up -d
Sinon mon expérience du passage à 2025.2 (j'étais en 2025.1 avec zwave js ui déjà) sur Raspberry Pi 3 Model B Rev 1.2
Je suis reparti from scratch sur une nouvelle carte SD j'y ai installé Rapberry OS Trixie minimal (sans desktop) en 64 bit
Une fois OS installé j'ai fait :
sudo apt-get update
Code : Tout sélectionner
sudo bash -c "$(curl -sSfL https://install.domoticz.com)"
sudo apt install docker.io
sudo apt-get install mosquitto
sudo apt install docker-composePour les package python, on ne peut plus installer directement via pip. Il faut passer par un venv.
J'ai crée en répertoire :
Puis j'installe les dépendances comme ceci :~/Domoticz_Python_Environment
Code : Tout sélectionner
pip3 install cryptography==3.4.8 requests==2.23.0 charset-normalizer==3.0.1 tinytuya -U -t ~/Domoticz_Python_EnvironmentCode : Tout sélectionner
export PYTHONPATH=$HOME/Domoticz_Python_Environment:$PYTHONPATH