Page 1 of 1

Plugin : Garbage collector NL

Posted: Saturday 11 April 2026 15:26
by madpatrick
Hi All,

I've created a plugin version of the Garbage collector LUA created by jvdz
(see : viewtopic.php?t=31295)
garbage.png
garbage.png (11.86 KiB) Viewed 34933 times
It is not yet finished and i can not test all providers, but if you like it just try it and give me feedback
I prefer the feedback in GIT

See : https://github.com/MadPatrick/domoticz_garbage

Again. All credit for jvdz

Re: Garbage collector NL

Posted: Sunday 12 April 2026 7:50
by gizmocuz
Thanks for the plugin!

I have a few suggestions and questions:

- There are Dutch? comments in the code on Github, maybe translate them to English
- There is a cache folder (__pycache__) that should not be in git

I would like to be notified at 5.00pm and at 7.00pm if a bin has to go out like with the original plugin.
It is not clear for me where to specify these times.
In the original plugin I could send a email and a notification to pushover

What is the difference between your version and that of jvdz?
If it is only the displaying, would it not be better to make a PR to the original repository?

Re: Garbage collector NL

Posted: Sunday 12 April 2026 8:25
by madpatrick
gizmocuz wrote: Sunday 12 April 2026 7:50 Thanks for the plugin!

I have a few suggestions and questions:

- There are Dutch? comments in the code on Github, maybe translate them to English
- There is a cache folder (__pycache__) that should not be in git

I would like to be notified at 5.00pm and at 7.00pm if a bin has to go out like with the original plugin.
It is not clear for me where to specify these times.
In the original plugin I could send a email and a notification to pushover

What is the difference between your version and that of jvdz?
If it is only the displaying, would it not be better to make a PR to the original repository?
Hi gizmocuz

Thanks for you feed.

I noticed the 2 points indeed and will look in to it
It was my intention to make a little different plugin and play with copilot
Som minor things a for me importnant and i need a different info as the current Dashitcz Garbage block.
Since Dashtich is not maintained lately i'm looking to customize some features in Domoticz

The full capabilities of the plugin are not taken over (yet) and i will look into it
If the LUA script jvdz fulfill the users needs, i would suggets to stick to the LUA script

Furtermore i'll keep working on the script and add more features

Do you know if it is is possible to use the Domoticz Notify system from Python plugin ?

Re: Garbage collector NL

Posted: Sunday 12 April 2026 10:38
by gizmocuz
Yes that is possible, have a look at the documentation

https://wiki.domoticz.com/Developing_a_Python_plugin

And specifically search for SendNotification

Re: Garbage collector NL

Posted: Sunday 12 April 2026 11:29
by madpatrick
gizmocuz wrote: Sunday 12 April 2026 10:38 Yes that is possible, have a look at the documentation

https://wiki.domoticz.com/Developing_a_Python_plugin

And specifically search for SendNotification
I have it working and also the language option as a variable
New version in GIt available

Notification at a given time in config.txt by dznotify

Re: Garbage collector NL

Posted: Saturday 23 May 2026 22:19
by domja
Hi madpatrick,

As I have no Github account, hereby my findings.

In our municipality we use https://acv-afvalkalender.nl/ which makes use of ximmio.
The companycode is easily found on the page after entering the zipcode, but when I add the hardware I get the following error in the log:

Code: Select all

2026-05-23 22:10:21.369 Error: Afvalkalender: Request failed for https://wasteapi.2go-mobile.com/api/FetchAdress: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:992)>
and

Code: Select all

2026-05-23 22:10:21.372 Error: Afvalkalender: [GC/Ximmio] Could not retrieve UniqueId - check Zipcode, Housenr and Companycode
but this is because of the previous error I guess.

Thanks in advance.

Re: Garbage collector NL

Posted: Saturday 23 May 2026 22:55
by domja
So I had a look in the code and changed the following:

Code: Select all

class XimmioModule(GarbageModule):
    name = 'Ximmio'
    _HOSTS = ['https://wasteapi.ximmio.com'] #, 'https://wasteapi.2go-mobile.com']
I used this github page for reference https://github.com/xirixiz/homeassistan ... t/const.py

Now it works for me.

A further request would be, just like in your F1 plugin, to able to select a language for displaying the texts.

Thanks for the plugin.

Re: Garbage collector NL

Posted: Sunday 24 May 2026 7:24
by madpatrick
domja wrote: Saturday 23 May 2026 22:55 So I had a look in the code and changed the following:

Code: Select all

class XimmioModule(GarbageModule):
    name = 'Ximmio'
    _HOSTS = ['https://wasteapi.ximmio.com'] #, 'https://wasteapi.2go-mobile.com']
I used this github page for reference https://github.com/xirixiz/homeassistan ... t/const.py

Now it works for me.

A further request would be, just like in your F1 plugin, to able to select a language for displaying the texts.

Thanks for the plugin.
Thaks.
Provider asjusted

I've made a development branch with the languafe selector
Can you try it

Code: Select all

git pull
git checkout development
to go back

Code: Select all

git pull
git checkout main
I also need to restore the noifitication system to able sending push messages
But that willfollow

Re: Garbage collector NL

Posted: Sunday 24 May 2026 8:19
by domja
The language selector, when changed to NL, does NOT change the text to Dutch.

Note that regarding the api used for ximmio, works in my case (ACV), but depending on the municipality that could not work for others.
E.g. wasteprod2api.ximmio.com did not work for me.

See the beforementioned homeassistant plugin which distinguishes several api's depending on the companycode/municipality.

Re: Garbage collector NL

Posted: Sunday 24 May 2026 8:34
by madpatrick
ok.

Try again. MAde some changes
curently not much time to look in to this, but will look into

Re: Garbage collector NL

Posted: Sunday 24 May 2026 10:52
by domja
Still no luck regarding the content in Dutch, except the dates.

When I add a debug statement, this is what I receive from the api (display_type):

Code: Select all

 2026-05-24 10:24:42.310 Afvalkalender: PAPER
2026-05-24 10:24:42.310 Afvalkalender: GREEN
2026-05-24 10:24:42.311 Afvalkalender: PACKAGES 
The source is english.

I created a patch:

Code: Select all

diff --git a/plugin.py b/plugin.py
index e403122..db53912 100644
--- a/plugin.py
+++ b/plugin.py
@@ -220,6 +220,135 @@ TYPE_ALIASES = [
     ('kerstbomen', 'Kerstbomen'),
 ]
 
+WASTE_TYPE_MAPPING: dict[str, str] = {
+    "best": "best-tas",
+    "best_bag": "best-tas",
+    "bestafr": "best-tas",
+    "bio-afval": "gft",
+    "biobak": "gft",
+    "biobak op afroep": "gft",
+    "branches": "snoeiafval",
+    "bulklitter": "grofvuil",
+    "bulkygardenwaste": "tuinafval",
+    "bulkyrestwaste": "pmd-restafval",
+    "chemisch afval": "kca",
+    "chemokar": "kca",
+    "christmas_trees": "kerstbomen",
+    "container restafval": "restafval",
+    "ga": "grofvuil",
+    "gemengde plastics": "plastic",
+    "gft": "gft",
+    "gft & etensresten": "gft",
+    "gft afval": "gft",
+    "gft en etensresten": "gft",
+    "gft groente- fruit en tuinafval": "gft",
+    "gft ophaal": "gft",
+    "gft+e": "gft",
+    "gft-afval": "gft",
+    "gfte": "gft",
+    "gfte afval": "gft",
+    "glass": "glas",
+    "green": "gft",
+    "greenbasket": "gft",
+    "grey": "restafval",
+    "grijze container": "restafval",
+    "grijze container / sortibak": "restafval",
+    "groene container": "gft",
+    "groene container / biobak": "gft",
+    "groente": "gft",
+    "groente, fruit en tuinafval + etensresten": "gft",
+    "groente, fruit en tuinafval en etensresten": "gft",
+    "groente, fruit en tuinafval en etensresten.": "gft",
+    "groente, fruit- en tuinafval": "gft",
+    "groente,- fruit,- tuinafval en etensresten": "gft",
+    "groente-, fruit en tuinafval": "gft",
+    "groente-, fruit- en tuinafval": "gft",
+    "groente-, fruit- en tuinafval  en etensresten (gft+e)": "gft",
+    "groente-, fruit- en tuinafval (gft)": "gft",
+    "groenten, fruit, tuin en etensresten": "gft",
+    "grof": "grofvuil",
+    "grof tuinafval": "snoeiafval",
+    "grofvuil": "grofvuil",
+    "grofvuil en elektrische apparaten": "grofvuil",
+    "grofvuil ophaal": "grofvuil",
+    "inzameling gft en etensresten": "gft",
+    "inzameling gft+e": "gft",
+    "inzameling papier en karton": "papier",
+    "inzameling plastic, blik en drankenkartons": "pmd",
+    "kca klein chemisch afval": "kca",
+    "kerstb": "kerstbomen",
+    "kerstboom": "kerstbomen",
+    "luiers": "luiers",
+    "mobiletransferpoint": "grip",
+    "opk": "papier",
+    "oud papier": "papier",
+    "oud papier & karton": "papier",
+    "oud papier en karton": "papier",
+    "oud papier huis aan huis inzameling pkn de westereen": "papier",
+    "packages": "pmd",
+    "packagesbag": "pmd",
+    "pap": "papier",
+    "paper": "papier",
+    "papier": "papier",
+    "papier (overdag)": "papier",
+    "papier door remondis": "papier",
+    "papier en karton": "papier",
+    "papier en karton (avond inzameling)": "papier",
+    "papier en karton (inzameling overdag)": "papier",
+    "papier en karton eemnes": "papier",
+    "papier ophaal": "papier",
+    "papier-karton": "papier",
+    "papiercont": "papier",
+    "papierinzameling": "papier",
+    "pbd": "pmd",
+    "pbp": "pmd",
+    "pd": "pmd",
+    "pdb": "pmd",
+    "plastic": "plastic",
+    "plastic en blik/ drankkartons": "pmd",
+    "plastic verpakkingen, metaal en drankenkartons (pmd)": "pmd",
+    "plastic verpakkingen, metalen verpakkingen en drinkpakken": "pmd",
+    "plastic+": "plastic",
+    "plastic, blik & drankkartons": "pmd",
+    "plastic, blik & drinkpakken": "pmd",
+    "plastic, blik & drinkpakken arnhem": "pmd",
+    "plastic, blik & drinkpakken eemnes": "pmd",
+    "plastic, blik & drinkpakken overbetuwe": "pmd",
+    "plastic, blik en drankkartons": "pmd",
+    "plastic, blik en drinkpakken": "pmd",
+    "plastic, metaal en drankenkartons": "pmd",
+    "plastic, metaal en drankkartons": "pmd",
+    "plastic, metaal en drinkpakken": "pmd",
+    "plastic, metalen en drankkartons (pmd)": "pmd",
+    "plastic, metalen verpakkingen en drankkartons": "pmd",
+    "pmd in zakken": "pmd",
+    "pmd plastic, metalen en drankkartons": "pmd",
+    "pmd+": "pmd",
+    "pmd+ ophaal": "pmd",
+    "pmd-zak": "pmd",
+    "pmdrest": "pmd-restafval",
+    "pruning_waste": "snoeiafval",
+    "remainder": "restwagen",
+    "residual_waste": "restafval",
+    "rest": "restafval",
+    "restafval in zak": "restafvalzakken",
+    "restafval- mini containers": "restafval",
+    "restafvalzakken": "restafvalzakken",
+    "rolcontainer gft en etensresten": "gft",
+    "rolcontainer restafval": "restafval",
+    "rst": "restafval",
+    "sloop": "grofvuil",
+    "sortibak": "sorti",
+    "takken": "snoeiafval",
+    "takken en snoeiafval": "snoeiafval",
+    "takken en snoeiafval ophaal": "snoeiafval",
+    "tariefzak restafval": "restafvalzakken",
+    "textile": "textiel",
+    "tree": "kerstbomen",
+    "verpakking van plastic, blik en drinkpakken": "pmd",
+    "zak_blauw": "restafval",
+}
+
 # Maps canonical display names to HTML entity icon + coloured label.
 # Uses HTML entities + inline style so Domoticz Text devices render them correctly,
 # just like other Domoticz plugins that use styled HTML in sValue.
@@ -235,7 +364,9 @@ WASTE_ICONS: Dict[str, str] = {
 
 
 def apply_type_alias(gtype: str) -> str:
-    lower = gtype.lower()
+    _lower = gtype.lower()
+    lower = WASTE_TYPE_MAPPING.get(_lower)
+    
     for key, alias in TYPE_ALIASES:
         if key in lower:
             return alias

Re: Garbage collector NL

Posted: Sunday 24 May 2026 17:38
by madpatrick
Can you please make PR on git
Thanks

Re: Plugin : Garbage collector NL

Posted: Thursday 25 June 2026 17:36
by waltervl
Thanks, also added to the plugin wiki