Oficial Docker Container Topic is solved

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

nitpicker
Posts: 69
Joined: Tuesday 29 July 2014 10:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: Oficial Docker Container

Post by nitpicker »

even sudo docker volume create portainer_data results in nothing...
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Oficial Docker Container

Post by Sjonnie2017 »

What do you mean? How do you check? "results in nothing" says... well simply... nothing ;)
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
nitpicker
Posts: 69
Joined: Tuesday 29 July 2014 10:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: Oficial Docker Container

Post by nitpicker »

when I click 'Enter'. Then the cursus moves to a new line and nothing happens until I click 'CTRL-C'.
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Oficial Docker Container

Post by Sjonnie2017 »

I think you should best start over. And you might want to read the documentation on docker and docker-compose. This is not meant as a down play but you should get the basics before you endeavour into Dockerization.
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
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Oficial Docker Container

Post by waltervl »

For the docker users here, is the system reboot function (menu setup - reboot) working in a Domoticz Docker? Asking for viewtopic.php?f=6&t=39878
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: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Oficial Docker Container

Post by Sjonnie2017 »

waltervl wrote: Thursday 09 February 2023 19:25 For the docker users here, is the system reboot function (menu setup - reboot) working in a Domoticz Docker? Asking for viewtopic.php?f=6&t=39878
I haven't tested because restarting the container is fast and efficient enough.
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
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Oficial Docker Container

Post by gizmocuz »

nitpicker wrote: Thursday 09 February 2023 17:29 I don't know why, but I cannot start containers.

Docker compose can be installed with

Code: Select all

sudo apt-get update && sudo apt-get upgrade

curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker ${USER}
sudo systemctl enable docker
sudo reboot
From this moment you should not have to use 'sudo'

Anyway, you should also not chmod +x the docker compose configuration file (docker-compose.yml)

There is also no need to create any volumes as the configuration file of the Domoticz docker compose file already does this for you

Code: Select all

volumes:
      - ./data:/opt/domoticz/userdata
