Page 23 of 25
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 08 March 2024 9:48
by remko2000
Ah, now I understand.
Thanks for the explanation. I'm going to experiment with the dzventz script. It's great that I already have a start.
Re: GarbageCalendar (new version) lua scripts
Posted: Thursday 18 July 2024 12:29
by mvveelen
I'm lost.
Yesterday I had to change to another USB drive and after uploading all scripts and uploading the backup DB the only thing I don't see is the garbage utility-thingy. As far as I can see, there is nothing missing and I've changed nothing in the settings files or so. What can I check to get the custom sensor back?
Re: GarbageCalendar (new version) lua scripts
Posted: Thursday 18 July 2024 12:34
by jvdz
mvveelen wrote: ↑Thursday 18 July 2024 12:29
What can I check to get the custom sensor back?
Follow setup steps:
https://github.com/jvanderzande/Garbage ... wiki/Setup
Follow Debugging steps:
https://github.com/jvanderzande/Garbage ... ki/Testing
Point of last resort: EMail me your Config & Logfiles in a zip.

Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 11 September 2024 21:36
by lsp242
pfff all system crashed, now i got the script running, but no update to the "sensor" in Domoticz.
In Domoticz I get:
Code: Select all
2024-09-11 21:28:00.218 dzVents: ------ Start external script: script_time_garbagecalendar.lua:, trigger: "Every 1 minutes"
2024-09-11 21:28:00.230 dzVents: 21:28:00 gc_main: 136: Loaded /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/garbagecalendarconfig.lua.
2024-09-11 21:28:00.233 dzVents: 21:28:00 gc_main: 152: Loaded /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/gc_generalfuncs.lua.
2024-09-11 21:28:00.234 dzVents: 21:28:00 gc_func: 352: -> Loading module JSON
2024-09-11 21:28:00.234 dzVents: 21:28:00 gc_func: 367: -< Loaded JSON.lua. ->moduleobject type:table
2024-09-11 21:28:00.234 dzVents: 21:28:00 gc_main: 172: -> Start processing garbagecalendarconfig.lua information.
2024-09-11 21:28:00.235 dzVents: 21:28:00 gc_main: 234: !> Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2024-09-11 21:28:00.235 dzVents: 21:28:00 gc_main: 235: !> please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2024-09-11 21:28:00.236 dzVents: 21:28:00 gc_main: 256: -< End processing garbagecalendarconfig.lua information.
2024-09-11 21:28:00.236 dzVents: 21:28:00 gc_main: 908: -> Start checking garbagetype_cfg table whether an action is needed:
2024-09-11 21:28:00.236 dzVents: 21:28:00 gc_main: 988: 1 --- NotificationTime=19:02 Garbagetype=plastic, metaal en drankenkartons
2024-09-11 21:28:00.237 dzVents: 21:28:00 gc_main: 988: 2 --- NotificationTime=19:02 Garbagetype=groente-, fruit- en tuinafval
2024-09-11 21:28:00.237 dzVents: 21:28:00 gc_main: 988: 3 --- NotificationTime=02:31 Garbagetype=updatedomoticzdevice
2024-09-11 21:28:00.237 dzVents: 21:28:00 gc_main: 988: 4 --- NotificationTime=02:30 Garbagetype=reloaddata
2024-09-11 21:28:00.237 dzVents: 21:28:00 gc_main: 988: 5 --- NotificationTime=19:02 Garbagetype=restafval
2024-09-11 21:28:00.238 dzVents: 21:28:00 gc_main: 988: 6 --- NotificationTime=19:02 Garbagetype=textiel
2024-09-11 21:28:00.238 dzVents: 21:28:00 gc_main: 988: 7 --- NotificationTime=04:01 Garbagetype=dummy
2024-09-11 21:28:00.238 dzVents: 21:28:00 gc_main: 988: 8 --- NotificationTime=19:02 Garbagetype=oud papier & karton
2024-09-11 21:28:00.238 dzVents: 21:28:00 gc_main: 994: #> Perform update because mydebug=true.
2024-09-11 21:28:00.239 dzVents: 21:28:00 gc_main: 548: -> Action starting, First check access to required files:
2024-09-11 21:28:00.239 dzVents: 21:28:00 gc_main: 551: Run command:
2024-09-11 21:28:00.239 ls -l /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecal*m_opzet_api*:
2024-09-11 21:28:00.247 dzVents: -rwxrw-rw- 1 root root 500 Jun 25 02:30 /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api.data
2024-09-11 21:28:00.247 -rwxrw-rw- 1 root root 1912 Sep 11 21:28 /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api_run.log
2024-09-11 21:28:00.247 -rwxrw-rw- 1 root root 4278 Sep 11 21:27 /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api_run_update.log
2024-09-11 21:28:00.247 -rwxrw-rw- 1 root root 8037 Sep 11 02:30 /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api_run_webupdate_backgound.log
2024-09-11 21:28:00.247 -rwxrw-rw- 1 root root 1951 Sep 11 02:30 /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api_run_webupdate.log
2024-09-11 21:28:00.248 dzVents: 21:28:00 gc_main: 869: Access OK: /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api.data
2024-09-11 21:28:00.248 dzVents: 21:28:00 gc_main: 869: Access OK: /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api_run.log
2024-09-11 21:28:00.249 dzVents: 21:28:00 gc_main: 584: -> Start update for GarbageCalendar text device "Afvalbak"
2024-09-11 21:28:00.249 dzVents: 21:28:00 gc_main: 611: 4 data records loaded, updated at Tue Jun 25 02:30:01 2024 from Datafile:/home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api.data
2024-09-11 21:28:00.249 dzVents: 21:28:00 gc_main: 627: -> Start looping through data to find the first 3 events to show:
2024-09-11 21:28:00.250 dzVents: 21:28:00 gc_main: 771: ### Warning: No valid records found in the Datafile: /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api.data
2024-09-11 21:28:00.251 dzVents: 21:28:00 gc_main: 772: ### Please check the garbagecalendar log files for issues : /home/pi/domoticz/scripts/dzVents/scripts/garbagecalendar/data/garbagecalendar_m_opzet_api_run.log
2024-09-11 21:28:00.251 dzVents: 21:28:00 gc_main: 774: -< End data loop
2024-09-11 21:28:00.251 dzVents: 21:28:00 gc_main: 776: #!# Warning: These records are missing in your garbagecalendarconfig.lua file, so no notifications will be send!
2024-09-11 21:28:00.251 dzVents: 21:28:00 gc_main: 777: #!# Add these records into the garbagetype_cfg table and adapt the schedule, text and icon info to your needs:
2024-09-11 21:28:00.252 dzVents:
2024-09-11 21:28:00.252 ["oud papier & karton."] ={hour=19,min=02,daysbefore=1,reminder=0,text="oud papier & karton.", icon=nil},
2024-09-11 21:28:00.252
2024-09-11 21:28:00.252 dzVents: 21:28:00 gc_main: 779: #!# -- end ----------------------------
2024-09-11 21:28:00.252 dzVents: 21:28:00 gc_main: 786: -> found schedule:
2024-09-11 21:28:00.252 dzVents: 21:28:00 gc_main:1006: -< ### DzVents: End garbagecalendar script v20230703-2300
Hopelijk kan je me helpen en is het iets doms (zoals vaker)
en deze... is via ssh en nano leeg:
Also check *garbage.**modulename*data for valid table information looking like this format:
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 11 September 2024 23:10
by jvdz
lsp242 wrote: ↑Wednesday 11 September 2024 21:36
pfff all system crashed, now i got the script running, but no update to the "sensor" in Domoticz.
Hopelijk kan je me helpen en is het iets doms (zoals vaker)
en deze... is via ssh en nano leeg:
Also check *garbage.**modulename*data for valid table information looking like this format:
Did you look at the logs as indicated in the Wiki and in the log you shown?
As always: I can have a look for you, but you will have to email me a ZIP file containing All the logfiles and the config file, so I can check what is happening for you.

Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 21 December 2024 1:28
by HansieNL
@jvdz MijnAfvalwijzer is gonna be Saver. Can you tell me how I can keep my afvalkalender updated?
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 21 December 2024 10:13
by jvdz
It was reported here:
https://github.com/jvanderzande/Garbage ... /issues/39
So the solution should be to use these variable settings:
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 24 January 2025 19:54
by hoeby
There is a file name issue on github
this needs to be
This was the error in domoticz log
Code: Select all
2025-01-24 19:29:00.440 Error: LUA: 19:29:00 gc_main: 260: ### Error: module not found: /opt/domoticz/userdata/scripts/lua/garbagecalendar/m_mijnafvalwijzer_api.lua
Our garbage collector is changed with there api.
Any tips or tricks how to find the correct one?
Or is it trail and error, untill there is data?
The scripting worked great the last years, but after 01-01-2025 it stopped. I think because the garbage collector changed the api.
Almost tried all, without luck. Can't find the correct way to debug this.
My garbage collector =
https://rwm.nl/wanneer
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 24 January 2025 20:05
by hoeby
Trail and error did the job
RWM is now
Code: Select all
Hostname = 'https://rwm.nl'
websitemodule = "m_opzet_api"
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 24 January 2025 20:28
by jvdz
hoeby wrote: ↑Friday 24 January 2025 19:54
There is a file name issue on github
Should be fixed in github now, where I made all lowercase to avoid these type of issues. Thanks for reporting.
hoeby wrote: ↑Friday 24 January 2025 20:05
Trail and error did the job
RWM is now
Code: Select all
Hostname = 'https://rwm.nl'
websitemodule = "m_opzet_api"
Great things work again for you.
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 25 January 2025 16:45
by sloeber70
Hi,
Implemented today.. works very nice.
Thx!
Is there a way to let the textbox align from the left side?
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 25 January 2025 16:50
by jvdz
sloeber70 wrote: ↑Saturday 25 January 2025 16:45
Is there a way to let the textbox align from the left side?
Don't think you are using the standard Domoticz Web front-end... right?
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 25 January 2025 17:34
by sloeber70
Hi,
Yes I am using that with Machinon theme. Latest Beta
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 25 January 2025 18:07
by jvdz
Well you can add formatting to the generated text for the text device when that is supported by the theme.
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 25 January 2025 19:18
by sloeber70
Hi,
I can add simple <BR> tags to get a new line. So those tags are working.
Tried already several tags... they are working but they add 2 new linebreaks between each entry in the textbox.
Can you help me and give me some directions?
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 26 January 2025 14:24
by jvdz
jvdz wrote: ↑Saturday 25 January 2025 18:07
Tried already several tags... they are working but they add 2 new linebreaks between each entry in the textbox.
What happens when you change the config to?:
Code: Select all
textformat = '<p align="left">wd dd mmm: tdesc</p>'
EDIT: Guess that adds those extra line breaks?
I can make a simple modification so you can define a surrounding formatting for the text device:
Update your
gc_main.lua line 782 to:
Code: Select all
-- always update the domoticz device so one can see it is updating and when it was ran last.
Print_logfile('-> found schedule:' .. devtxt:gsub('\r\n', ' ; '), 1)
-- add global formatting when defined
tdevformat = tdevformat or ''
if tdevformat:match('#') then
devtxt = tdevformat:gsub('#', devtxt, 1)
Print_logfile('-> added textdev formatting:' .. devtxt:gsub('\r\n', ' ; '), 1)
end
-- close ICAL file when requested
and update this in your
garbagecalenderconfig.lua, adding variable
tdevformat:
Code: Select all
-- textformat = 'tdesc: wd dd mmm'
textformat = 'wd dd mmm: tdesc'
-- One can also add some html formatting formating to the output when the used interface supports that:eg:
-- textformat = '<font color="red" size=1>tdesc: wd dd mmm</font>'
-- this variable can contain the surrounding text device formatting for the total textbox information
-- # => Generated lines that need to be surrounded. This variable is ignored when it doesn't contain a # character.
tdevformat = '<div align="left">#</div>'
Let me know whether that works so I can commit this to github.
EDIT2:
Updated this in github master & wiki
I have tested this on the default domoticz theme and all changes I make in tdevformat are properly shown in the text device.
eg:
Code: Select all
tdevformat = '<div style="font-size : 8px" align="center">#</div>
results in:

