Page 2 of 2
Re: The great Docker problem*
Posted: Monday 29 April 2024 21:14
by Lizard
You need to uncomment devices:
and fix the indentation of that and of the usb stick
Re: The great Docker problem*
Posted: Monday 29 April 2024 22:09
by njlammerts
it already goes wrong at line 4, even with the device uncommented
Show me the right way instead of saying that something is wrong..
Re: The great Docker problem*
Posted: Monday 29 April 2024 23:01
by waltervl
njlammerts wrote: ↑Monday 29 April 2024 22:09
Show me the right way instead of saying that something is wrong..
I don't think this is the appropriate way to ask for help....
You should remove the # and a space to get the right indentation.
See the dashes after devices and ports are in the same column now (as an example, use your own usb by-id device)
Code: Select all
container_name: domoticz
restart: unless-stopped
# Pass devices to container
devices:
- "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
Re: The great Docker problem*
Posted: Tuesday 30 April 2024 10:13
by Kedi
Don't put a screenprint of that file but post that exact file here and I will run that compose file and see what happens at my test system.
Re: The great Docker problem*
Posted: Tuesday 30 April 2024 12:32
by njlammerts
I put the prnt scrn to show how my docker-compose.yml file is made, because one says I have to check the exact indentation of the yml file and another says to uncomment devices. And it still goes wrong at line 4. when running "docker-compose up -d" If there is a fault, please tell me what is wrong and what I am doing wrong in stead of saying something is not right. This makes me frustrated and I apologize for that. SORRY!. I want to learn from my mistakes, but you have to point them out
But as I am trying to make clear is that I follow the link Kedi replied on April 01,
and when I use the domoticz docker compose file as shown on that page, I create a docker-compose.yml file in the /opt/domoticz dir with nano and put in the text as shown below
Code: Select all
version: '3.3'
services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
environment:
- TZ=Europe/Amsterdam
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
and when running "docker-compose up -d" I get
yaml: line 4: did not find expected key
Re: The great Docker problem*
Posted: Tuesday 30 April 2024 14:37
by Kedi
Your docker-compose.yml file runs fine.
Probably you forgot to make the config dir in your local environment.
If you are in the directory where your docker-compose.yml is located do:
Re: The great Docker problem*
Posted: Thursday 02 May 2024 18:19
by Kedi
You better read this, then you might understand the error better.
https://borderpolar.com/how-to-fix-the- ... key-error/
Re: The great Docker problem*
Posted: Tuesday 01 October 2024 16:33
by Thuis
Problem? This docker mater starts to feel a lot like homea$$istant.
docker docker compose docker-compose docker engine docker cli docker dashboard docker install docker docker
then finally docker running, docker compose then docker container domoticz. then mosquitto container, nodered container homebridge container and so forth then all the containers need to communicate with each other. I see thru the trees no forest anymore. Change something, in the yml file. AAAAAAAAAA yaml. then search the internet how to docker compose down and up -d to take the changes. Try to backup a container need to read pages of options to commit then make a backup container. Where is the simple life. copy a to b.
Im getting there but it is a lot of reading and trying out. And i see the benefit of it all, but man i get the feeling they make it so hard on purpose with all these different flavours of the docker saga. Probably it is just me, but i had to get rid of it.
Re: The great Docker problem*
Posted: Tuesday 01 October 2024 17:09
by BartSr
What's your point? Steep learning curve? Have a look at domoticz wiki about e.g. zwave to mqtt. Follow exactly whats mentioned and you'r there. But build your system step by step and it's not that difficult. My 70 years brains can do so why should your's not do? And once you get stuck on a step ask in fora. Many people willing to help you.
Re: The great Docker problem*
Posted: Wednesday 02 October 2024 8:23
by lost
Always think why being compelled to such labyrinthin setup?
Nowadays, containers are mostly used out of its target of isolaing untrusted or old stuff with dependancy issues.
That's used as a solution to make badly designed accidentally working sw usable. Look at zwavejs: bad language choice, heavy dependancies, mqtt even for localhost.
A pure product of so called modern sw dev methods we would have called "quick&dirty" 20 years ago.
This comes from web design where maintenance over many years is not an issue and ttm the only thing that matter...
Re: The great Docker problem*
Posted: Wednesday 02 October 2024 13:40
by Thuis
BartSr wrote: ↑Tuesday 01 October 2024 17:09
What's your point? Steep learning curve? Have a look at domoticz wiki about e.g. zwave to mqtt. Follow exactly whats mentioned and you'r there. But build your system step by step and it's not that difficult. My 70 years brains can do so why should your's not do? And once you get stuck on a step ask in fora. Many people willing to help you.
No point, i just needed to write it down and get rid of my irritation that i had on that moment after hours. It says so in the last 5 words of my previous post.
Re: The great Docker problem*
Posted: Saturday 30 November 2024 17:45
by solarboy
Yeah, I'm 6 hours now trying to migrate to docker. The main issue is USB mapping.
I modified the provided docker-compose.yml
https://github.com/domoticz/domoticz-docker to map by 2 USB serial devices.
Code: Select all
services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
devices:
- "/dev/serial/by-id/usb-0658_0200-if00:/dev/serial/by-id/usb-0658_0200-if00"
- "/dev/serial/by-id//usb-1a86_USB2.0-Ser_-if00-port0:/dev/serial/by-id//usb-1a86_USB2.0-Ser_-if00-port0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
#- ./config/www/templates:/opt/domoticz/www/templates
environment:
- TZ=Europe/Amsterdam
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
After a suggestion here somewhere
Inside the container the devices appear in "/dev/serial/by-id"
Code: Select all
root@b4f0e5d41500:/dev/serial/by-id# ls
usb-0658_0200-if00
usb-1a86_USB2.0-Ser_-if00-port0
However in the add hardware page of Domoticz , for the RFX plugin and the Dombus plugin the port setting is blank.
So after some digging (not here) I change the mapping
Code: Select all
- "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
- "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0:/dev/ttyUSB0"
Now the USB devices do appear in the hardware pop-up but when selected for RFX the hardware doesn't start and Dombus just crashes (that's a whole other issue).
Also, mosquitto (also in a docker) is not available unless I add "network_mode: host" to the official docker-compose.yml. This seems like a major omission.
I would love to move to docker but this all gets so tedious after a while. I have been running zwave, zigbee, homebridge, dashticz for years on dockers and they've never been as painful as this. Constantly learning things I don't want to know about rather than enjoying creating dzvents scripts and actually have some fun.
Re: The great Docker problem*
Posted: Sunday 01 December 2024 13:38
by solarboy
Oh, and the domoticz docker doesn't use the plugins folder mapped in ./userdata/plugins but creates a new one in ./plugins and uses that, although this didn't occur on earlier times I brought up the container. Back to bare metal for me.
Re: The great Docker problem*
Posted: Sunday 01 December 2024 15:28
by Kedi
solarboy wrote: ↑Sunday 01 December 2024 13:38
Oh, and the domoticz docker doesn't use the plugins folder mapped in ./userdata/plugins but creates a new one in ./plugins and uses that, although this didn't occur on earlier times I brought up the container. Back to bare metal for me.
I always use full path in docker yaml files, it is more clear what the path is instead of the ./config, because the dot means current path
And you not always know what current is.
Re: The great Docker problem*
Posted: Sunday 01 December 2024 16:18
by solarboy
Agreed, I just posted that for brevity, my actual entries are
Code: Select all
volumes: - /home/pi/domoticzDocker/config:/opt/domoticz/userdata
Re: The great Docker problem*
Posted: Friday 20 June 2025 16:06
by gmarchionni
I am trying for more then a year now to get Domoticz running on Docker (in conjunctions with Zigbee2mqtt and Mosquitto) I had several tries and every time the outcome is different.
Bloody hell!! more than a year? i never used docker before and in 1 afternoon and evening i migrated my whole raspberry from bare metal to docker!!
And trust me, i'm no genius.
it's way easier, faster and cleaner than installing on bare metal. And backups are WAY easier.
Re: The great Docker problem*
Posted: Friday 20 June 2025 16:18
by jannl
Exactly. I did the same some years ago. Just read and follow the documentation.
On the other hand, nowadays with an AI chatbot it would even be a lot easier.
And a always, Domiticz is open source and maintained by a great community, however, it is open source. If you do not want to fool/play around, buy a domotica system.
Anyway, that was completely off-topic