Page 19 of 24
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 15:41
by jvdz
Should work as the used config isn't part of Github, so you simply copy/update all files from github to your setup.
Send me your details (config+Logfiles in a ZIP via Email) in case you still have issue.
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 15:44
by Rolandet
jvdz wrote: ↑Sunday 05 March 2023 15:41
Should work as the used config isn't part of Github, so you simply copy/update all files from github to your setup.
Send me your details (config+Logfiles in a ZIP via Email) in case you still have issue.
Will do. (after GP of Bahrein

)
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 20:01
by Rolandet
jvdz wrote: ↑Sunday 05 March 2023 15:41
Should work as the used config isn't part of Github, so you simply copy/update all files from github to your setup.
Send me your details (config+Logfiles in a ZIP via Email) in case you still have issue.
Right. Copied all the files from the branch. Works like a charm.
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 20:25
by jvdz
Great ..and great race today!

Re: GarbageCalendar (new version) lua scripts
Posted: Monday 29 May 2023 14:44
by sincze
First I thought that the script was not working.
As the data file was not created.
But I noticed
https://mijnafvalwijzer.nl/nl/XXXXAB/1/ was not showing a next 'ophaalmoment' for my zipcode either.
So changed it to the ZIPCODE of the street next to mine. It showed results on the website and after changing the script with that zipcode the data file was created.
Nice!
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 29 May 2023 15:51
by jvdz
All PostCode/Housenr combinations I have in my test environment for MijnAfvalwijzer (both screenscraping and API modules) are working fine.

Re: GarbageCalendar (new version) lua scripts
Posted: Monday 29 May 2023 16:43
by sincze
jvdz wrote: ↑Monday 29 May 2023 15:51
All PostCode/Housenr combinations I have in my test environment for MijnAfvalwijzer (both screenscraping and API modules) are working fine.
Let me PM you mine

Re: GarbageCalendar (new version) lua scripts
Posted: Monday 29 May 2023 16:48
by sincze

- afval.png (176.19 KiB) Viewed 3170 times
jvdz wrote: ↑Monday 29 May 2023 15:51
All PostCode/Housenr combinations I have in my test environment for MijnAfvalwijzer (both screenscraping and API modules) are working fine.
Here you go

and for reference a PM ;-0
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 13:05
by Mooms
Domoticz Version: 2023.1 (build 15366)
Datafile:/home/pi/domoticz/scripts/lua/garbagecalendar/data/garbagecalendar_m_mijnafvalwijzer.data
2023-06-19 13:01:00.409 Status: LUA: 13:01:00 gc_main: 595: -> Start looping through data to find the first 3 events to show:
2023-06-19 13:01:00.409 Status: LUA: ==> GarbageDate:2023-6-23 GarbageType:restafval; Notify: Active=on Time=19:22 DaysBefore=1 reminder=0 Calc Days Diff=4
2023-06-19 13:01:00.409 Status: LUA: ==> GarbageDate:2023-6-26 GarbageType:gft; Notify: Active=on Time=19:22 DaysBefore=1 reminder=0 Calc Days Diff=7
2023-06-19 13:01:00.409 Status: LUA: ==> GarbageDate:2023-7-1 GarbageType:papier; Notify: Active=on Time=19:22 DaysBefore=1 reminder=0 Calc Days Diff=12
2023-06-19 13:01:00.410 Status: LUA: 13:01:00 gc_main: 744: -< End data loop
2023-06-19 13:01:00.410 Status: LUA: 13:01:00 gc_main: 756: ==> found schedule:grijze bak: vri 23 jun ; groene bak: maa 26 jun ; blauwe bak: zat 1 jul ;
2023-06-19 13:01:00.410 Status: LUA: 13:01:00 gc_main: 759: ==> FirstGTypeIcon:garbagecalendar_grey
2023-06-19 13:01:00.457 Status: LUA: -----done with error
2023-06-19 13:01:00.457 Status: LUA: /home/pi/domoticz/scripts/lua/garbagecalendar/JSON.lua:808: HTML passed to JSON:decode(): <html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>
Does anyone have idea how to resolve the following error I'm receiving ? I do see correct data however constantly receive the below errror and the sensor I created is not being updated
LUA: /home/pi/domoticz/scripts/lua/garbagecalendar/JSON.lua:808: HTML passed to JSON:decode(): <html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 16:07
by koensch
The error occurs because the json transaction (filename:line number) is done without or with wrong credentials.
You can do 2 things:
- exempt your IP adddress for account validation
- provide correct username/password to the script.
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 17:36
by jvdz
Exempt 127.0.0.1 and things should work fine. This is actually an added json call to update the icon used for the device.
The other option is to use dzvents to run the script as that doesnt require the json call to set the proper icon.
Dzvents is now also supported since the last update.
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 18:40
by Mooms
jvdz wrote: ↑Monday 19 June 2023 17:36
Exempt 127.0.0.1 and things should work fine. This is actually an added json call to update the icon used for the device.
The other option is to use dzvents to run the script as that doesnt require the json call to set the proper icon.
Dzvents is now also supported since the last update.
Yes thank you, I had figured it out myself and indeed this does the trick.
The only bit I’m now struggling with is the loading of the icons. When icons are called the log displays errors like below and provide no output on the customs sensor. When leaving the icons empty as in ‘’ then I do receive output on the custom text sensor.
2023-06-19 18:36:00.298 Status: LUA: 18:36:00 gc_main: 756: ==> found schedule:grijze bak: vri 23 jun ; groene bak: maa 26 jun ; papier: zat 1 jul ;
2023-06-19 18:36:00.298 Status: LUA: 18:36:00 gc_main: 759: ==> FirstGTypeIcon:garbagecalendar_grey
2023-06-19 18:36:00.360 Status: [WebServer] Deprecated RType (custom_light_icons) for API request. Call ignored, please use correct API Command!(127.0.0.1)
Any ideas on the icon error?
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 18:48
by jvdz
Strange that the text isn't displayed and the error you get. I've tested with Beta and didn't get that error anymore.
Could you please provide me with your logfiles in a zip via Email so I can have a look to see what is happening?
EDIT: Scratch that .... I get the same error now with Beta so will have a look.
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 19:13
by Mooms
jvdz wrote: ↑Monday 19 June 2023 18:48
Strange that the text isn't displayed and the error you get. I've tested with Beta and didn't get that error anymore.
Could you please provide me with your logfiles in a zip via Email so I can have a look to see what is happening?
EDIT: Scratch that .... I get the same error now with Beta so will have a look.
Thank you for all the support !
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 19:39
by jvdz
Just uploaded a fix for this issue to Github.
Please try that version to see if that also works for you and now also updates the Text device Icon.
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 19 June 2023 20:09
by Mooms
jvdz wrote: ↑Monday 19 June 2023 19:39
Just uploaded a fix for this issue to Github.
Please try that version to see if that also works for you and now also updates the Text device Icon.
Excellent job ! It now works like a charm.
Many thanks.
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 20 June 2023 14:30
by jvdz
jvdz wrote: ↑Sunday 05 March 2023 14:42
riko wrote: ↑Sunday 05 March 2023 12:37
Same here, RMN changed their app, now de API isn't accessible anymore. The data is somewhere out there, does somebody have a solution?
There is no module for RMN as yet in my GarbageCalendar setup and a quick search tell me they moved and there is no information available yet of which API to use to get the data. When it is know it should be possible to make that module.
Jos
I have added a module to support RMN now as well thanks to the homeassistant folks for figuring it out.
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 20 June 2023 20:32
by mvveelen
I've managed to get it running on my RPi for hvcgroep.nl in Hoorn:

- Schermafbeelding 2023-06-20 om 20.28.53.png (59.37 KiB) Viewed 3038 times
A few questions (I might have overlooked it in the documentation):
- can I tweak the text, if yes, where?
- does anyone have a iconset he/she likes to share?
- how exactly does it work with the notifications?
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 20 June 2023 20:41
by jvdz
mvveelen wrote: ↑Tuesday 20 June 2023 20:32
A few questions (I might have overlooked it in the documentation):
- can I tweak the text, if yes, where?
All setting are done in garbagecalendarconfig.lua.
The Wiki Setup page is your friend when it comes to explaining the options:
https://github.com/jvanderzande/Garbage ... icz-device
mvveelen wrote: ↑Tuesday 20 June 2023 20:32
- does anyone have a iconset he/she likes to share?
You did see that there is a default Icon set ..right? You can ofcourse use your own in case you like different icons!
mvveelen wrote: ↑Tuesday 20 June 2023 20:32
- how exactly does it work with the notifications?
Again ... the wiki does explain the basics:
https://github.com/jvanderzande/Garbage ... evice-icon
Let me know when you have a specific question.
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 20 June 2023 20:54
by mvveelen
Thanks,
- found and changed
- error while uploading iconset: undefined (investigating why
viewtopic.php?t=30754&start=20)
- next on my list