- Schermafbeelding 2025-01-26 160331.png (27.93 KiB) Viewed 8756 times
while without formatting, it is shown as:

- Schermafbeelding 2025-01-26 160347.png (35.17 KiB) Viewed 8756 times
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 26 January 2025 19:52
by sloeber70
Hi,
That is a very good solution !!
I did alter both files and also played a bit with colors and sizes...
my tdevformat line in config :
tdevformat = '<div align="left">#</div>' textformat = '<font color="#40a3ce" size=2em>tdesc: wd dd/mm</font>'
Result :
Dashboard device:

- recycle_v2_dashboard.png (25.97 KiB) Viewed 8749 times
Utility device:

- recycle_v2_utility.png (28.18 KiB) Viewed 8749 times
I am using the machinon theme. I did alter views and the amount of devices shown on the grid... Played with the colors... etc..
But there is one big restriction... For utility devices, the grid is devided into 2 vertical spaces for separation of the icon and the status. So this cannot be changed just like that. I will investigate and try to alter this.
For those who are interested . I've created the icons for the RecycleBE app. I will include the custom image.
Thx!!
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 26 January 2025 22:40
by HansieNL
@sloeber70 Your icons don't have transparent background. I created icons with transparent background and updated icons.txt. Maybe you like them.
- recycle.zip
- Recycle! icons (transparent background)
- (7.78 KiB) Downloaded 51 times
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 07 March 2025 17:23
by abc1000
Dec 2024 garbage script stops working.. what are the new settings for Rova Zwolle?
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 07 March 2025 18:13
by jvdz
abc1000 wrote: ↑Friday 07 March 2025 17:23
Dec 2024 garbage script stops working.. what are the new settings for Rova Zwolle?
Looks like they moved away from mijnafvalwijzer, so I will reinstate a separate module for ROVA.
Please PM me your details so I can test the module first before making it available.