No plugins with Docker

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

Moderator: leecollings

Post Reply
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

No plugins with Docker

Post by solarboy »

I am trying out Docker with domoticz.

I have fully functioning zigbee2mqtt and zwave-js-ui.

However I have no plugins, which I have placed in 2 locations,

/opt/domoticz/userdata/plugins
and
/opt/domoticz/config/plugins

I presume this should work, however it does not (and I also don't have any themes, not sure if related)

My docker-compose.yml is basically the same as in the wiki.

Code: Select all

version: '3.3'

services:
  domoticz:
    image: domoticz/domoticz:2023.2
    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
      - /var/sbfspot:/var/sbfspot
      - /etc/sbfspot:/etc/sbfspot
    environment:
      - TZ=Europe/Lisbon
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log
Does anyone have any idea why this might not be working ? , I am keen to move over to docker as it has my only non-malformed database.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

I suspect this might be a permissions issue but I don't know what the permissions should be set to (does domoticz in docker run as root or something else)
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
Sjonnie2017
Posts: 365
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: No plugins with Docker

Post by Sjonnie2017 »

You could set the userdata folder to a folder in Home of the logged in user. Example /home/pi/Domoticz/userdata. There you can adjust permissions as you need / see fit.

I try to prevent changing permissions in other folder than ~ (unless it is absolutely necessary)
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
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

Sjonnie2017 wrote: Thursday 11 January 2024 15:38 You could set the userdata folder to a folder in Home of the logged in user. Example /home/pi/Domoticz/userdata. There you can adjust permissions as you need / see fit.

I try to prevent changing permissions in other folder than ~ (unless it is absolutely necessary)
Thanks again for your help.

So I did this by changing my docker-compose.yml to

Code: Select all

version: '3.3'

services:
  domoticz:
    image: domoticz/domoticz:2023.2
    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:
      - /home/admin/domoticzUserdata:/opt/domoticz/userdata
      - /var/sbfspot:/var/sbfspot
      - /etc/sbfspot:/etc/sbfspot
    environment:
      - TZ=Europe/Lisbon
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log
I copied my database file here and Domoticz started but still no plugins

The userdata folder still is not created.

domoticz.log, etc are created.

I noticed this in the log.

Code: Select all

 2024-01-11 15:02:22.064 Status: Domoticz V2023.2 (c)2012-2023 GizMoCuz
2024-01-11 15:02:22.064 Status: Build Hash: 19efd039c, Date: 2023-07-21 16:23:44
2024-01-11 15:02:22.064 Status: Startup Path: /opt/domoticz/
2024-01-11 15:02:22.150 Status: PluginSystem: 'Google Home' Registration ignored, [b]Plugins are not enabled[/b].
2024-01-11 15:02:22.150 Status: PluginSystem: 'Lounge AC' Registration ignored, [b]Plugins are not enabled[/b]. 
But I can't see any settings to enable or disable plugins.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
Sjonnie2017
Posts: 365
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: No plugins with Docker

Post by Sjonnie2017 »

I am sorry but what do you mean by
The userdata folder still is not created.
Did you create it in the home directory of the user or do you expect Docker to do that?
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
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

Sjonnie2017 wrote: Thursday 11 January 2024 16:24 I am sorry but what do you mean by
The userdata folder still is not created.
Did you create it in the home directory of the user or do you expect Docker to do that?
I did not at first in case this is something docker/domoticz likes to do.

That didn't happen so I stopped the container copied my plugins folder into /home/admin/domoticzUserdata/

That didn't work so I created the folder /home/admin/domoticzUserdata/userdata and put my plugins folder into that.

This also didn't work.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
gizmocuz
Posts: 2536
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: No plugins with Docker

Post by gizmocuz »

That's correct and should not be needed (this special volume)
If you have used the default compose file (except maybe some serial port definitions), you should have a config folder in the docker compose folder you created for domoticz (for instance /opt/domoticz/config)

https://hub.docker.com/r/domoticz/domoticz

This is already the userdata folder
You can create a 'plugins' folder in here and add your plugins in here

Some plugins might need some additional python packages installed, for this we have a 'custom startup script' that is launched when the docker is started.
config/customstart.sh

for example with

pip3 install zzzz
Quality outlives Quantity!
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

gizmocuz wrote: Thursday 11 January 2024 16:41 That's correct and should not be needed (this special volume)
If you have used the default compose file (except maybe some serial port definitions), you should have a config folder in the docker compose folder you created for domoticz (for instance /opt/domoticz/config)

https://hub.docker.com/r/domoticz/domoticz

This is already the userdata folder
You can create a 'plugins' folder in here and add your plugins in here

Some plugins might need some additional python packages installed, for this we have a 'custom startup script' that is launched when the docker is started.
config/customstart.sh

for example with

pip3 install zzzz
Thanks for replying, appreciated.

I have placed multiple plugins folders in the following locations:

/opt/domoticz/config

/opt/domoticz/userdata

/home/admin/domoticzUserdata/

/home/admin/domoticzUserdata/userdata

/home/admin/domoticzUserdata/config

My docker-compose.yml is in /opt/domoticz/ and is

Code: Select all

version: '3.3'

services:
  domoticz:
    image: domoticz/domoticz:2023.2
    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:
      - /home/admin/domoticzUserdata:/opt/domoticz/userdata
      - /var/sbfspot:/var/sbfspot
      - /etc/sbfspot:/etc/sbfspot
    environment:
      - TZ=Europe/Lisbon
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log
One of my plugins is "Python Plugin Manager" which I imagine needs no other packages so at least it should appear, however still no plugins other than the default ones (also no themes)

Everything else seems to work, zigbee2mqtt, zwavejsui (both in dockers).

I can only write to /opt/domoticz/ as root.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Kedi
Posts: 575
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: No plugins with Docker

Post by Kedi »

Put / install the plugin(s) in /home/admin/domoticzUserdata/plugins
Logic will get you from A to B. Imagination will take you everywhere.
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

Kedi wrote: Thursday 11 January 2024 19:50 Put / install the plugin(s) in /home/admin/domoticzUserdata/plugins
I ended up reverting to the default compose file as gizmocuz suggested , deleted everything except the compose file and restarted the container.

It created the /opt/domoticz/config/plugins folder all on its own.

I stopped the container and copied over my db to replace the newly created db and copied my plugins into /opt/domoticz/config/plugins

Domoticz started well, and this time with themes !

Sadly no plugins yet. I noticed the plugin.py files weren't "executable" and I changed this but to no avail.

Is there a "test" plugin I could use that doesn't require any other packages ?

I am still getting these in the logs

Code: Select all

 2024-01-11 19:04:24.873 Status: PluginSystem: 'Google Home' Registration ignored, Plugins are not enabled.
2024-01-11 19:04:24.873 Status: PluginSystem: 'Lounge AC' Registration ignored, Plugins are not enabled. 
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

If start the container without a db file a new one is created as well a a plugin folder and plugins can be installed without problems.

In the log there is this:

Code: Select all

2024-01-11 20:08:08.171 Status: Domoticz V2024.1 (c)2012-2024 GizMoCuz
2024-01-11 20:08:08.171 Status: Build Hash: 5279c8261, Date: 2024-01-01 11:59:22
2024-01-11 20:08:08.172 Status: Startup Path: /opt/domoticz/
2024-01-11 20:08:08.334 Status: PluginSystem: Started, Python version '3.9.2', 1 plugin definitions loaded.
If I upload my own db and restart I cannot use plugins, even freshly installed from git, for example "WAN-IP-CHECKER"

Code: Select all

2024-01-11 20:03:07.622 Status: Domoticz V2024.1 (c)2012-2024 GizMoCuz
2024-01-11 20:03:07.623 Status: Build Hash: 5279c8261, Date: 2024-01-01 11:59:22
2024-01-11 20:03:07.623 Status: Startup Path: /opt/domoticz/
2024-01-11 20:03:07.729 Status: PluginSystem: 'Google Home' Registration ignored, Plugins are not enabled.
2024-01-11 20:03:07.730 Status: PluginSystem: 'Lounge AC' Registration ignored, Plugins are not enabled.
There is a clue in the log there, I'm not sure what it means, I can't find an options to turn on/off plugins anywhere.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: No plugins with Docker

Post by solarboy »

solarboy wrote: Thursday 11 January 2024 21:12 There is a clue in the log there
If you start Domoticz with the event-system disabled , Python (and plugins) are also disabled.

If you start Domoticz with the event-system ENABLED and then turn it off, Python (and plugins) remains functional.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest