Page 5 of 7

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Monday 11 October 2021 19:44
by smaus
Does somebody have te garbagecalendar by jvanderzande running in a synologydocker?

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Thursday 14 October 2021 16:10
by waltervl
Just a note that it is now possible to use stable and beta images: https://hub.docker.com/r/domoticz/domoticz/tags

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Tuesday 09 November 2021 17:03
by Gravityz
i have been running the docker container without problems for a while.

lately i discovered a problem involving mosquitto

in the old setup i had domoticz running as a package on synology and also mosquitto running as a package.
Since this was the same host i could easilly run mosquitto_pub in a dzvents script by using os execute

now that i have moved to the docker container i discovered that the script can not find mosquitto_pub anymore
this makes sense because the container can only see it's own filesystem and that of the mount points.
copying mosquitto to a mount point obviously does not solve it.

any ideas how i can execute mosquitto_pub from within the docker container?
is it possible/smart to install mosquitto inside the same docker container?

i know i can do apt-get install mosquitto but where does it get installed?

thanks

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Wednesday 10 November 2021 13:41
by Gravityz
solved it myself

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Wednesday 10 November 2021 16:27
by EddyG
Nice, tell others so they can enjoy your solution too.
General rule with docker is: do not us 127.0.0.1 but only ip addresses like 192.168.x.x
An other rule is: do not install anything inside the docker container, because it is lost when ever you upgrade with an new image.

Domoticz-Google Plugin

Posted: Friday 12 November 2021 15:54
by laco
Plugin:
https://github.com/dnpwwo/Domoticz-Google-Plugin
https://easydomoticz.com/forum/viewtopic.php?t=10297

I'm trying to install this plugin to send sound notifications to chromecast devices.
After installation we will print this error.

Code: Select all

2021-11-12 15:17:04.385 Error: google: (GoogleDevs) failed to load 'plugin.py', Python Path used was '/opt/domoticz/userdata/plugins/Domoticz-Google-Plugin-master/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-11-12 15:17:04.385 Error: google: Module Import failed, exception: 'ModuleNotFoundError'
2021-11-12 15:17:04.385 Error: google: Module Import failed: ' Name: pychromecast'
2021-11-12 15:17:04.385 Error: google: Error Line details not available.
2021-11-12 15:17:04.385 Error: google: Exception traceback:
2021-11-12 15:17:04.386 Error: google: ----> Line 103 in '/opt/domoticz/userdata/plugins/Domoticz-Google-Plugin-master/plugin.py', function <module>
Does anyone have it running in Synology dockers?

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Thursday 25 November 2021 16:36
by Gravityz
Hi Eddy,
i do not agree with that last rule.
the problem with docker is that it runs in it's own container which makes it really hard to communicate or execute commands outside the container.
Because i have a MQTT broadcast script which relies on the local mosquitto_pub command it is almost impossible to use this.

as a workaround i installed mosquitto inside the docker container, not that difficult and it solves my problem.
indeed whenever i upgrade the container i need to install it again but it is just 1 line of code.

so i run internal
curl
mosquitto

to startup mosquitto whenever i start domoticz i modified the docker-entrypoint.sh with this
#!/bin/bash
echo 'Starting Mosquitto'
/usr/sbin/mosquitto -d

my question is,is this a solid solution or should i this differently? building a new image with al these changes sounds like a lot more work


EddyG wrote: Wednesday 10 November 2021 16:27 Nice, tell others so they can enjoy your solution too.
General rule with docker is: do not us 127.0.0.1 but only ip addresses like 192.168.x.x
An other rule is: do not install anything inside the docker container, because it is lost when ever you upgrade with an new image.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Thursday 25 November 2021 19:01
by EddyG
If you use dzVents in Domoticz to execute the mosquitto_pub command you could use "named pipe"
Here is an explanation and example https://stackoverflow.com/questions/321 ... -container
Scroll down to "Update"
You could send your mosquitto_pub command to a standalone mosquitto server, you could even put your mosquitto server in a container.
This solution only needs a listener on the host system, the mkfifo command is included in the Domoticz container.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Thursday 25 November 2021 20:28
by Gravityz
thanks for thinking about this
that looks like a way to do it but with all the things i need to change i probably stick to my solution

apt-get install mosquitto && apt-get install mosquitto-clients

sure mosquitto and domoticz are running in the same container but they normally work closely hand in hand so this should not be a problem

i put everything in 1 script(accessible from userdata) which does all the installing of the packages and also installs plugins
If they include the plugin manager in the default docker image(and fix the fact that it needs to install in userdata) i can skip the manual plugin installation

