Page 1 of 1

From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 9:51
by KlausR
Hey,

first i have to admit i'm still a beginner in terms of linux and domoticz. Hope, i'll be able to give the relevant information to a helping hand... ;)

Years ago i managed to integrate all of my 433-plugs, working perfectly. i try go get that change to docker mentioned above getting work with my 433 switches. Receiver and sender are attached to raspberry gpio.

In native installation, i installed wiringPi and RpiUtils to get codesend, in domoticz i added dummy hardware units, each switch with an aciton on/off script like this "script:///433Utils/RPi_utils/codesend xxxxxxx"

Got stable docker image run with this composer script....

Code: Select all

version: '2'

services:
  domoticz:
    image: domoticz/domoticz
    container_name: domoticz
    restart: unless-stopped
    # Pass devices to container
    # devices:
    #   - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
    ports:
      - "8440:8080"
      - "8443:443"
    volumes:
      - ./config:/home/Docker1evp/.config/domoticz
    environment:
      - TZ=Europe/Berlin
      #- LOG_PATH=/opt/domoticz/userdata/domoticz.log
... and imported domoticz.db But that's not enough to have switches getting work. How could i manage that?

Thanx in advance,

Klaus

Re: From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 12:55
by waltervl
Why go to a docker? For a normal RPi installation this is not advised as it will take special actions to update later on (like you notice now).
I have no clue how the GPIO is made available in a docker environment. Perhaps somebody else knows....

Re: From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 13:07
by KlausR
waltervl wrote: Tuesday 22 March 2022 12:55 Why go to a docker?
This Pi is on OMV4 stretch. In order to run upgrade script to OMV5 buster, domoticz plugin needs to be uninstalled. So my plan was to go to docker first, get image running with gpios, then export that container, upgrade to buster, and import the container...
I have no clue how the GPIO is made available in a docker environment
I assume RpiUtis with codesend have to be installed in docker container also. But i got no clue how to manage that...

Re: From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 13:17
by waltervl
Why does Domoticz has to be uninstalled when upgrading to OMV5?

Just my thoughts:
- Make a copy of your complete OMV4 OS environment including Domoticz on a separate SD card.
- Update to OMV5 (domoticz will not run)
- Update Domoticz with ./updaterelease and domoticz will run.

If fails take the backup SD card.

Re: From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 13:29
by KlausR
waltervl wrote: Tuesday 22 March 2022 13:17 - Update Domoticz with ./updaterelease and domoticz will run.
... with updaterelease in /opt/domoticz, i guess? Gonna try this, backup cards are done. Thank you, Walter. I will report...

Re: From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 13:38
by waltervl
./updaterelease should be in the installation folder of Domoticz (normally $HOME/domoticz)
But it depends how you installed Domoticz in the past. With the default Raspberry Pi/Ubuntu installation: 'curl -sSL install.domoticz.com | sudo bash' ?

Re: From native installation to Docker image (stable)

Posted: Tuesday 22 March 2022 14:42
by waltervl
OK, I see that the installation of domoticz on OMV is something special and possible also not working anymore on OMV5 and only working with a docker https://forum.openmediavault.org/index. ... /&pageNo=7

So then my thoughts are not correct and you will need a docker after all on OMV5 (not only for migrate).

Re: From native installation to Docker image (stable)

Posted: Monday 28 March 2022 15:42
by KlausR
Surprise surprise, i had luck ;)

Old installation was by OMV-plugin, it installed to/opt/domoticz. Had to be uninstalled due to upgrade process. But directory remained...

I just called "sudo curl -sSL install.domoticz.com | sudo bash", let it choose advised directory (home/user/domoticz)... and really, all my devices and plans were there!!!

Thanx a lot for your help, Walter

Re: From native installation to Docker image (stable)

Posted: Monday 28 March 2022 16:06
by waltervl
Congratulations! :D