What the above means is, create a local volume 'data' (./data)
This is great as here is stored everything you need.
Make a backup of this folder (or even better, the folder where you placed the docker-compose.yml file in (here will also be the data folder created)

To start the domoticz docker you then issue

Code: Select all

docker compose up -d
or for previous docker-compose installations

Code: Select all

docker-compose up -d
(note the dash between docker and compose)

That's all, and now you should be able to browse to port 8080 of this machine

If you need to connect a USB device to the docker

issue

ls -al /dev/serial/by-id

you should see your serial devices

Next you edit the file docker-compose.yml

Code: Select all

# devices:
    #   - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
remove the # infront of the lines (take care of the indenting of the lines!)

make sure the serial line contains the right path (that you found above)

instead of /dev/ttyACM0 you can use /dev/ttyUSB0 and/or /dev/ttyUSB1

next you restart the docker container with

docker compose restart

or
docker compose stop
docker compose up -d

Now when you refresh the hardware page in domoticz, you should see the serial port

And that's it

And as said, please do some reading about docker-compose, you need to do it once and it will give you pleasure for the rest of live :mrgreen:
Quality outlives Quantity!
nitpicker
Posts: 69
Joined: Tuesday 29 July 2014 10:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: Oficial Docker Container

Post by nitpicker »

It is working now, thanks for your help.

Domoticz, mqtt and portainer are all working in their docker containers.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Oficial Docker Container

Post by hoeby »

waltervl wrote: Thursday 09 February 2023 19:25 For the docker users here, is the system reboot function (menu setup - reboot) working in a Domoticz Docker? Asking for viewtopic.php?f=6&t=39878
This doesn't work in docker.
I run the latest stable, maybe if something if changed, it works in the beta. I can't test beta, because i only want to run stable versions
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
kiddigital
Posts: 435
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Oficial Docker Container

Post by kiddigital »

Reboot function probably does not work as the containers stops automatically when the Domoticz process stops.

So when requesting a reboot, processes stop and the container exits.

But you can specify ‘—restart unless-stopped’ as docker command parameter which restarts a stopped container.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
hjzwiers
Posts: 163
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by hjzwiers »

Why doesn't anyone post a working set of docker compose files for the less competent under us ....

I have a running zwave-js, domoticz running under docker containers set up through docker compose. I set up mosquitto direcly because I could not set this up through docker. It was supposed to be a smooth transition, but I am already working on it for two days .....

I would like to setup swag though a container as well

I have also setup portainer directly.

I found out why I could not connect to the Zwave stick, found someone with the same problem: solved

I have still have trouble with nefiteasyhttpserver, which uses the same port 3000 as zwave-js .....
I have trouble with getting acces from outside though 4443:443, but i am looking for the files I need to add to get this right. I have looked for an good tutorial but there is none .....

version: '3.3'

services:
domoticz:
container_name: domoticz
image: domoticz/domoticz:latest
restart: unless-stopped
devices:
- "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
- “4443:443”
volumes:
- ./domoticz/config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
networks:
- domoticz
- proxy

version: '3.7'
services:
zwave-js-ui:
container_name: zwave-js-ui
image: zwavejs/zwave-js-ui:latest
restart: always
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=mysupersecretkey
- ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
# Uncomment if you want logs time and dates to match your timezone instead of UTC
# Available at https://en.wikipedia.org/wiki/List_of_t ... time_zones
- TZ=Europe/Amsterdam
networks:
- zwave
devices:
# Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
# Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
- '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
volumes:
- /home/hjz/docker/zwjs/store:/usr/src/app/store
ports:
- '8091:8091' # port for web interface
- '3000:3000' # port for Z-Wave JS websocket server
networks:
zwave:
volumes:
zwave-config:
name: zwave-config
User avatar
andreo
Posts: 42
Joined: Friday 07 August 2015 21:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Location: Anna Paulowna, Netherlands
Contact:

Re: Oficial Docker Container

Post by andreo »

here is my compose file

Code: Select all

version: '3.3'
services:
    rpi-influxdb:
        restart: always
        ports:
            - '8086:8086'
        container_name: myInfluxDB
        volumes:
            - '/var/mydata/influxdb:/data'
        image: hypriot/rpi-influxdb
    
    grafana:
        restart: always
        ports:
            - '3010:3000'
        volumes:
            - '/var/lib/grafana:/grafana_data'
        container_name: myGrafana
        image: grafana/grafana
    
    eclipse-mosquitto:
        restart: always
        ports:
            - '1883:1883'
            - '9001:9001'
        container_name: myMosquitto
        volumes:
            - '/var/mydata/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf'
            - '/var/mydata/mosquitto/data:/mosquitto/data'
            - '/var/mydata/mosquitto/log:/mosquitto/log'
        image: 'eclipse-mosquitto:latest'
    
    node-red:
        restart: always
        ports:
            - '1880:1880'
        volumes:
            - '/var/mydata/nodered/data:/data'
        container_name: myNodered
        image: 'nodered/node-red:latest'
    
    domoticz:
        image: domoticz/domoticz:beta
        container_name: myDomoticz
        restart: unless-stopped
            # Pass devices to container
        devices:
            - "/dev/serial/by-id/usb-Arduino__www.arduino.cc__Arduino_Mega_2560_852353331353518060D0-if00:/dev/ttyACM0"
            - "/dev/snd/:/dev/snd/"
        ports:
            - "8080:8080"
            - "8088:8088"
            - "8443:443"
            - "5000:5000"
            - "1012:1012"
            - "49000:49000"
        volumes:
            - ./userdata:/opt/domoticz/userdata
        environment:
            - TZ=Europe/Amsterdam
            - LOG_PATH=/opt/domoticz/userdata/domoticz.log

    nefiteasy-http-server:
        restart: always
        ports:
            - '3000:3000'
        container_name: myNefitEasy
        environment:
            - NEFIT_SERIAL_NUMBER=4180xxxxx
            - NEFIT_ACCESS_KEY=BNBsFYnZ4S6xxxxx
            - NEFIT_PASSWORD=xxxx
        image: trafex/nefiteasy-http-server

    duplicati:
        image: lscr.io/linuxserver/duplicati:latest
        container_name: myDuplicati
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=Etc/UTC
            - CLI_ARGS= #optional
        volumes:
            - /var/mydata/duplicati:/config
            - /var/mydata:/source
            - /opt:/source     
        ports:
            - 8200:8200
        restart: unless-stopped
This install the next containers: NodeRed | NefitEasy | Duplicati | Grafana | Mosquitto | InfluxDB and Domoticz
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
hjzwiers
Posts: 163
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by hjzwiers »

Wow, it seems as though you took care of domotics and nefit

How is acces from the outside with this setup?
And I also have IDetect running whish needs tweaking also.

But this seems like a good way to start! I may give it a go. I wonder how I can make the transition of 35 Zwave devices better than it is with the current setup.
hjzwiers
Posts: 163
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by hjzwiers »

I also see that you do not run from Zwave-js ....
User avatar
andreo
Posts: 42
Joined: Friday 07 August 2015 21:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Location: Anna Paulowna, Netherlands
Contact:

Re: Oficial Docker Container

Post by andreo »

hjzwiers wrote: Monday 31 July 2023 8:21 Wow, it seems as though you took care of domotics and nefit

How is acces from the outside with this setup?
And I also have IDetect running whish needs tweaking also.

But this seems like a good way to start! I may give it a go. I wonder how I can make the transition of 35 Zwave devices better than it is with the current setup.
I connect from the outside using a VPN and I do not use any Zwave devices
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
hjzwiers
Posts: 163
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by hjzwiers »

I now see that Zwave-js uses port 3000 and nefit also uses that poort, so i need to change this but I am wondering which one
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Oficial Docker Container

Post by waltervl »

The ZwaveJS one as that is not used by Domoticz and others. It is used by HomeAssistant (WebSocket integration)
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
Marathon2010
Posts: 27
Joined: Tuesday 02 February 2021 23:02
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Oficial Docker Container

Post by Marathon2010 »

hjzwiers wrote: Tuesday 01 August 2023 15:27 I now see that Zwave-js uses port 3000 and nefit also uses that poort, so i need to change this but I am wondering which one
I've implemented ZWaveJS2MQTT mid last year under docker. I'm using port 8091 to open control panel of Zwave. Does that help?
Synology NAS DS920+ DSM7 (Docker) | Integrations: Audio, Heating, Gas, Electricity, Water, Alarm, Car, Camera, Doorbell, Garage | SW: Tasmota, DzVents, Pushbullet | Plugins: GPSLogger, BatteryLevel, Hyundai KIA
hjzwiers
Posts: 163
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by hjzwiers »

Then why do I see port 3000 in every script?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Oficial Docker Container

Post by waltervl »

hjzwiers wrote: Wednesday 02 August 2023 12:46 Then why do I see port 3000 in every script?
As that is a default of ZwavejsUI for HomeAssistant integration? But not related to Domoticz docker so slightly off topic in this discussion.
You can use 3010:3000 to move the original 3000 to 3010 to get it out of Nefiteasy http server
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