Page 1 of 1
domoticz on synology without jadahl
Posted: Sunday 17 January 2021 9:11
by jurgen
Hi All,
For years i've installed domoticz with packages released from jadahl but as many people know is that there will be no new version released.
Sooner or later DSM 7.0 will be released and maybe we have a problem.
Does anybody know how to run domoticz on synology?
I have read the following link, but i have a feeling that it is out-dated.
https://www.domoticz.com/wiki/Synology
Thanks!

Re: domoticz on synology without jadahl
Posted: Sunday 17 January 2021 9:42
by niki_lauda
I managed in the early days of Domoticz to get it running on a synology. Updating every time was very difficult.
You have 3 options in my opinion
1. Jadahl
2. If you can run Docker on your Synology follow that road.
3. Buy a Pi , as I did.
Re: domoticz on synology without jadahl
Posted: Sunday 17 January 2021 9:50
by eddieb
niki_lauda wrote: ↑Sunday 17 January 2021 9:42
3. Buy a Pi , as I did.
I saved myself tons of trouble by buying a dedicated Pi for domoticz 2 years ago ...
Last summer I convinced a friend to do the same, swapping his Syno with a Pi for domoticz, also no problems anymore.
Re: domoticz on synology without jadahl
Posted: Thursday 28 January 2021 13:36
by Antori91
niki_lauda wrote: ↑Sunday 17 January 2021 9:42
I managed in the early days of Domoticz to get it running on a synology. Updating every time was very difficult.
You have 3 options in my opinion
1. Jadahl
2. If you can run Docker on your Synology follow that road.
3. Buy a Pi , as I did.
Hello,
The fourth option may be to use the Synocommunity package:
https://synocommunity.com/package/domoticz. But they don't seem to be working very quickly on the release of new versions.
A fifth option is to build yourself your Synology package using the Synocommunity cross-compile tools. I've started a few months ago to explore this option:
viewtopic.php?f=47&t=32533&p=252446#p252446
PS: And of course related to the fifth option, the sixth option will be to use the recipe used by Jadhal to generate the package. But it seems he doesn't want to give the recipe.
Re: domoticz on synology without jadahl
Posted: Tuesday 02 February 2021 21:25
by cyberbob69
Hello,
Any news for the future use of Domoticz with Synology and DSM 7?
Cordially.
Re: domoticz on synology without jadahl
Posted: Sunday 21 February 2021 20:02
by Stormryder
niki_lauda wrote: ↑Sunday 17 January 2021 9:42
I managed in the early days of Domoticz to get it running on a synology. Updating every time was very difficult.
You have 3 options in my opinion
1. Jadahl
2. If you can run Docker on your Synology follow that road.
3. Buy a Pi , as I did.
Any advise how to switch from Jadahl package to Docker?
I have Homebridge and Zigbee2MQTT on Docker, and can download Domoticz to Docker.
But how do I keep my 'setup' (scripts. plugins, devices, etc.) in Docker? Any tutorials?
Making a backup of the DB and restoring this in the new Domoticz instance on Docker is not enough I guess?
Re: domoticz on synology without jadahl
Posted: Sunday 21 February 2021 22:12
by Alcloud
Making a backup of the DB and restoring this in the new Domoticz instance on Docker is not enough I guess?
If you are using the beta version, it should be enough to restore your setup from backup.
I did the same - switched from synology package to the docker. It went smoothly.
I use the official docker image + Z-Stick + Ethernet gateway for mysensors + Philips Hue bridge, etc..
I created a docker container with docker-compose, because I needed to make USB Z-Stick "visible" for the container.
There are a lot of instructions, just google it.
P.S. I also use the broadlink plugin, so I needed to install some libs like python3, pip, etc. inside the container
Re: domoticz on synology without jadahl
Posted: Sunday 21 February 2021 22:50
by Stormryder
Thanks.
I just tried some stuff, pretty straight forward.
Problem I ran into is that I do not know what to put in the device field.
I have Zigbee2MQTT running on docker as well with the usb on tty/ACM1.
I have a p1 smart meter connected to Dominica on tty/ACM0.
As soon as I start Domoticz from Docker it doesn’t work with the P1 usb (drop down in Hardware is empty). And the strange thing is that Zigbee2MQTT stops working as well.
I guess something with exposing the usb to a docker container.
Will keep on trying the coming days, have to look into docker-compose to set up Device to expose the P1 usb to this container.
Re: domoticz on synology without jadahl
Posted: Monday 22 February 2021 16:59
by Stormryder
I managed to get the device working with a docker-compose file.
Placed in inside 'docker/domoticz/' (if this is your connected path in Docker) as docker-compose.yml
Code: Select all
Version: '3.3'
services:
domoticz:
image: domoticz/domoticz
container_name: domoticz
restart: unless-stopped
#Pass devices to container
devices:
- "/dev/tty/USB0:/dev/ttyUSB0"
ports:
- "8084:8084"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
The only problem I have left is that I get an error with some scripts.
When running a script I see that the following error occurs:
sh: 1: {command of the script, eg. path/to/the/script/1234546.py} not found
I have not been able to figure this one out, anyone?
Re: domoticz on synology without jadahl
Posted: Tuesday 23 February 2021 0:21
by Alcloud
When running a script I see that the following error occurs:
sh: 1: {command of the script, eg. path/to/the/script/1234546.py} not found
You should put your scripts folder into userdata folder.
Re: domoticz on synology without jadahl
Posted: Tuesday 23 February 2021 8:27
by Stormryder
Alcloud wrote: ↑Tuesday 23 February 2021 0:21
You should put your scripts folder into userdata folder.
This is where it gets strange, because as far as I can tell this is inside the userdata folder.
The scripts are in:
volume1/docker/domoticz/scripts/python/
and I connected the following volumes inside my docker container:
/opt/domoticz/userdata to docker/domoticz/
All other folders, documents (like db) are visible in the connected folder.
And when I edit a DzVent script in Domoticz Interface and save that, I see the change when I go to volume1/docker/domoticz/scripts/dzvents/generated_scripts/[scriptname].lua. So the connection between Domoticz and the folder in File Station is there.
So as far a I can tell it is all in the right place.

