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

Post Reply
wizzard72
Posts: 116
Joined: Friday 20 December 2013 7:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by wizzard72 »

wizzard72 wrote: Thursday 30 December 2021 12:14 I'm running domoticz in a docker container. The problem that I have is that my plugin uses the Session() to communicate. If I request a page it takes about 1 minute or longer to complete. On my test VM it takes seconds. This causes the plugin to end unexpectedly. I checked if requests (Session is part of requests) is installed inside the docker container and it is.

Any clue what might be the problem?
Solved it, was a problem with the connection string.
ferrosk
Posts: 44
Joined: Saturday 26 August 2017 20:13
Target OS: Linux
Domoticz version: 2023.2
Contact:

Re: Oficial Docker Container

Post by ferrosk »

Thanks for updating docker image domoticz/domoticz:stable with latest stable version 2022.1.

But for testing I need to use also previous stable version 2021.1 and it seems that domoticz/domoticz:2021.1 docker image (updated 3 days ago) contains 2022.1 version instead of 2021.1! Could you check it please?
Domoticz 2023.2 on Odroid M1 and Armbian
MySensors (RFM69 Serial GW): bunch of DIY sensors/devices
Zwave (Z-Wave.me RaZberry board): Danfoss devices
Zigbee (Sonoff Dongle Plus): IKEA, Tesla devices
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 »

Yes, there was a problem in the build script of the stable release... The version tag was hard-coded.
So the first stable was overwritten.
This has been corrected, I will remove the 2021.stable version from the hub
You don't want to use that version anyway
Quality outlives Quantity!
tarmacalastair
Posts: 94
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Oficial Docker Container

Post by tarmacalastair »

Isn't it still useful to have older versions available, for testing?

I'm still trying to resolve a problem introduced between beta 12259 & 12260. It was really difficult to find older versions for testing.

Apologies, my issue is not related to Docker but just agreeing with ferrosk about having an older version available...
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
Gravityz
Posts: 583
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:

Re: Oficial Docker Container

Post by Gravityz »

if you create/update containers i assume you keep the old container
from that container you can still save that image which you can use for building new containers.
relying on images which you can download is never a good thing because it makes you sensitive and dependent on stuff online

tarmacalastair wrote: Friday 04 February 2022 17:19 Isn't it still useful to have older versions available, for testing?

I'm still trying to resolve a problem introduced between beta 12259 & 12260. It was really difficult to find older versions for testing.

Apologies, my issue is not related to Docker but just agreeing with ferrosk about having an older version available...
ferrosk
Posts: 44
Joined: Saturday 26 August 2017 20:13
Target OS: Linux
Domoticz version: 2023.2
Contact:

Re: Oficial Docker Container

Post by ferrosk »

gizmocuz wrote: Friday 04 February 2022 16:50 Yes, there was a problem in the build script of the stable release... The version tag was hard-coded.
So the first stable was overwritten.
This has been corrected, I will remove the 2021.stable version from the hub
You don't want to use that version anyway
Thanks Gizmocuz for checking and correcting the build script! As mentioned, I do want to use 2021.1 version for testing ;). I'm developing some plugin and need to test it for 2021.1 because I use it for my home automation system and will still use it for some time until I switch to the new stable. (I face an issue with the plugin on 2022.1 although it is running fine on 2021.1. and it seems to be related to changes done in new Domoticz version). As other users mentioned here, it is good idea to keep old versions still available for testing...
Domoticz 2023.2 on Odroid M1 and Armbian
MySensors (RFM69 Serial GW): bunch of DIY sensors/devices
Zwave (Z-Wave.me RaZberry board): Danfoss devices
Zigbee (Sonoff Dongle Plus): IKEA, Tesla devices
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Oficial Docker Container

Post by DAVIZINHO »

