From native installation to Docker image (stable)

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

Moderator: leecollings

Post Reply
KlausR
Posts: 5
Joined: Wednesday 23 August 2017 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

From native installation to Docker image (stable)

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

Re: From native installation to Docker image (stable)

Post 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....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
KlausR
Posts: 5
Joined: Wednesday 23 August 2017 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: From native installation to Docker image (stable)

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

Re: From native installation to Docker image (stable)

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
KlausR
Posts: 5
Joined: Wednesday 23 August 2017 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: From native installation to Docker image (stable)

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

Re: From native installation to Docker image (stable)

Post 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' ?
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: 5907
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: From native installation to Docker image (stable)

Post 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).
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
KlausR
Posts: 5
Joined: Wednesday 23 August 2017 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: From native installation to Docker image (stable)

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

Re: From native installation to Docker image (stable)

Post by waltervl »

Congratulations! :D
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: No registered users and 1 guest