- Schermafbeelding 2021-02-23 om 08.24.41.png (311.36 KiB) Viewed 9476 times
And yes, I know that I do not have Domoticz running with docker-compose.yml.
I have one container running with docker-compose and this container running with settings from the GUI, both have exactly the same behaviour when it comes to this.
Re: domoticz on synology without jadahl
Posted: Friday 26 February 2021 13:54
by JackD
Hi There.....
I have been running Domoticz on my Synology NAS with the jadahl packages for many years now with no problems at all.
But sadly jadahl has stopped creating them, so I now am playing with Docker to see how to get Domoticz easily running.
I don't like command lines so my first step is trying to get by with the Synology Docker GUI for the setup and control.
My question:
How to get 4 USB devices (easily) passed through to the Docker Domoticz container.
The most simple way is to run the Docker Domoticz container with "execute container using high privilege".
All USB devices (and also the motherboardsensors) are now available to Domoticz in the Docker container, nice and simple but supposedly more insecure
So how about the (realworld) security risks as opposed to running Domoticz with the jadahl package natively on the Synology NAS ?
-
Re: domoticz on synology without jadahl
Posted: Monday 15 March 2021 12:22
by Goodman452
Not sure the driver inside the package will work, but you can uninstall the If you like the work I do for synology and domoticz, I appreciate a donation.
Re: domoticz on synology without jadahl
Posted: Saturday 22 May 2021 12:04
by Marselaar
JackD wrote: ↑Friday 26 February 2021 13:54
How to get 4 USB devices (easily) passed through to the Docker Domoticz container.
The most simple way is to run the Docker Domoticz container with "execute container using high privilege".
All USB devices (and also the motherboardsensors) are now available to Domoticz in the Docker container, nice and simple but supposedly more insecure
I have selected "execute container using high privilege, but still no connection to USB. I use the domoticz/domoticz container and also tried the yml file mentioned earlier. Do you have access to your usb device by only running with high privilege?
Btw, I am already on DSM 7.0 beta
Re: domoticz on synology without jadahl
Posted: Sunday 23 May 2021 20:00
by JackD
For DSM 6.xxx you can try install the Synology usb serial driver package from jadahl (
www.jadahl.com) but I don't know if this runs on DSM 7.
Before I did this my Domoticz Docker container did not see my Z-wave and RFXCOM-XL usb-stick, same as you state.
Marselaar wrote: ↑Saturday 22 May 2021 12:04
JackD wrote: ↑Friday 26 February 2021 13:54
How to get 4 USB devices (easily) passed through to the Docker Domoticz container.
The most simple way is to run the Docker Domoticz container with "execute container using high privilege".
All USB devices (and also the motherboardsensors) are now available to Domoticz in the Docker container, nice and simple but supposedly more insecure
I have selected "execute container using high privilege, but still no connection to USB. I use the domoticz/domoticz container and also tried the yml file mentioned earlier. Do you have access to your usb device by only running with high privilege?
Btw, I am already on DSM 7.0 beta
Re: domoticz on synology without jadahl
Posted: Sunday 23 May 2021 20:22
by Stormryder
JackD wrote: ↑Sunday 23 May 2021 20:00
For DSM 6.xxx you can try install the Synology usb serial driver package from jadahl (
www.jadahl.com) but I don't know if this runs on DSM 7.
Before I did this my Domoticz Docker container did not see my Z-wave and RFXCOM-XL usb-stick, same as you state.
Marselaar wrote: ↑Saturday 22 May 2021 12:04
JackD wrote: ↑Friday 26 February 2021 13:54
How to get 4 USB devices (easily) passed through to the Docker Domoticz container.
The most simple way is to run the Docker Domoticz container with "execute container using high privilege".
All USB devices (and also the motherboardsensors) are now available to Domoticz in the Docker container, nice and simple but supposedly more insecure
I have selected "execute container using high privilege, but still no connection to USB. I use the domoticz/domoticz container and also tried the yml file mentioned earlier. Do you have access to your usb device by only running with high privilege?
Btw, I am already on DSM 7.0 beta
Could it be that you have not installed the usb drivers?
And that that is the reason why the USB are not recognized?
In my/the tutorial you can see I ran into the same problem (I copied the part of the tutorial below);
USB port, for e.g. P1 meter and/or Zigbee2MQTT
I ran into problems with my P1 meter (USB) and Zigbee2MQTT (USB) after a restart of my NAS. The USB-ports I used, like ttyUSB0 and ttyUSB1 were not created, so the P1 meter was not updated in Domoticz. And Zigbee2MQTT didn't start because the USB-stick was unavailable.
This took way to long to figure out, but I managed to track it down; the USB drivers of these devices are not installed.
After installing the Jadahl ‘USB driver package’
http://www.jadahl.com/# (download the 6.1 or 6.2 version corresponding with the DSM installed on your NAS) and install this manually in Synology Package center. The USB drivers are installed automatically and ttyUSB0 and ttyUSB1 (or something similar) are created again. P1 meter works and Zigbee2MQTT starts and works again.
Re: domoticz on synology without jadahl
Posted: Thursday 24 June 2021 13:28
by RCS42
DSM doesn't load a USB driver when the PI-USB cable is attached. The drivers are available in the system though. Ubunty loads the drivers automatically so problably it's possible to convince DSM to do this also.
Anyway, the manual method is as follows. Login to DSM via SSH and do/check the following:
Confirm that the kernel sees the P1 cable after plugging in/out:
$ sudo dmesg
Confirm that there is no ttyUSB device:
$ ls /dev/ttyU*
Activate drivers:
$ sudo insmod /lib/modules/usbserial.ko
$ sudo insmod /lib/modules/ftdi_sio.ko
Check if new device is present:
$ ls /dev/ttyU*
After starting the container (with admin privileges) the port becomes available in Domoticz. After setting the speed to 115k you can verify reception of data from the meter in DSM with the following command (this stops reception in the container):
$ sudo cat /dev/ttyUSB0
To make the module installation permanent (survive reboots) create the following file and insert the two module lines:
$ sudo vi /usr/local/etc/rc.d/startup.sh
sudo insmod /lib/modules/usbserial.ko
sudo insmod /lib/modules/ftdi_sio.ko
$ chmod 700 /usr/local/etc/rc.d/startup.sh
Instead of running the container with admin privileges you probbly can also attach the ttyUSB device through a docker-compose.yml file as mentioned by others.
Re: domoticz on synology without jadahl
Posted: Monday 16 August 2021 2:10
by JvH416
Hi RCS42,
I tried your instructions but am (still) stuck...
My problem:
- I had a working setup using the Jadahl package on DSM6.2 running on a DS416Play. This setup used the P1 smart meter interface for utility data logging.
- I updated to DSM7.0 without realizing that this would break this setup. Luckily I could recover an hourly backup so metering data loss should be limited.
- Meanwhile I installed Docker. Although this is not officially supported on the 416Play, a forum post suggested that I could download it from Synology's support site and choosing the DS415+ model instead. Installation went fine.
- In this docker I set up domoticz as shown in this post (
viewtopic.php?p=269673#p269673) and I could import the metering data and also the Buienradar device appears to work.
- Now the real problem: My P1 meter does not work.
In trying to solve that, I installed the DSM7.0 drivers from Jadahl (Braswell architecture). Still no go. Reading further, I found that there was supposed to be a ttyUSB0 device active (this port is also shown in the Domoticz hardware setup).
After (also) loading the ftdi_sio.ko module, I get the ttyUSB0 device. But still no go.
So my first question now is: Which drivers do I need to load?
- usbserial (think so as it is shown in both Jadahl's and your instructions)
- cp210x.ko (from Jadahl, but no /dev/ttyUSB0 is created)?
- ftdi_sio.ko (per your instructions, I did not download it so I think it is a leftover from my DMS6.2 setup)?
When trying to configure the P1 hardware in Domoticz, it is listed. But in the configuration tab I cannot enabled it (falls back to disabled every time).
I also did a test to see if there is anything coming out of the interface with "cat /dev/ttyUSB0". Nothing. When I look on the cable itself, the LEDs flash when inserting it in one of the USB port at the back, but it looks like only one message is transferred (and not acknowledged) from the meter because there is one LED blink. When I insert the cable in the front USB (where it has been working for more than two years), nothing happens, not even an initial blink of the LEDs. When I insert a USB memory stick in that port, I can see and open the files on it. Based on these experiments, I don't think that the USB port or cable are broken.
Thanks for any help,
John
Re: domoticz on synology without jadahl
Posted: Wednesday 18 August 2021 0:53
by JvH416
Meanwhile I figured it out....
After installing the drivers, I needed to restart the Domoticz docker container. Now it sees the P1 cable and data is logged from it.
BTW, I am using the ftdi_sio driver now, in combination with the usbserial driver.
Thanks,
John
Re: domoticz on synology without jadahl
Posted: Saturday 05 March 2022 12:25
by pioupiou92
I managed to make my docker container accessing dev/ttyACM0 and dev/ttyUSB0 on my DS716+ with DSM7. This way:
- Download your Synology model drivers from
https://github.com/robertklep/dsm7-usb-serial-drivers (special thanks to him)
- Load the drivers as explain. usbserial.ko, ftdi_sio.ko and cdc-acm.ko were enough for me to get my OpenZWave on ttyACM0 and my RFPlayer on ttyUBS0.
- Set the chmod 777 on your devices (didn't work without it) as suggested here
https://mariushosting.com/synology-how- ... -on-dsm-7/
- Start your container with the "--device /dev/ttyUSB0:/dev/ttyUSB0 --device /dev/ttyACM0:/dev/ttyACM0" parameters
That's it!