Re: Oficial Docker Container
Posted: Saturday 13 March 2021 11:52
P.S. The dzVents scripts could I only get running by making a symlink of "JSON.lua" because on my Synology there was only 'json.lua' present.
Your <domoticz dir>/scripts/lua
Code: Select all
total 104
drwxr-xr-x 3 root root 4096 Feb 27 00:56 .
drwxr-xr-x 8 root root 4096 Feb 27 00:56 ..
-rw-r--r-- 1 root root 59895 Feb 27 00:56 JSON.lua
-rw-r--r-- 1 root root 1870 Feb 27 00:56 script_device_demo.lua
-rw-r--r-- 1 root root 1932 Feb 27 00:56 script_time_demo.lua
-rw-r--r-- 1 root root 5968 Feb 27 00:56 xml2lua.lua
drwxr-xr-x 2 root root 4096 Feb 27 00:56 xmlhandler
-rw-r--r-- 1 root root 12387 Feb 27 00:56 XmlParser.lua
Code: Select all
- ./config/plugins:/opt/domoticz/userdata/plugins
- ./config/scripts:/opt/domoticz/userdata/scripts
This doesn't work for me.
Code: Select all
- ./config/plugins:/opt/domoticz/userdata/plugins
- ./config/scripts:/opt/domoticz/userdata/scripts
Hi Walter,waltervl wrote: ↑Wednesday 17 March 2021 20:59 @YOYO did you also try the solution of @EddyG ?Code: Select all
- ./config/plugins:/opt/domoticz/userdata/plugins - ./config/scripts:/opt/domoticz/userdata/scripts
Code: Select all
/sharedfolders/Dockerdrive/Domoticz:/opt/domoticz/userdata
Code: Select all
2021-04-04 11:39:38.233 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Tvstraat.lua
2021-04-04 11:39:38.234 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Sensor_Voordeur.lua
2021-04-04 11:39:38.234 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Garage.lua
2021-04-04 11:39:38.234 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Living.lua
2021-04-04 11:39:38.234 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Wc.lua
2021-04-04 11:39:38.234 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Boven.lua
2021-04-04 11:39:38.235 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Gang.lua
2021-04-04 11:39:38.235 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Keuken.lua
2021-04-04 11:39:38.235 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Trap.lua
2021-04-04 11:39:38.235 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/wisssl_living.lua
2021-04-04 11:39:38.234 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Tvstraat.lua
2021-04-04 11:39:38.234 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Sensor_Voordeur.lua
2021-04-04 11:39:38.234 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Garage.lua
2021-04-04 11:39:38.234 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Living.lua
2021-04-04 11:39:38.234 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Wc.lua
2021-04-04 11:39:38.234 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Boven.lua
2021-04-04 11:39:38.235 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Gang.lua
2021-04-04 11:39:38.235 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Keuken.lua
2021-04-04 11:39:38.235 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Trap.lua
2021-04-04 11:39:38.235 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/wisssl_living.lua
Code: Select all
version: '3.3'
services:
domoticz:
image: domoticz/domoticz
container_name: domoticz
restart: unless-stopped
# Pass devices to container
devices:
- /dev/ttyACM0:/dev/ttyACMO
- /dev/ttyACM1:/dev/ttyACM1
# - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
ports:
- "8086:8080"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Brussels
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
Code: Select all
drwxr-xr-x 3 gianni gianni 4096 Apr 4 10:31 .
drwxr-xr-x 3 gianni gianni 4096 Apr 4 10:28 ..
-rw-r--r-- 1 root root 236 Apr 4 10:30 domocookie.txt
-rw-r--r-- 1 root root 1019904 Apr 4 10:45 domoticz.db
-rw-r--r-- 1 root root 32768 Apr 4 10:46 domoticz.db-shm
-rw-r--r-- 1 root root 1503832 Apr 4 10:46 domoticz.db-wal
-rw-r--r-- 1 root root 568497 Apr 4 10:44 ozwcache_0xfacac939.xml
-rw-r--r-- 1 root root 7003 Apr 4 10:44 OZW_Log.txt
drwxr-xr-x 2 root root 4096 Apr 4 10:29 plugins
Code: Select all
drwxr-xr-x 3 gianni gianni 4096 Apr 4 11:16 .
drwxr-xr-x 4 gianni gianni 4096 Apr 4 11:13 ..
-rw-r--r-- 1 gianni gianni 978944 Apr 4 11:16 domoticz.db
-rw-r--r-- 1 gianni gianni 32768 Apr 4 11:18 domoticz.db-shm
-rw-r--r-- 1 gianni gianni 74192 Apr 4 11:18 domoticz.db-wal
-rw-r--r-- 1 gianni gianni 12436 Apr 4 11:17 ozwcache_0xfacac939.xml
-rw-r--r-- 1 gianni gianni 1923 Apr 4 11:17 OZW_Log.txt
drwxr-xr-x 2 gianni gianni 4096 Apr 4 11:13 plugins
-rw-r--r-- 1 root root 108 Apr 4 11:16 zwscene.xml
Code: Select all
2021-04-04 12:16:52.971 Sunrise: 07:16:00 SunSet: 20:25:00
2021-04-04 12:16:52.971 Day length: 13:09:00 Sun at south: 13:50:00
2021-04-04 12:16:52.971 Civil twilight start: 06:42:00 Civil twilight end: 20:58:00
2021-04-04 12:16:52.971 Nautical twilight start: 06:01:00 Nautical twilight end: 21:39:00
2021-04-04 12:16:52.971 Astronomical twilight start: 05:17:00 Astronomical twilight end: 22:23:00
2021-04-04 12:16:52.959 Status: Domoticz V2020.2 (build 13133) (c)2012-2021 GizMoCuz
2021-04-04 12:16:52.959 Status: Build Hash: 399b22fa4, Date: 2021-03-30 14:57:44
2021-04-04 12:16:52.959 Status: Startup Path: /opt/domoticz/
2021-04-04 12:16:53.010 Active notification Subsystems: (0/13)
2021-04-04 12:16:53.021 Starting shared server on: 0.0.0.0:6144
2021-04-04 12:16:53.006 Status: PluginSystem: Started, Python version '3.7.3'.
2021-04-04 12:16:53.012 Status: WebServer(HTTP) started on address: 0.0.0.0 with port 8080
2021-04-04 12:16:53.019 Status: WebServer(SSL) started on address: 0.0.0.0 with port 443
2021-04-04 12:16:53.021 Status: TCPServer: shared server started...
2021-04-04 12:16:53.022 Status: RxQueue: queue worker started...
2021-04-04 12:16:53.841 Status: Incoming connection from: 10.10.20.243
2021-04-04 12:16:53.007 Error: SBFSpot: Could not open configuration file!
2021-04-04 12:16:53.839 Error: CheckAuthToken(ec3d0d15b3f83e7ee830eb9f14336753_MzYxM2Y5OWUtOWZhNy00M2MyLTkyODUtOTFlODNmNGNjZTFj) : session id not found
2021-04-04 12:16:55.023 Status: SBFSpot: Worker started...
2021-04-04 12:16:55.024 Status: NotificationSystem: thread started...
2021-04-04 12:16:55.024 Status: EventSystem: reset all events...
2021-04-04 12:16:55.025 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Tvstraat.lua
2021-04-04 12:16:55.025 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Sensor_Voordeur.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Garage.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Living.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Wc.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Boven.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Gang.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Keuken.lua
2021-04-04 12:16:55.026 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Living.lua
2021-04-04 12:16:55.027 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Trap.lua
2021-04-04 12:16:55.027 Status: EventSystem: reset all device statuses...
2021-04-04 12:16:55.116 Status: Python EventSystem: Initalizing event module.
2021-04-04 12:16:55.116 Status: EventSystem: Started
2021-04-04 12:16:55.117 Status: EventSystem: Queue thread started...
2021-04-04 12:16:55.224 Status: RFLink: Using serial port: /dev/ttyACM1
2021-04-04 12:16:55.522 Status: OpenZWave: using config in: /opt/domoticz/Config/
2021-04-04 12:16:55.545 Status: OpenZWave: Starting...
2021-04-04 12:16:55.545 Status: OpenZWave: Version: 1.6-1911-gc6a420ef
2021-04-04 12:16:55.023 Error: SBFSpot: Could not open configuration file!
2021-04-04 12:16:55.025 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Tvstraat.lua
2021-04-04 12:16:55.025 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Sensor_Voordeur.lua
2021-04-04 12:16:55.026 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Garage.lua
2021-04-04 12:16:55.026 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Alles_Uit_Living.lua
2021-04-04 12:16:55.026 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Wc.lua
2021-04-04 12:16:55.026 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Motion_Boven.lua
2021-04-04 12:16:55.026 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Gang.lua
2021-04-04 12:16:55.026 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Keuken.lua
2021-04-04 12:16:55.027 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Living.lua
2021-04-04 12:16:55.027 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Wissel_Trap.lua
2021-04-04 12:16:56.144 Status: RFLink: Controller Initialized!...
2021-04-04 12:16:56.251 Status: RFLink Detected, Version: 1.1 Revision: 48 Build: 4
2021-04-04 12:16:56.423 Status: OpenZWave: A DNS Error Occurred
2021-04-04 12:16:56.423 Status: OpenZWave: ManufacturerSpecificDB Ready
2021-04-04 12:16:56.023 Error: SBFSpot: Data path empty!
2021-04-04 12:16:57.610 OpenZWave: Value_Added: Node: 20 (0x14), CommandClass: SWITCH BINARY, Label: Switch, Instance: 1, Index: 0
2021-04-04 12:16:57.607 Status: OpenZWave: Driver Ready
2021-04-04 12:16:57.610 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 2 (0x02)
2021-04-04 12:16:57.611 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 3 (0x03)
2021-04-04 12:16:57.611 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 4 (0x04)
2021-04-04 12:16:57.612 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 5 (0x05)
2021-04-04 12:16:57.612 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 6 (0x06)
2021-04-04 12:16:57.613 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 7 (0x07)
2021-04-04 12:16:57.613 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 8 (0x08)
2021-04-04 12:16:57.614 Status: OpenZWave: New Node added. HomeID: 4207593785, NodeID: 9 (0x09)
Code: Select all
gianni@raspberrypi:/mnt/data/domoticz/userdata $ docker exec -it domoticz /bin/bash
root@545adcf36101:/opt/domoticz# ls -la
total 24904
drwxrwxrwx 1 1001 1001 4096 Apr 4 12:42 .
drwxrwxrwx 1 1001 1001 4096 Mar 31 08:57 ..
drwxrwxrwx 121 1001 1001 4096 Mar 11 08:55 Config
-rwxrwxrwx 1 1001 1001 102633 Mar 24 17:18 History.txt
-rwxrwxrwx 1 1001 1001 35147 Nov 9 13:47 License.txt
-rw------- 1 root root 112689152 Apr 4 12:42 core
-rwxrwxrwx 1 1001 1001 14421880 Mar 31 08:08 domoticz
-rwxrwxrwx 1 1001 1001 4433 Nov 9 13:47 domoticz.sh
-rw------- 1 root root 0 Apr 4 12:42 domoticz_crash.log
drwxrwxrwx 4 1001 1001 4096 Nov 9 13:47 dzVents
drwxrwxrwx 4 1001 1001 4096 Nov 9 13:47 plugins
drwxrwxrwx 8 1001 1001 4096 Nov 9 13:47 scripts
-rwxrwxrwx 1 1001 1001 3414 Nov 9 13:47 server_cert.pem
-rwxrwxrwx 1 1001 1001 779 Nov 29 11:09 updatebeta
-rwxrwxrwx 1 1001 1001 799 Nov 29 11:09 updaterelease
drwxrwxrwx 3 1001 1001 4096 Apr 4 12:42 userdata
drwxrwxrwx 13 1001 1001 4096 Feb 19 08:48 www
root@545adcf36101:/opt/domoticz# cd userdata
root@545adcf36101:/opt/domoticz/userdata# ls -la
total 2036
drwxrwxrwx 3 1001 1001 4096 Apr 4 12:42 .
drwxrwxrwx 1 1001 1001 4096 Apr 4 12:42 ..
-rwxrwxrwx 1 1001 1001 2991 Apr 4 12:43 OZW_Log.txt
-rwxrwxrwx 1 1001 1001 978944 Apr 4 12:42 domoticz.db
-rwxrwxrwx 1 1001 1001 32768 Apr 4 12:43 domoticz.db-shm
-rwxrwxrwx 1 1001 1001 523272 Apr 4 12:44 domoticz.db-wal
-rwxrwxrwx 1 1001 1001 525671 Apr 4 12:43 ozwcache_0xfacac939.xml
drwxrwxrwx 2 1001 1001 4096 Apr 4 12:13 plugins
-rwxrwxrwx 1 root root 108 Apr 4 12:42 zwscene.xml
root@545adcf36101:/opt/domoticz/userdata#
Code: Select all
container_name: domoticz
build: ./services/domoticz/.
#image: domoticz/domoticz:latest
ports:
- "82:8080"
- "444:443"
#originele pem file gekopieerd in keys folder en changed ssl_cert=/opt/domoticz/keys/server_cert.pem in /volumes/domoticz/data/scripts/domoticz.conf
- "6144:6144"
- "9000:9000"
devices:
- '/dev/ttyUSB0:/dev/ttyUSB0'
volumes:
- ./volumes/domoticz/data:/opt/domoticz/userdata
restart: unless-stopped
network_mode: bridge
environment:
- PUID=1000
- PGID=1000
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
Code: Select all
FROM domoticz/domoticz:latest
USER root
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q build-essential\
wget \
zip \
unzip \
git \
python3-pip \
python3.7 \
python3-lxml \
libpython3.7/*
RUN python3 -m pip install -U pip
RUN python3 -m pip install setuptools
RUN python3 -m pip install wheel
RUN pip3 install --upgrade setuptools
RUN python3 -m pip install googletrans
RUN python3 -m pip install translate
RUN python3 -m pip install requests
RUN python3 -m pip install requests_toolbelt
RUN python3 -m pip install irgen
#RUN pip3 install broadlink
#VOLUME ["/opt/domoticz/scripts", "/opt/domoticz/backups", "/opt/domoticz/db", "/opt/domoticz/plugins", " /opt/domoticz/www/images/floorplans", " /opt/domoticz/www/templates"]
EXPOSE 8080 9440 9000
RUN mkdir -p /opt/domoticz/plugins
RUN cd /opt/domoticz/plugins && wget http://192.168.20.48:80/downloads/broadlink.zip && unzip -q broadlink.zip && rm broadlink.zip
# trials
# RUN python3 -m pip install python-broadlink-master
# RUN python3 -m pip install /opt/domoticz/plugins/Broadlink/python-broadlink-master/setup.py
# Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/python-broadlink-master/
RUN chmod -R 777 /opt/domoticz/plugins/Broadlink
# only one CMD ?
#CMD [ "python3", "/opt/domoticz/plugins/Broadlink/python-broadlink-master/setup.py" ]
#CMD [ "python3", "/opt/domoticz/plugins/Broadlink/setup.py" ]
CMD ["/opt/domoticz/domoticz"]