2025.1 Docker Tips/Tricks or issues

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

Moderator: leecollings

Post Reply
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

2025.1 Docker Tips/Tricks or issues

Post by eddieb »

He guys,

Questions ...
1 can't we get a dedicated docker section on this forum where people can share there experiances and configs for docker based installs ?
2 I am lost with my new docker based install of domoticz,
it worked, running on a rpi5 with latest raspbian and docker installed. managed thru dockge
all looked ok for a couple of days, had access on port 80 and 443
database filled up with some mqttad discovered stuf from an external source
somewhere last week something happend and now I get a "Not found" page ...
I don't see anything bad in the logs ...

Code: Select all

2025-06-08 19:07:33.818  Launch: Begin container self-repair
2025-06-08 19:07:33.986  Launch: End container self-repair
2025-06-08 19:07:33.987  Launch: Running customstart.sh
2025-06-08 19:07:34.014  Status: Domoticz V2025.1 (build 16723) (c)2012-2025 GizMoCuz
2025-06-08 19:07:34.014  Status: Build Hash: de58d06b7, Date: 2025-06-08 09:32:12
2025-06-08 19:07:34.014  Status: Startup Path: /opt/domoticz/
2025-06-08 19:07:34.024  ESC[1;31mError: Default admin password has NOT been changed! Change it asap!ESC[0;0m
2025-06-08 19:07:34.040  Sunrise: 05:19:00 SunSet: 21:58:00
2025-06-08 19:07:34.040  Day length: 16:39:00 Sun at south: 13:38:00
2025-06-08 19:07:34.040  Civil twilight start: 04:31:00 Civil twilight end: 22:46:00
2025-06-08 19:07:34.040  Nautical twilight start: 03:14:00 Nautical twilight end: 00:03:00
2025-06-08 19:07:34.040  There is no astronomical twilight in the space of 24 hours
2025-06-08 19:07:34.085  Status: PluginSystem: Started, Python version '3.11.2', 0 plugin definitions loaded.
2025-06-08 19:07:34.086  Active notification Subsystems: email (1/13)
2025-06-08 19:07:34.087  Status: WebServer(HTTP) started on address: :: with port 8080
2025-06-08 19:07:34.091  Status: WebServer(SSL) started on address: :: with port 443
2025-06-08 19:07:34.092  Starting shared server on: :::6144
2025-06-08 19:07:34.092  Status: TCPServer: shared server started...
2025-06-08 19:07:34.092  Status: mDNS: Service started
2025-06-08 19:07:34.092  mDNS: Service: _http._tcp.local.:443 for Hostname: domoticz (1 socket)
2025-06-08 19:07:34.092  Status: RxQueue: queue worker started...
2025-06-08 19:07:36.094  Status: Motherboard: System: ODroid/Raspberry
2025-06-08 19:07:36.094  Status: Motherboard: Hardware Monitor: Started (OStype Linux)
2025-06-08 19:07:36.094  Status: NotificationSystem: thread started...
2025-06-08 19:07:36.095  Status: EventSystem: reset all events...
2025-06-08 19:07:36.095  Status: EventSystem: reset all device statuses...
2025-06-08 19:07:36.121  Status: Python EventSystem: Initializing event module.
2025-06-08 19:07:36.121  Status: EventSystem: Started
2025-06-08 19:07:36.121  Status: EventSystem: Queue thread started...
Any suggestions in where to start fixing this ?
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
waltervl
Posts: 5842
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: 2025.1 on Docker issues

Post by waltervl »

There is a basic install forum. If you put docker in the title it should be visible for the other users.
I did this now for you.
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
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: 2025.1 Docker Tips/Tricks or issues

Post by gizmocuz »

All looks good. Are you sure you have it running on port 80? Not 8080 (Which is the default)

Anyway, you also have to copy/paste your docker compose config script here

Assuming your docker instance name is still Domoticz (without a config script we have no idea....) can you SSH into the docker with

Code: Select all

docker exec -it domoticz bash
If yes, type 'exit' to get out of it
Quality outlives Quantity!
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

here you go

Code: Select all

services:
  domoticz:
    container_name: domoticz
    image: domoticz/domoticz:beta
    restart: on-failure
    hostname: domoticz
    dns_search: .
    volumes:
      - ./config:/opt/domoticz/userdata
      - ./config/www:/opt/domoticz/www
    #     - ./config/www/templates:/opt/domoticz/www/templates
    ports:
      - 80:8080
      - 443:443
      - 6144:6144
    environment:
      - TZ=Europe/Amsterdam
      - WWW_PORT=8080
      - SSL_PORT=443
networks: {}
this worked fine until a week or so ago I got the "not found" page
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

so, stupid me
found it
the overlay on

Code: Select all

  - ./config/www:/opt/domoticz/www
causes this strange behaviour...
removed it and no I am back in business
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
janpep
Posts: 270
Joined: Thursday 14 March 2024 10:11
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by janpep »

For what it's worth. I just installed a Raspberry pi 3B+ for my son with Bookworm LITE + Docker with my own approach.
I'm considering publishing it on 'Show My Projects' if there is interest. There are many roads that lead to Rome. Choosing one route or another also depends on your personal situation, wishes and skills.
I am NOT writing this to discuss what the best way is to do something, but to show my approach.
  • I have a (huge) Step-by-Step description / cookbook of the installation of the following using Bookworm LITE.
    I skipped the Desktop version, because it uses a significant amount of memory on the Raspberry 3B+ and is actually not needed for the following use.
  • It descibes the creation of containers for Domoticz, MQTT, Zigbee2mqtt, Zwave-js-ui, Wireguard VPN, IT-Tools, with the basic things for configuration. Equipped with iptables firewall, which only allows connection from the local network, from the self-defined docker network (each application starts with its own fixed IP address) or via Wireguard connection.
  • No use of yml files, but all run commands in a home made script called 'container-actions.sh'. This makes it possible to do all of the Create, Recreate, Remove, Start, Stop, Restart actions for each of the applications used in one place. Also the required directories are created from this script under /home/user/containers under which all containers are created.
  • The Step-by-Step description also gives most of the required settings. Among other things with which the applications approach each other (e.g. MQTT) via the assigned "docker IP addresses"
  • A number of 'action scripts', which can be connected to a button in Domoticz and place a 'triggerfile' for actions to run outside the container, with a script 'check-triggerfiles.sh', which checks from the crontab whether one of the trigger files exists and then performs the required actions. Think of rebooting, stopping, starting or restarting containers.
    In domoticz, among other things, a number of custom pages to call up a number of useful things in iFrame: Zigbee2MQTT, Zwave-JS-UI, IT-Tools and handy listings of ShowalldeviceValues, ShowAllEvents, ShowAllSceneValues, ShowAllSchedules, ShowAllUserVariables.
So once this is setup and common actions can be called from Domoticz custom switches, you hardly need to SSH to the machine.
Perhaps I missed a few things that can be improved, but it leads to a basically working situation from which you can focus on the setup and use of the running applications.
Dz on Ubuntu VM on DS718+ behind FRITZ!Box.
EvoHome; MELCloud; P1 meter; Z-Stick GEN5; Z-Wave-js-ui; Sonoff USB-Dongle Plus-E; Zigbee2Mqtt; MQTT; Greenwave powernodes 1+6; Fibaro switch, plugs, smoke; FRITZ!DECT 200. Scripts listed in profile interests.
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

Like gizmocuz I go for the dockge method.
basic raspbian lite, docker install, manually installed dockge.
from there on everything in dockge
- dockge (self)
- dozzle
- watchtower
- mosquitto
- mqtt-explorer
- node-red
- tasmodamin
- zigbee2mqtt

all have their own yml in /opt/stacks and can be mananged from the cli but also from within dockge which I like
(and if I wasn't able to make stupid mistakes) it works very nice
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

So, now I am trying to install https://github.com/jvanderzande/domotic ... plugin.git

bookworm seems not to have pip3 ...
apt install python3-pip does something but

pip3 install -r requirements

gives an error: externally-managed-environment

suggestions ?
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
FireWizard
Posts: 1886
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by FireWizard »

Hi @Eddie,

Have a look at https://www.raspberrypi.com/documentati ... spberry-pi

Goto the chapter, called Python on the Raspberry Pi.

Regards
User avatar
waltervl
Posts: 5842
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by waltervl »

eddieb wrote: Monday 09 June 2025 12:36 So, now I am trying to install https://github.com/jvanderzande/domotic ... plugin.git

bookworm seems not to have pip3 ...
apt install python3-pip does something but

pip3 install -r requirements

gives an error: externally-managed-environment

suggestions ?
Are you doing this in the container with the customstart.sh file? Or outside the container?
There is a Domoticz wiki page section about this for normal installs https://wiki.domoticz.com/Using_Python_ ... ules_fails I do not know how this relates to the installs within the Domoticz 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
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

I started trying to do this outside the container, on OS level as root ...
I need the python modules inside in the end ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
waltervl
Posts: 5842
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by waltervl »

So what if you use in the container.

Code: Select all

python3 -m pip install -r requirements.txt --upgrade
You can go into the container with

Code: Select all

docker exec -it domoticz
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

inside the container it seems to work

Code: Select all

root@domoticz:/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin# python3 -m pip install -r requirements.txt --upgrade
Collecting solaredge_modbus==0.7.0 (from -r requirements.txt (line 1))
  Downloading solaredge_modbus-0.7.0-py3-none-any.whl.metadata (11 kB)
Collecting pymodbus>=2.4.0 (from solaredge_modbus==0.7.0->-r requirements.txt (line 1))
  Downloading pymodbus-3.9.2-py3-none-any.whl.metadata (15 kB)
Downloading solaredge_modbus-0.7.0-py3-none-any.whl (10 kB)
Downloading pymodbus-3.9.2-py3-none-any.whl (165 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 165.2/165.2 kB 3.0 MB/s eta 0:00:00
Installing collected packages: pymodbus, solaredge_modbus
Successfully installed pymodbus-3.9.2 solaredge_modbus-0.7.0

[notice] A new release of pip is available: 24.0 -> 25.1.1
[notice] To update, run: pip install --upgrade pip
how does this survive a container upgrade ?
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by eddieb »

Code: Select all

2025-06-10 10:44:39.799 Error: Solaredge: (SolarEdge_ModbusTCP) failed to load 'plugin.py', Python Path used was '/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin/:/usr/lib/python311.zip:/usr/lib/python3.11:/usr/lib/python3.11/lib-dynload:/opt/venv/lib/python3.11/site-packages:/opt/venv/local/lib/python3.11/dist-packages:/opt/venv/lib/python3/dist-packages:/opt/venv/lib/python3.11/dist-packages'.
2025-06-10 10:44:39.800 Error: Solaredge: Traceback (most recent call last):
2025-06-10 10:44:39.800 Error: Solaredge: File "/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 54, in <module>
2025-06-10 10:44:39.800 Error: Solaredge: import solaredge_modbus
2025-06-10 10:44:39.800 Error: Solaredge: File "/opt/venv/lib/python3.11/site-packages/solaredge_modbus/__init__.py", line 7, in <module>
2025-06-10 10:44:39.800 Error: Solaredge: from pymodbus.client.sync import ModbusTcpClient
2025-06-10 10:44:39.800 Error: Solaredge: ModuleNotFoundError: No module named 'pymodbus.client.sync'
2025-06-10 10:45:50.445 Error: Solaredge hardware (4) thread seems to have ended unexpectedly 
ok, it does not start ..
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
waltervl
Posts: 5842
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: 2025.1 Docker Tips/Tricks or issues

Post by waltervl »

Better report this on the plugin support forum topic or GitHub repository. Seems a mismatch in module versions.

Edit: regarding your question does this stay in a Docker container update: No, but therefore the customstart.sh file has to be created to do the python module install in the container on every update. See the docker wiki page for instructions.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest