Page 1 of 1

Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 10:46
by tonbor
Moved over from raspberry debian to intel nuc Ubuntu. Installed domoticz in docker container. Running fine. Default plug-in Zigbee running fine.
Tried to install Growatt plug-in. Not working.
Followed Python Plug-ins
When launching the docker container for the first time, a plug-in folder is created in the mounted /opt/domoticz/userdata folder You need to place your python plug-ins in this folder. This container runs Python 3.7.3

Running Python Version: 3.9.2
rob@Nuc5-rob:/opt/domoticz/userdata/Domoticz-Growatt-Webserver-Plugin
2023-03-09 10:34:13.127 Status: Domoticz V2023.1 (c)2012-2023 GizMoCuz
2023-03-09 10:34:13.128 Status: Build Hash: f9b9ac774, Date: 2023-02-14 15:06:40
2023-03-09 10:34:13.128 Status: Startup Path: /opt/domoticz/
2023-03-09 10:34:13.236 Status: PluginSystem: Started, Python version '3.9.2', 0 plugin definitions loaded.
Any help?

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 11:05
by waltervl
As instructed on the docker hub and on the wiki:
https://www.domoticz.com/wiki/Docker
Python Plugins

When launching the docker container for the first time, a plugin folder is created in the mounted /opt/domoticz/userdata folder You need to place your python plugins in this folder.

This container runs Python 3.7.3

When plugins need extra python modules you need to install those in the Docker container!

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 11:19
by tonbor
Well I did as you can read .... so what are you saying, extra python modules or what?

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 11:28
by waltervl
There should be a /opt/domoticz/userdata/plugins folder created by Domoticz. In that folder the plugins should be placed eg
/opt/domoticz/userdata/plugins/Domoticz-Growatt-Webserver-Plugin

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 11:31
by tonbor
waltervl wrote: Thursday 09 March 2023 11:28 There should be a /opt/domoticz/userdata/plugins folder created by Domoticz. In that folder the plugins should be placed eg
/opt/domoticz/userdata/plugins/Domoticz-Growatt-Webserver-Plugin
Thanks, but the wiki should be rewriten.......

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 12:02
by tonbor
waltervl wrote: Thursday 09 March 2023 11:28 There should be a /opt/domoticz/userdata/plugins folder created by Domoticz. In that folder the plugins should be placed eg
/opt/domoticz/userdata/plugins/Domoticz-Growatt-Webserver-Plugin
No luck
rob@Nuc5-rob:/opt/domoticz/userdata/plugins/ with Domoticz-Growatt-Webserver-Plugin plugins-manager
after restart
2023-03-09 11:59:46.032 Status: Domoticz V2023.1 (c)2012-2023 GizMoCuz
2023-03-09 11:59:46.033 Status: Build Hash: f9b9ac774, Date: 2023-02-14 15:06:40
2023-03-09 11:59:46.033 Status: Startup Path: /opt/domoticz/
2023-03-09 11:59:46.124 Status: PluginSystem: Started, Python version '3.9.2', 0 plugin definitions loaded.

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 12:16
by waltervl
tonbor wrote: Thursday 09 March 2023 11:31
waltervl wrote: Thursday 09 March 2023 11:28 There should be a /opt/domoticz/userdata/plugins folder created by Domoticz. In that folder the plugins should be placed eg
/opt/domoticz/userdata/plugins/Domoticz-Growatt-Webserver-Plugin
Thanks, but the wiki should be rewriten.......
Very helpfull comment, thanks.

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 12:29
by tonbor
waltervl wrote: Thursday 09 March 2023 12:16
tonbor wrote: Thursday 09 March 2023 11:31
waltervl wrote: Thursday 09 March 2023 11:28 There should be a /opt/domoticz/userdata/plugins folder created by Domoticz. In that folder the plugins should be placed eg
/opt/domoticz/userdata/plugins/Domoticz-Growatt-Webserver-Plugin
Thanks, but the wiki should be rewriten.......
Very helpfull comment, thanks.
Wike: When launching the docker container for the first time, a plugin folder is created in the mounted /opt/domoticz/userdata folder You need to place your python plugins in this folder.

