Page 18 of 18

Re: Sharing : Afval kalendar in text sensor

Posted: Monday 02 January 2023 17:03
by hoeby
I have it working in docker.

What did i do, but before i explain that, i first show what i used as volume when installing domoticz in docker.
This is to keep all setup files outside the container. So they will still be there when you update the domoticz container.
if your volume is different, keep this in mind with the configuration example below

Code: Select all

-v /docker/domoticz/config:/opt/domoticz/userdata
To keep everything a little clean and not everything in the same folder, i made sub-folders.
In /docker/domoticz/config i made a folder "scripts" and in that folder i made the folder "lua"
so i will get /docker/domoticz/config/scripts/lua where i will put the files from JVDZ

After that i followed the SETUP instructions of JVDZ
But for the container itself, the files are not in /docker/domoticz/config
For the container the files are in /opt/domoticz/userdata
And because of the sub-folders, the correct path is /opt/domoticz/userdata/scripts/lua

I also changed the folder where the data or log is written, so they are easier to access. I choose a path which is inside the container.
The default example for PI which is in the configuration file doesn't work. /var/tmp isn't in the container available
i made a "tmp" folder in /docker/domoticz/config/scripts/lua

Don't forget the writting rights for the folders, to prevent errors

This is what i have in garbagecalendarconfig.lua
Schermafbeelding 2023-01-02 163826.png
Schermafbeelding 2023-01-02 163826.png (12.07 KiB) Viewed 814 times
This is a little view from the debug log in domoticz
Schermafbeelding 2023-01-02 1713.png
Schermafbeelding 2023-01-02 1713.png (107.09 KiB) Viewed 814 times

Re: Sharing : Afval kalendar in text sensor

Posted: Monday 02 January 2023 22:12
by smaus
Go check this out today thanks in advance 👍

do you have it working on a NAS?

I get this with me
-v /docker/domoticz/config:/opt/domoticz/userdata

-bash: -v: command not found

Re: Sharing : Afval kalendar in text sensor

Posted: Tuesday 03 January 2023 18:50
by FireWizard
Hi @smaus.

I do not know, who and what your asking.

And sorry, this is an English forum. So please post in English.

Regards

Re: Sharing : Afval kalendar in text sensor

Posted: Tuesday 03 January 2023 21:14
by hoeby
smaus wrote: Monday 02 January 2023 22:12 Go check this out today thanks in advance 👍

do you have it working on a NAS?

I get this with me
-v /docker/domoticz/config:/opt/domoticz/userdata

-bash: -v: command not found
I am not running an a NAS, but should that matter?
Docker is docker would i say. Only the strings could be different

-v is not a command. That is the volume in the domoticz container

I found this picture on page 17, i think it is from a NAS.
There you see the volume coupled.
Image

You need to add a volume in that menu of your NAS (looks like the last line in the picture, only /userdata is added). Do not make multi volumes which direct to the same "Pad koppelen" path.
Bestand/Map = /docker/domoticz/config
Pad koppelen = /opt/domoticz/userdata
Type = rw

Only thing i don't know with the NAS is the / in front of docker for Bestand/Map path. I need to add it in my docker environment. But in the picture it is not there

Re: Sharing : Afval kalendar in text sensor

Posted: Wednesday 04 January 2023 16:47
by jvdz
I am interested in getting this documented in the github wiki as well: https://github.com/jvanderzande/GarbageCalendar/wiki
Could we please continue the conversation into garbagecalendar's own thread so we have the discussion all together?
viewtopic.php?t=31295&start=340

Re: Sharing : Afval kalendar in text sensor

Posted: Wednesday 04 January 2023 18:01
by hoeby
jvdz wrote: Wednesday 04 January 2023 16:47 I am interested in getting this documented in the github wiki as well: https://github.com/jvanderzande/GarbageCalendar/wiki
Could we please continue the conversation into garbagecalendar's own thread so we have the discussion all together?
viewtopic.php?t=31295&start=340
I am working with smaus together in the private messages.
This to get a template how what to check first in docker, to get the correct paths which are needed in the config file.
When we have all documentation and a working solution for smaus. We will share the steps we have done for the documentation

For me it is a +1, toe continu in the correct thread

Re: Sharing : Afval kalendar in text sensor

Posted: Wednesday 04 January 2023 19:02
by waltervl
Just my 2 cents about documenting Domoticz Docker environment and Lua scripting in general: This should be done in the Domoticz wiki.....
There is a Docker page. There is also a Synology page were Docker installation on Synology is documented.
This always needs updating. As I do not use Docker (and no Synology Nas) it is difficult for me to document it correctly.

Re: Sharing : Afval kalendar in text sensor

Posted: Wednesday 04 January 2023 22:17
by jvdz
waltervl wrote: Wednesday 04 January 2023 19:02 Just my 2 cents about documenting Domoticz Docker environment and Lua scripting in general: This should be done in the Domoticz wiki.....
... because?
The Wiki for this garbage utility is in Github so that is where the implementation of garbagecalendat in docker also will be documented and that is the only logical place to me. ;)

Re: Sharing : Afval kalendar in text sensor

Posted: Thursday 05 January 2023 0:14
by waltervl
jvdz wrote: Wednesday 04 January 2023 22:17
waltervl wrote: Wednesday 04 January 2023 19:02 Just my 2 cents about documenting Domoticz Docker environment and Lua scripting in general: This should be done in the Domoticz wiki.....
... because?
The Wiki for this garbage utility is in Github so that is where the implementation of garbagecalendat in docker also will be documented and that is the only logical place to me. ;)
Correct, that is why I mentioned GENERAL Lua scripting. Docker seems to have specific needs when it comes to using Domoticz scripts. If the general part is documented on a central place the garbagecalendar docker documentation can refer to that. What is garbagecalendar script specific is off course best to place on the garbagecalendar wiki.
But you can place all on your wiki if it is too complicated than I will try to distil the general part out of it for the Domoticz wiki.....