lundi 27 novembre 2023

Orange PI 5 + Domoticz + rtl_433

Compile dev_domoticz from sources :

https://www.domoticz.com/wiki/Build_Domoticz_from_source


Install rtl_433 :

sudo apt-get install rtl-433

sudo rtl_433


Using systemd service:


sudo nano /etc/systemd/system/domoticz.service



[Unit]

      Description=domoticz_service

      After=network-online.target

[Service]

#      User=dietpi

#      Group=dietpi

#      PermissionsStartOnly=true

      WorkingDirectory=/home/pi5/dev-domoticz

      PIDFILE=/var/run/domoticz/domoticz.pid

      ExecStartPre=-/usr/bin/killall -q rtl_433

#      ExecStartPre=/usr/bin/install -d -m 0700 -o pi5 -g PI5 /var/run/domoticz

      ExecStartPre=setcap 'cap_net_bind_service=+ep' /home/pi5/dev-domoticz/domoticz

      ExecStart=/home/pi5/dev-domoticz/domoticz -www 80 -sslwww 443 -pidfile /var/run/domoticz/domoticz.pid

      Restart=on-failure

      RestartSec=1m

      #StandardOutput=null

[Install]

      WantedBy=multi-user.target


sudo systemctl enable domoticz

sudo systemctl daemon-reload

sudo systemctl restart domoticz

sudo service domoticz status


● domoticz.service - domoticz_service

     Loaded: loaded (/etc/systemd/system/domoticz.service; enabled; vendor preset: enabled)

     Active: active (running) since Mon 2023-11-27 09:49:56 CET; 3h 26min ago

    Process: 64410 ExecStartPre=/usr/bin/killall -q rtl_433 (code=exited, status=1/FAILURE)

    Process: 64411 ExecStartPre=setcap cap_net_bind_service=+ep /home/pi5/dev-domoticz/domoticz (code=exited, status=0/SUC>

   Main PID: 64412 (domoticz)

      Tasks: 27 (limit: 4149)

     Memory: 27.4M

        CPU: 25min 18.524s

     CGroup: /system.slice/domoticz.service

             ├─64412 /home/pi5/dev-domoticz/domoticz -www 80 -sslwww 443 -pidfile /var/run/domoticz/domoticz.pid

             ├─64440 sh -c "rtl_433 -F json -M newmodel -C si -M level  2>/dev/null"

             └─64441 rtl_433 -F json -M newmodel -C si -M level


Aucun commentaire:

Enregistrer un commentaire