you are telling me to place them in the opt/domoticz/userdata/plugins dir.... that is an other dir then the wiki tells

both are not working, not placing in opt/domoticz/userdata/plugins/ nor placing in opt/domoticz/userdata/

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 12:48
by tonbor
Solved place them in the already created dir /opt/config/plugins
$/opt/config/plugins$ ls
Domoticz-Growatt-Webserver-Plugin
And it is working :D
Please adjust wiki

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 12:55
by skippy711
Perhaps not the intended solution, but what worked for me (working from Portainer)

After initial Docker Domoticz creation the '/opt/...' was created

In my /home/pi/domoticz/plugins folder I added the required plugins (git clone '...')

Then 'deploy the container' in Portainer and the added plugins are available in Docker

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 13:17
by waltervl
tonbor wrote: Thursday 09 March 2023 12:48 Solved place them in the already created dir /opt/config/plugins
$/opt/config/plugins$ ls
Domoticz-Growatt-Webserver-Plugin
And it is working :D
Please adjust wiki
That is the problem with Docker, appearantly you configured your Docker environment to use another userdata location (/opt/config).

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 13:21
by waltervl
tonbor wrote: Thursday 09 March 2023 12:48 Solved place them in the already created dir /opt/config/plugins
$/opt/config/plugins$ ls
Domoticz-Growatt-Webserver-Plugin
And it is working :D
Please adjust wiki
That is the problem with Docker, from domoticz it is called /opt/domoticz/userdata/plugins. On your system it can be called anything as defined in the docker-compose.yml. In your case /opt/config/

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 14:04
by tonbor
[/quote]
That is the problem with Docker, from domoticz it is called /opt/domoticz/userdata/plugins. On your system it can be called anything as defined in the docker-compose.yml. In your case /opt/config/
[/quote]
No
This is my compose file with the volumes: - ./config:/opt/domoticz/userdata
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
So Domoticz looks elswhere

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 15:36
by waltervl
Yes as docker seems to start from /opt
But here my docker knowledge stops.....

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 15:41
by Sjonnie2017
volumes:
- ./config:/opt/domoticz/userdata
This effectively creates a subfolder "config" in the folder from which you start the docker-compose.yml. This is where you should place your plugins. Not in /opt/... etcetera

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 16:18
by tonbor
Sjonnie2017 wrote: Thursday 09 March 2023 15:41
volumes:
- ./config:/opt/domoticz/userdata
This effectively creates a subfolder "config" in the folder from which you start the docker-compose.yml. This is where you should place your plugins. Not in /opt/... etcetera
That is the right way. My docker-compose.yaml is the dir /opt. Installing the docker compose domoticz container created in the dir /opt the dir config/plugins. Puting there the plugins is working for me.

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 16:26
by Sjonnie2017
tonbor wrote: Thursday 09 March 2023 16:18 That is the right way. My docker-compose.yaml is the dir /opt. Installing the docker compose domoticz container created in the dir /opt the dir config/plugins. Puting there the plugins is working for me.
I would personally never put configurable files in the /opt directory. But that's only me ;) I have my compose files in separate directories all under my home directory. Easier to create a simple back-up and easier to edit since I own my own home folder. :mrgreen:

Re: Docker Domoticz plugins where to place

Posted: Thursday 09 March 2023 18:36
by tonbor
Sjonnie2017 wrote: Thursday 09 March 2023 16:26
tonbor wrote: Thursday 09 March 2023 16:18 That is the right way. My docker-compose.yaml is the dir /opt. Installing the docker compose domoticz container created in the dir /opt the dir config/plugins. Puting there the plugins is working for me.
I would personally never put configurable files in the /opt directory. But that's only me ;) I have my compose files in separate directories all under my home directory. Easier to create a simple back-up and easier to edit since I own my own home folder. :mrgreen:
Thanks for the tip. I spend many many hours and days to get mqtt and zigbee2mqtt with docker compose working. they would not read the yaml files in the config dirs.So away from my home dir a lot Chmod in the opt dir, and finaly I got them working :D Perhabs less save but working