Hello!.
Someone here are runing the version 2022.1.14228 or 2022.1.14223 of docker container?
i must rollback to the 2022.1.14220 because the newest version stop the container with errors :-(

someone with this problems?
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 »

DAVIZINHO wrote: Saturday 26 February 2022 12:29 Hello!.
Someone here are runing the version 2022.1.14228 or 2022.1.14223 of docker container?
i must rollback to the 2022.1.14220 because the newest version stop the container with errors :-(

someone with this problems?
Do you use Python plugins? As there was a major change on that. Some plugins still fail. See viewtopic.php?f=6&t=38086
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Oficial Docker Container

Post by DAVIZINHO »

waltervl wrote: Saturday 26 February 2022 20:46
DAVIZINHO wrote: Saturday 26 February 2022 12:29 Hello!.
Someone here are runing the version 2022.1.14228 or 2022.1.14223 of docker container?
i must rollback to the 2022.1.14220 because the newest version stop the container with errors :-(

someone with this problems?
Do you use Python plugins? As there was a major change on that. Some plugins still fail. See viewtopic.php?f=6&t=38086
Thanks a lot. Yes, I use plugings, and its looks this is my problem.
Thanks!
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 »

Please post your findings also in that python topic, including crash log.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Oficial Docker Container

Post by DAVIZINHO »

waltervl wrote: Saturday 26 February 2022 21:16 Please post your findings also in that python topic, including crash log.
yes, I posted my log in this post, and I try to help with information
Johanv2600
Posts: 3
Joined: Sunday 29 March 2015 17:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by Johanv2600 »

EDIT: please ignore previous posting. I thought I was comparing behaviour on rpi 3b vs 2b with puzzling differences. However turns out it was 3b vs 1b and differences therefore as expected. Sorry to have wasted your time.
Last edited by Johanv2600 on Sunday 06 March 2022 17:56, edited 1 time in total.
RPi B+ and 3B+
Kaku(Coco), Woonveilig(Egardia), ZigBee, P1-meter, HUE, Trådfri
Johanv2600
Posts: 3
Joined: Sunday 29 March 2015 17:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by Johanv2600 »

EDIT: for the same reason as above post, contents no longer relevant (apart from hoping an arm32v6 image of Domoticz2022.1 may be made available?)
Last edited by Johanv2600 on Sunday 06 March 2022 18:04, edited 1 time in total.
RPi B+ and 3B+
Kaku(Coco), Woonveilig(Egardia), ZigBee, P1-meter, HUE, Trådfri
tarmacalastair
Posts: 94
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Oficial Docker Container

Post by tarmacalastair »

If you scroll back in this thread a bit you will see that I accidentally tried to run the docker image on a Pi1 and had no success. I hadn't even realised it was my very old Pi until I checked it. Same SD card ran fine on a 3b.

Afraid I haven't tested on a Pi2 though I'm afraid....
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
xxLeoxx93
Posts: 16
Joined: Wednesday 22 March 2017 21:48
Target OS: Windows
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by xxLeoxx93 »

Hi all,

sorry if I'm not right with this here :(
I switched to docker recently and it works perfectly. Except one script that used to save a cameraimage localy and attache it to a telegram message.
So far I've used:

Code: Select all

        
        os.execute('wget -O  /var/tmp/camsnapshot.jpg http://192.168.178.10:8090/camsnapshot.jpg?idx=1')
        os.execute('curl -s -X POST "https://api.telegram.org/bot"xxxxxxxxxxxxxx"/sendPhoto" -F chat_id=-XXXXXXXXX -F photo="@/var/tmp/camsnapshot.jpg"')
Now that doesn't work because I guess domoticz can't access that folder right? But also if I try to save the image to a mounted folder that way (" /opt/domoticz/userdata/camsnapshot.jpg") it will not save anything.
Any clues how I can fix that?
Thanks!
Gravityz
Posts: 583
Joined: Wednesday 16 December 2015 19:13
Target OS: NAS (Synology & others)
Domoticz version: 2022.2
Location: Netherlands
Contact:

Re: Oficial Docker Container

Post by Gravityz »

did you mount /opt/domoticz/userdata to an external directory?

if so you probably are missing the wget command.

if you terminal your way into the docker container you can install it with

apt-get install wget (maybe first use apt-get -yy update)

please note the docker container only has a very limited kernel without all the known commands(curl is included in recent builds)
xxLeoxx93
Posts: 16
Joined: Wednesday 22 March 2017 21:48
Target OS: Windows
Domoticz version:
Contact:

Re: Oficial Docker Container

Post by xxLeoxx93 »

Gravityz wrote: Tuesday 12 April 2022 17:37 did you mount /opt/domoticz/userdata to an external directory?

if so you probably are missing the wget command.

if you terminal your way into the docker container you can install it with

apt-get install wget (maybe first use apt-get -yy update)

please note the docker container only has a very limited kernel without all the known commands(curl is included in recent builds)
Thanks a lot, that did the trick!
The only issue I've now is that I need to roatate the image in between those two lines by 90 degrees and the "convert" command is also not available (install would need a lot of additional packages...)
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 »

Instead of wget you should be able to use curl to download the image

http://www.compciv.org/recipes/cli/down ... with-curl/
Quality outlives Quantity!
sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

Re: Oficial Docker Container

Post by sammyke007 »

What I do now, is create an image by myself (in Portainer > Images > Build a new image) that includes some packages needed by scripts that I use.

My Dockerfile/code to create this image that I call domoticzpacked:2022.1 looks like this:

Code: Select all

FROM domoticz/domoticz:2022.1

RUN apt-get update && \
	apt-get dist-upgrade -y && \
	apt-get install -y \
	wget \
	oathtool \
	jq \
	iputils-ping \
    nano
This uses the "official" domoticz container with stable v2022.1. You can change this to latest, ...
It adds the packages wget, jq, nano, ... and creates a new image domoticzpacked:2022.1.

I then use Docker Compose (Portainer Stacks) with the following code:

Code: Select all

version: '3.3'
services:
  domoticz:
    image: domoticzpacked:2022.1
    container_name: domoticzpacked
    restart: unless-stopped
    # Pass devices to container
    # devices:
    #   - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
    ports:
      - '8080:8080'
      - '443:443'
    volumes:
      - /home/pi/domoticz/:/opt/domoticz/userdata
      - /home/pi/domoticz/:/home/pi/domoticz/
    environment:
      - TZ=Europe/Brussels
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log
      - WWW_PORT=8080 
      - SSL_PORT=443 
I mount - /home/pi/domoticz/:/home/pi/domoticz/ so I didn't have to change all my paths in my scripts after migrating to Docker.
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Oficial Docker Container

Post by DAVIZINHO »

hello, I have maybe a stupid question but its inportant to me.
How can I see the status of domoticz in the console?
this command not works:
/etc/init.d/domoticz.sh status
service domoticz.sh status

I have a init script in my setup, and after this script i want to reboot the domoticz.sh but i dont know how to run the status, and then the tipically stop and start of the service :-(
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest