Page 25 of 26

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 28 July 2025 10:03
by jvdz
hjzwiers wrote: Monday 28 July 2025 0:00 I changed the files:

Hostname = 'www.mijnafvalwijzer.nl'

and

websitemodule = 'm_mijnafvalwijzer_api'

the file from the logging is in the attachment
The attached is not really what I requested, but this time it is enough to figure out your issue. ;-)
Open your config and remove the hostname as that needs to point to "api.mijnafvalwijzer.nl", which is the default when left empty, so just leave it empty! :-)

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 28 July 2025 10:52
by jvdz
jvdz wrote: Sunday 27 July 2025 23:13 EDIT: Using your postcode&housenr you listed in the url, I indeed see that the module "m_mijnafvalwijzer" has an issue with the data returned, which I will have a look at
Committed an update to cope with the changed returned Website data for module "m_mijnafvalwijzer".
Preference should be to use the "m_mijnafvalwijzer_api" module as that is less likely to be sensitive to any changes made on their side.

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 28 July 2025 11:01
by hjzwiers
So much trouble for something so simple, thanks, its working!

Re: GarbageCalendar (new version) lua scripts

Posted: Thursday 30 October 2025 21:44
by cyberclwn
Hi,

Is it me, or is the "m_ximmio" module not working anymore ?

The device-text is staying blank, no update.

The url i get redirected to, when i check on the site for my information, is https://afvalportaal.2go-mobile.com

If i can be of assistance to help resolve this issue, let me know.

Gz,
Rik

Re: GarbageCalendar (new version) lua scripts

Posted: Thursday 30 October 2025 22:25
by jvdz
cyberclwn wrote: Thursday 30 October 2025 21:44 The url i get redirected to, when i check on the site for my information, is https://afvalportaal.2go-mobile.com
If i can be of assistance to help resolve this issue, let me know.
Sure, but you will have to provide way more information than this! ;-)
https://github.com/jvanderzande/Garbage ... -debugging
-or-
When this is a new installation, you can provide me with your zipcode & housenr in an email or PM, so I can do some checking and testing.

Just provide me with that in an email so I can have a look.

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 04 November 2025 20:34
by cyberclwn
jvdz wrote: Thursday 30 October 2025 22:25
cyberclwn wrote: Thursday 30 October 2025 21:44 The url i get redirected to, when i check on the site for my information, is https://afvalportaal.2go-mobile.com
If i can be of assistance to help resolve this issue, let me know.
Sure, but you will have to provide way more information than this! ;-)
https://github.com/jvanderzande/Garbage ... -debugging
-or-
When this is a new installation, you can provide me with your zipcode & housenr in an email or PM, so I can do some checking and testing.

Just provide me with that in an email so I can have a look.
Hi, Yes, you are right, the post was a bit basic, my apologies.

And sorry for the late reply, but i was struggling a bit.
The script i was using until a few days ago, was working without any errors, so i had no need to check up on it.
But it seems there was a more recent version (20250614-1700) then the one i was still running (20200406-2030 :oops: )

Only if i noticed that more sooner then i like to admit :D

So i have been backing up the old config and implementing the new script. And that is running again now.
It just is not using ['pmd'] but ['packages'] as tag for the pmd. But that is just a little change in the config, and workable.

So: sorry i just "stress"-posted the post, and thanks for great script. I just need to check for updates sometimes, and especially when it looks like it broke.

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 04 November 2025 20:42
by jvdz
cyberclwn wrote: Tuesday 04 November 2025 20:34 So: sorry i just "stress"-posted the post, and thanks for great script. I just need to check for updates sometimes, and especially when it looks like it broke.
No worries, glad it all works after updating to the latest version. :-)

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 06 January 2026 9:14
by lsp242
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"
How did you find out? I think cyclus also changed the API

or does anybody know the new api settings Hostname and websitemodule?

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 06 January 2026 9:37
by jvdz
I normally check the online garbagecalender to check which provider is use and then test it with the guessed module. Provide/PM me with/the zipcode&housenumber in case you need help.

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 06 January 2026 11:12
by lsp242
jvdz wrote: Tuesday 06 January 2026 9:37 I normally check the online garbagecalender to check which provider is use and then test it with the guessed module. Provide/PM me with/the zipcode&housenumber in case you need help.
PM gestuurd / Send

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 03 May 2026 20:11
by Thuis
So i had a problem with my python plugin. My plugin is a norification tts for google mini. It worked great, suddenly it started crashing domiticz. So 1 switch only did notify to speaker and domoticz kept running. Other switch notified AND triggered a dzvents script and domiticz crashed with segmentation fault. So after 2 days of investigating i came to the conclusion that the custom icon on that switch that crashed domiticz was the culprit. Then i did an sql delete on my domiticz.db deleted all the custom icons that used the tts plugin. Now switching that switch it notified and triggered the script and domoticz kept running. Now garbagecalendar also uses the tts plugin, so the icon also disappeared. I now put a backup db back and only deleted the icon of that particular switch. But the icon on the garbage container is also still gone. I can change the icon in the script, from normal icon to moderen icon, i set the script to debug true etc. Then i get the data on the text device but no icon. When u click change text sensor, i do see the correct icon and can choose other icon but it never shows the icon on the textsensor anymore. I also see the icons in de custom icons tab. I think i did something in the database that prevents domoticz from showing the icon on the textsensor. I made a new textsensor with sane name but only the text is filled in no icon. Anyone have an idea how i could fix this?
Spoiler: show
Image
sqlite3 domoticz.db "SELECT Options FROM DeviceStatus WHERE ID = 446;"
{"CustomIcon":152}

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 03 May 2026 20:56
by jvdz
The way it works is pretty strait forward: The GC script checks the config for the wanted ICON name. It then does an API call to check whether it is available and uploads it in case it is missing, and then sets the icon for the text device when its different than the current one.
Look at the current garbagecalendar_m_*****_run_update.log for the details at the end of the log.

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 03 May 2026 21:17
by Thuis
Yes i was looking in there also, seems ok i see :
34 20:00:00 gc_main: 811: -> GarbageCalendar has found schedule:ma 4 mei: Het GFT afval ; vr 8 mei: Het plastic ; ma 11 mei: Het rest afval ;
35 20:00:00 gc_main: 833: -> FirstGTypeIcon:garbagecalendar_green

I changed from garbagecalendar_green to gc_modern_green back to garbagecalendar_green.
then it scans all the custom icons and finds this :
Spoiler: show
1154 {
1155 "description" : "Used by Garbagecalendar",
1156 "idx" : 252,
1157 "imageSrc" : "gc_modern_green",
1158 "text" : "garbagecalendar gc_modern_green"
1159 },
Then :
Spoiler: show
"status" : "OK",
1186 "title" : "CustomLightIcons"
1187 }
1188 20:00:00 gc_func: 35: -< domo_api_query successful.
1189 20:00:00 gc_func: 135: garbagecalendar_green idx 230 found in Domoticz custom icons
1190 20:00:00 gc_main: 840: >> FirstGTypeIconIdx:230
1191 20:00:00 gc_main: 877: -> No update for "Container"
1192 20:00:00 gc_func: 19: -> domo_api_query:curl --silent --connect-timeout 2 "http://192.168.10.20:8080/json.htm?type ... es&rid=446"
1193 20:00:01 gc_func: 23: Web_Data:{
1194 "ActTime" : 1777831201,
1195 "AstrTwilightEnd" : "23:46",
1196 "AstrTwilightStart" : "03:35",
1197 "CivTwilightEnd" : "21:50",
1198 "CivTwilightStart" : "05:32",
1199 "DayLength" : "15:00",
1200 "NautTwilightEnd" : "22:41",
1201 "NautTwilightStart" : "04:41",
1202 "ServerTime" : "2026-05-03 20:00:01",
1203 "SunAtSouth" : "13:41",
1204 "Sunrise" : "06:11",
1205 "Sunset" : "21:11",
1206 "app_version" : "2026.1 (build 17879)",
1207 "result" :
1208 [
1209 {
1210 "AddjMulti" : 1.0,
1211 "AddjMulti2" : 1.0,
1212 "AddjValue" : 0.0,
1213 "AddjValue2" : 0.0,
"BatteryLevel" : 255,
1215 "Color" : "",
1216 "CustomImage" : 230,
1217 "Data" : "ma 4 mei: Het GFT afval\nvr 8 mei: Het plastic\nma 11 mei: Het rest afval\n",
1218 "Description" : "",
1219 "Favorite" : 1,
1220 "HardwareDisabled" : false,
1221 "HardwareID" : 6,
1222 "HardwareName" : "Virtueel",
1223 "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
1224 "HardwareTypeVal" : 15,
1225 "HaveTimeout" : false,
1226 "ID" : "00082446",
1227 "Image" : "garbagecalendar_green",
1228 "LastUpdate" : "2026-05-03 19:55:01",
1229 "Name" : "Container",
1230 "Notifications" : "false",
1231 "PlanID" : "0",
1232 "PlanIDs" :
1233 [
1234 0
1235 ],
1236 "Protected" : false,
1237 "ShowNotifications" : false,
1238 "SignalLevel" : "-",
1239 "SubType" : "Text",
1240 "Timers" : "false",
1241 "Type" : "General",
1242 "TypeImg" : "text",
1243 "Unit" : 1,
1244 "Used" : 1,
1245 "XOffset" : "0",
1246 "YOffset" : "0",
1247 "idx" : "446"
1248 }
1249 ],
1250 "status" : "OK",
"title" : "Devices"
1252 }
1253 20:00:01 gc_func: 35: -< domo_api_query successful.
1254 20:00:01 gc_func: 104: Get current device info:
1255 20:00:01 gc_func: 107: result:[{"AddjMulti":1.0,"AddjMulti2":1.0,"AddjValue":0.0,"AddjValue2":0.0,"BatteryLevel":255,"Color":"","CustomImage":230,"Data":"ma >
1256 20:00:01 gc_func: 241: > Icon already set to idx 230
1257 20:00:01 gc_main:1042: -< ### TimeEvent: End garbagecalendar script v20260126-0950
in custom icons i have both garbagecalendar garbagecalendar_green and garbagecalendar gc_modern_green
Would it be so, i have to wait for next garbage, like i mean, now is green, i need to wait when the turn is for blue,gray or orange?

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 03 May 2026 21:20
by jvdz
When your question is whether the others ICONs will be back then yes, they are only uploaded when required by the script to set it to the appropriate Icon as defined in the config.... else i might not completely understand the question. :-)

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 03 May 2026 21:21
by Thuis
ha ok i get that, if you see the picture, from the phone, there is no icon shown on the text sensor, but there is on the submenu where you can choose an icon ... i will wait for next pickup, and then the icon will surely re-appear :-)

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 05 May 2026 7:57
by Thuis
Well sadly no icon anymore. Now new pickup, pmd, i hoped the icon would come back, i guess i have to live without it from now on. Thanks anyways.

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 05 May 2026 9:53
by FireWizard

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 05 May 2026 17:34
by Thuis
Hey thanks for the clarity :-)

Re: GarbageCalendar (new version) lua scripts

Posted: Thursday 02 July 2026 22:05
by hoeby
Does somebody also have issues with the telegram notifications on this garbagecalendar lua script?

It worked great for a long time.
But suddenly, no telegram notifications anymore.

There is no error in de log.
The text device is also update with the latest information. But notifications suddenly stopped.

I have a dzvents script which also uses telegram with a curl. That also stopped working a few weeks back. That was because of the spaces in de text.

