Sharing : Afval kalendar in text sensor

Moderator: leecollings

hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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 740 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 740 times
Last edited by hoeby on Tuesday 03 January 2023 21:15, edited 5 times in total.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
Last edited by smaus on Tuesday 03 January 2023 18:59, edited 2 times in total.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.
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
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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. ;)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.....
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