Docker Domoticz plugins where to place

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Docker Domoticz plugins where to place

Post 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?
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Docker Domoticz plugins where to place

Post 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!
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post by tonbor »

Well I did as you can read .... so what are you saying, extra python modules or what?
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Docker Domoticz plugins where to place

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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.......
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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.
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Docker Domoticz plugins where to place

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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/
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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
skippy711
Posts: 32
Joined: Friday 20 January 2017 17:52
Target OS: NAS (Synology & others)
Domoticz version: 2024.2
Location: Netherlands
Contact:

Re: Docker Domoticz plugins where to place

Post 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
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Docker Domoticz plugins where to place

Post 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).
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Docker Domoticz plugins where to place

Post 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/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Docker Domoticz plugins where to place

Post by waltervl »

Yes as docker seems to start from /opt
But here my docker knowledge stops.....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Sjonnie2017
Posts: 365
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Docker Domoticz plugins where to place

Post 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
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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.
User avatar
Sjonnie2017
Posts: 365
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Docker Domoticz plugins where to place

Post 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:
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Docker Domoticz plugins where to place

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest