
Disable the Wifi Access Point service
systemctl disable hostapd
Disbale DUSUN Web server
systemctl disable lighttpd
Disable the start of all DUSUN softwares
systemctl disable rc-local
mv /etc/rc.local /etc/rc.local-dusun-disabled
Remove unnecessary users
userdel admin
userdel gnats
userdel games
In this example, I wanted to change hostname ‘DUSUN’ into ‘dusun-pipiche’
hostnamectl set-hostname dusun-pipiche
echo "127.0.0.1 dusun-pipiche" >> /etc/hosts
edit the file /etc/config/system with the command vi /etc/config/systemand modify option hostname ‘dusun-pipiche’
Then reboot the system with the command
reboot
Create the necessary folders
mkdir /opt/domoticz
cd /opt/domoticz
mkdir userdata
mkdir /opt/domoticz/Domoticz_Python_Environment
Create a docker compose file
cat > docker-compose.yml
version: "3.3"
services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
devices:
- "/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0:/dev/ttyUSB-zigbee"
ports:
- "8080:8080"
- "9440:9440"
volumes:
- ./userdata:/opt/domoticz/userdata
- ./Domoticz_Python_Environment:/opt/domoticz/Domoticz_Python_Environment
logging:
driver: "journald"
environment:
- TZ=Europe/Paris
- PYTHONPATH=/opt/domoticz/Domoticz_Python_Environment:$PYTHONPATH
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
Download the domoticz container
docker pull domoticz/domoticz
Install the Zigbee for Domoticz plugin
cd userdata
mkdir plugins
git clone https://github.com/zigbeefordomoticz/Domoticz-Zigbee.git
Put in place the customstart so, it will load all python3 modules for the Zigbee4Domoticz plugin
cd /opt/domoticz/userdata
ln -s /opt/domoticz/userdata/plugins/Domoticz-Zigbee/Tools/customstart.sh customstart.sh
cd /opt/domoticz
docker-compose up -d