Code: Select all

os.execute('curl -s -X POST "https://api.telegram.org/bot'..teleTok..'/sendMessage?chat_id='..chatId..'&text=Oplader motor is ingeschakeld.' ..IP..'"')
But when looking in the code of this script, it doesn't use os.execute, but this kind of notification setup

Code: Select all

 dz.notify(notifyHead, 'message.',dz.PRIORITY_NORMAL,nil,nil,dz.NSS_TELEGRAM)
Have to say, i didn't test to view the log.
Just asking, maybe i am not the only one

Re: GarbageCalendar (new version) lua scripts

Posted: Saturday 04 July 2026 11:39
by hoeby
I updated the GarbageCalendar to the latest version.
When tested, it still didn't worked.

In the log, there is a warning with missing garbage types.
When looking into the garbagetype_cfg, those types are there. Then i noticed, that the information that is received from the garbage collector is written in capital letters. Made that change to the garbagetype.cfg and it worked.

Just a tip, don't just copy the missing types to the garbagetyp_cfg, because the type is case sensitive.
Check how it is written a few lines above the warning.

Code: Select all

11:32:00 gc_main: 714:     --> GarbageDate:2026-7-9 GarbageType:GFT afval;  Notify: Active=on  Time=11:31   DaysBefore=5   reminder=0   Calc Days Diff=5
11:32:00 gc_main: 674:    --> "PMD" ->Did not find GarbageType PMD
11:32:00 gc_main: 709:    --> GarbageDate:2026-7-13 GarbageType:PMD; Calc Days Diff=9; *** Notify skipped because garbagetype:?? insn't defined in garbagetype_cfg[]!
11:32:00 gc_main: 714:     --> GarbageDate:2026-7-16 GarbageType:GFT afval;  Notify: Active=on  Time=11:31   DaysBefore=5   reminder=0   Calc Days Diff=12
11:32:00 gc_main: 674:    --> "Restafval" ->Did not find GarbageType Restafval
11:32:00 gc_main: 797: -< End data loop
11:32:00 gc_func:  19: -> domo_api_query:curl --silent --connect-timeout 2 "http://127.0.0.1:8080/json.htm?type=command&param=addlogmessage&message=%23%21%23+Warning%3A+These+garbage+types+are+missing+in+your+garbagetype_cfg+table+in+file+garbagecalendarconfig.lua%2C+so+no+notifications+will+be+send%21%0A--%3E+Add+the+below+and+adapt+the+schedule%2C+text+and+icon+info+to+your+needs%3A%0Agarbagetype_cfg+%3D+%7B%0A...%0A++%5B%22pmd%22%5D++++++++%3D%7Bhour%3D19%2Cmin%3D02%2Cdaysbefore%3D1%2Creminder%3D0%2Ctext%3D%22PMD%22%2C+icon%3Dnil%7D%2C%0A++%5B%22restafval%22%5D++%3D%7Bhour%3D19%2Cmin%3D02%2Cdaysbefore%3D1%2Creminder%3D0%2Ctext%3D%22Restafval%22%2C+icon%3Dnil%7D%2C%0A...%0A%7D%0A%23%21%23+-----+end+----------------------------&level=1"
11:32:00 gc_func:  23:    Web_Data:
11:32:00 gc_func:  27: -< domo_api_query failed, no json returned:
11:32:00 gc_main: 804:    #!# Warning: These garbage types are missing in your garbagetype_cfg table in file garbagecalendarconfig.lua, so no notifications will be send!
                             --> Add the below and adapt the schedule, text and icon info to your needs:
                             garbagetype_cfg = {
                             ...
                               ["pmd"]        ={hour=19,min=02,daysbefore=1,reminder=0,text="PMD", icon=nil},
                               ["restafval"]  ={hour=19,min=02,daysbefore=1,reminder=0,text="Restafval", icon=nil},
                             ...
                             }
                             #!# ----- end ----------------------------