EddyG wrote: Thursday 25 November 2021 19:01 If you use dzVents in Domoticz to execute the mosquitto_pub command you could use "named pipe"
Here is an explanation and example https://stackoverflow.com/questions/321 ... -container
Scroll down to "Update"
You could send your mosquitto_pub command to a standalone mosquitto server, you could even put your mosquitto server in a container.
This solution only needs a listener on the host system, the mkfifo command is included in the Domoticz container.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Monday 29 November 2021 9:45
by gielie
I’ve been trying to switch from my pi to the synology docker but I experience a lot of problems.
Domoticz itself runs fine but my Zigbee devices don’t.
For Zigbee I need an MQTT container, zigbee2MQTT container and the python plugin.
What works is adding a Zigbee device trough the plug-in in Domoticz, als I get updates but switching a button on/off won’t work. So it seems there is only a 1 way communication that works.

Is there someone with a clear tutorial how to install these containers the proper way and get this to work?

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Saturday 05 February 2022 9:08
by Stormryder
Added an extra part in original post regarding updating to 2022.01, plus a way to check which python version the container uses and how to change the default version (not visible in quote below).

Stormryder wrote: Friday 26 February 2021 13:44 Updating to 2022.01 (added Feb. 05 2022)
Updating the Domoticz-docker to version 2022.01 works great when using the following steps (thanks to @Gravityz):

From the synology user interface go to docker-container and select the domoticz container
Stop it and rename it to "domoticz-old"
Next go to Register and search the "domoticz/domoticz" image
Choose 'Latest' (or 2022.01) and download it. This will replace the current image with the new, updated one (version 2022.01)
When download is finished go back to the old container domoticz-old and right click to get options from this old container
Choose 'settings duplicate' and name the new container 'Domoticz' and finally start it.

Important after updating; you need to redo the 'Python and Curl plugins/scripts' part of this tutorial

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Saturday 05 February 2022 9:39
by waltervl
Curl should be already installed on the image.
And latest is latest BETA
If you want to update to latest stable you have to use tag stable.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Saturday 05 February 2022 9:57
by Stormryder
waltervl wrote: Saturday 05 February 2022 9:39 Curl should be already installed on the image.
And latest is latest BETA
If you want to update to latest stable you have to use tag stable.
Thanks, added a few words in main post just to make it clear.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Saturday 05 February 2022 10:35
by waltervl
Thanks, also the Domoticz install on Synology wiki has been updated with docker install instructions. See https://www.domoticz.com/wiki/Synology
So also wise the refer to that for first time install.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Saturday 05 February 2022 11:21
by Stormryder
waltervl wrote: Saturday 05 February 2022 10:35 Thanks, also the Domoticz install on Synology wiki has been updated with docker install instructions. See https://www.domoticz.com/wiki/Synology
So also wise the refer to that for first time install.
Done, thanks again.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Tuesday 08 February 2022 22:02
by dens1975
I'm upgraded to DSM7 and running Domoticz in docker. I got my P1 smart meter and rfxcom running but my Open Zwave USB isn't working. I get a driver failed error.
Is there another driver to load? What can I check?

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Tuesday 08 February 2022 22:41
by waltervl
dens1975 wrote: Tuesday 08 February 2022 22:02 I'm upgraded to DSM7 and running Domoticz in docker. I got my P1 smart meter and rfxcom running but my Open Zwave USB isn't working. I get a driver failed error.
Is there another driver to load? What can I check?
Did you check the wiki section about drivers https://www.domoticz.com/wiki/Synology

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Tuesday 08 February 2022 23:06
by dens1975
Did you check the wiki section about drivers https://www.domoticz.com/wiki/Synology

Yes I did the Jadahl driver install but I don't have my /dev/ttyACM0 port on which my zwave usb was active.

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Tuesday 08 February 2022 23:34
by dens1975
I found out that Synology DSM 7 does not support external USB devices and their drivers. USB devices (Wi-Fi dongle, Bluetooth dongle, 3G/4G dongle, USB DAC/speaker, and DTV dongle) are no longer supported in DSM 7.0

This solved my issue: https://mariushosting.com/synology-how- ... -on-dsm-7/

Maybe something to mention in the wiki?

Re: Synology - guide to switch from Jadahl package to official docker (domoticz-docker)

Posted: Wednesday 09 February 2022 10:19
by Gravityz
this should work as well and if it does is a better solution
you need root access to your synology to create the conf file

the loader script is not necessary.
DSM7 comes with systemd as the service manager. One of the supplied services is systemd-modules-load.service, which can ensure loading the modules.
So all you need is a single .conf file containing a list of wanted modules in /etc/modules-load.d/ and they will be loaded at boot (or whenever systemd-modules-load service is loaded)

In /etc/modules-load.d/

create file
75-usb-serial.conf (this number needs to be higher than usb-kernel.conf)
usbserial.ko
ftdi_sio.ko
cdc-acm.ko


after that reboot