Page 18 of 25
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 02 May 2022 21:48
by dimple64
Garbagecalendar has worked flawless for more than a year. Suddenly, a few weeks ago (don’t know exactly) the data now contains back slashes and new lines where they don’t belong
The myGarbageDevice in domoticz looks like this:
plastic-\, fruit- en tuinafval
: 10 5 2022
groente-\, fruit- en tuinafval
:13 5 2022
oud papier & karton
: 14 5 2022
I am using afvalkalender.cyclusnv.nl with websitemodule = "m_opzet" I’ve checked the website with webbrowser and everything seems normal.
garbagecalendar_run_m_opzet.log says the sript can't find can't interpret the website data. I have created additonal lines in the garbagetype_cfg table reflecting the changed data, like this:
["plastic\\, metaal en drankenkartons"] ={hour=07,min=02,daysbefore=1,reminder=0,text="plastic and metalwaste"},
["groente-\\, fruit- en tuinafval"] ={hour=07,min=02,daysbefore=1,reminder=0,text="vegetable fruit and gardenwaste"},
["oud papier & karton"] ={hour=07,min=02,daysbefore=1,reminder=0,text="old paper and karton"},
Unfortunately that didn't help. Does anybody else have/had this same issue?? Is there a way to solve this??
thanks in advance!
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 03 May 2022 6:55
by mikeoo
dimple64 wrote: Monday 02 May 2022 21:48
Garbagecalendar has worked flawless for more than a year. Suddenly, a few weeks ago (don’t know exactly) the data now contains back slashes and new lines where they don’t belong
The myGarbageDevice in domoticz looks like this:
plastic-\, fruit- en tuinafval
: 10 5 2022
groente-\, fruit- en tuinafval
:13 5 2022
oud papier & karton
: 14 5 2022
I am using afvalkalender.cyclusnv.nl with websitemodule = "m_opzet" I’ve checked the website with webbrowser and everything seems normal.
garbagecalendar_run_m_opzet.log says the sript can't find can't interpret the website data. I have created additonal lines in the garbagetype_cfg table reflecting the changed data, like this:
["plastic\\, metaal en drankenkartons"] ={hour=07,min=02,daysbefore=1,reminder=0,text="plastic and metalwaste"},
["groente-\\, fruit- en tuinafval"] ={hour=07,min=02,daysbefore=1,reminder=0,text="vegetable fruit and gardenwaste"},
["oud papier & karton"] ={hour=07,min=02,daysbefore=1,reminder=0,text="old paper and karton"},
Unfortunately that didn't help. Does anybody else have/had this same issue?? Is there a way to solve this??
thanks in advance!
Did you try to update GarbageCalendar with the latest files? There are a few files updated so maybe the problem is solved after this.
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 03 May 2022 8:52
by jvdz
dimple64 wrote: Monday 02 May 2022 21:48
Is there a way to solve this??
I would have to test with this to see what is happening. Could you PM me your garbagecalendarconfig.lua so I can use that to test?
Thanks,
Jos
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 03 May 2022 16:06
by dimple64
mikeoo wrote: Tuesday 03 May 2022 6:55
dimple64 wrote: Monday 02 May 2022 21:48
Garbagecalendar has worked flawless for more than a year. Suddenly, a few weeks ago (don’t know exactly) the data now contains back slashes and new lines where they don’t belong
The myGarbageDevice in domoticz looks like this:
plastic-\, fruit- en tuinafval
: 10 5 2022
groente-\, fruit- en tuinafval
:13 5 2022
oud papier & karton
: 14 5 2022
I am using afvalkalender.cyclusnv.nl with websitemodule = "m_opzet" I’ve checked the website with webbrowser and everything seems normal.
garbagecalendar_run_m_opzet.log says the sript can't find can't interpret the website data. I have created additonal lines in the garbagetype_cfg table reflecting the changed data, like this:
["plastic\\, metaal en drankenkartons"] ={hour=07,min=02,daysbefore=1,reminder=0,text="plastic and metalwaste"},
["groente-\\, fruit- en tuinafval"] ={hour=07,min=02,daysbefore=1,reminder=0,text="vegetable fruit and gardenwaste"},
["oud papier & karton"] ={hour=07,min=02,daysbefore=1,reminder=0,text="old paper and karton"},
Unfortunately that didn't help. Does anybody else have/had this same issue?? Is there a way to solve this??
thanks in advance!
Did you try to update GarbageCalendar with the latest files? There are a few files updated so maybe the problem is solved after this.
Yes I did, upgraded after the issue occured. No solution:(
Re: GarbageCalendar (new version) lua scripts
Posted: Tuesday 03 May 2022 17:18
by jvdz
Correct.. in this case the
m_opzet_api module works fine, but the
m_opzet module get's a backslash character in the garbagetype back from the website, which is an issue to handle.
There is now a Develeopment version available which simply removes any \ characters from the garbagetype, as those really shouldn't be in there to begin with.

Re: GarbageCalendar (new version) lua scripts
Posted: Monday 06 June 2022 16:37
by Drees

Or you read the manual
Sorry it is working, i didnt read the manual in github wiki
Sorry, but I'm a Noob about this.
I was trying to use this feature, but i can't figure out what mi doing wrong.
i did go to the jvanderzande / GarbageCalendar
First i had a virtual text object with the name: 'Afval Kalender' and idx 31
i go to Setup\more Options\events
i create a new 'Lua' "all commented' script and called 'garbagecalendarconfig.lua'
i fill in the next 3 lines:
Code: Select all
myGarbageDevice = 'Afval Kalender' -- The Text devicename in Domoticz. eg 'Container'
Zipcode = '2513BN' -- Your zipcode eg '1234AB' --
Housenr = '8' -- Your housnr. eg '99'
i create a new 'Lua' "all commented' script and called 'script_time_garbagewijzer.lua'
without any changes
i create a new 'Lua' "all commented' script and called 'm_mijnafvalwijzer.lua'
without any changes
I understand the name of the scripts are important, but I'm not sure if i also have to add '.lua' or not to the script name.
error from logs
Code: Select all
2022-06-06 16:39:27.142 Error: EventSystem: Lua script script_time_garbagewijzer.lua did not return a commandArray
2022-06-06 16:39:27.149 Error: EventSystem: Lua script garbagecalendarconfig.lua did not return a commandArray
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 22 July 2022 22:57
by TeamKleijn
Hello Jos,
I've implemented the latest version of your garbageCollector scripts. I'm wondering about the fact the script runs every minute. The information the script grabbes isn't far away for updating once every minute. And running the script slow downs my PI because it's very
I think once an hour is good enough.
Do you have possibilities to run the script once an hour ?
Wich changes do applie into your scripts ?
Thanks for responding Jan
Rob
Re: GarbageCalendar (new version) lua scripts
Posted: Friday 22 July 2022 23:12
by jvdz
The script runs each minute as it's purpose id to send you the Notification at the requested time so needs to run every minute, but it will hardly take any time to process as the real heavy lifting, the collection of the WebData, is done once a day and done in the background not burdening the Domoticz single threaded event system.
.. so I am wondering what you are seeing that is worrying you?
Jos
Re: GarbageCalendar (new version) lua scripts
Posted: Saturday 13 August 2022 20:45
by smaus
i get this error
2022-08-13 20:43:00.725 Error: LUA: 20:43:00 MainScript: #### Error: 0 data records, updated at Sat Aug 13 20:43:00 2022 from datafile:/var/tmp/garbagecalendar_m_mijnafvalwijzer.data
can someone help me to sloved this error
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 14 August 2022 9:39
by jvdz
smaus wrote: Saturday 13 August 2022 20:45
can someone help me to sloved this error
Sure .... did you check out the steps in the Wiki?
https://github.com/jvanderzande/Garbage ... ki/Testing
The Webmodule hasn't been able to retrieve the data so that's the log to check first!
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 15 August 2022 17:30
by smaus
Whre can i find garbage.data?
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 15 August 2022 18:51
by jvdz
smaus wrote: Monday 15 August 2022 17:30
Whre can i find garbage.data?
5th line in the Wiki?
In case you have issues with your setup you can do the following steps described below. When you still can't figure out the issue you have, you can also zip up the below defined log & data files and your garbagecalendarconfig.lua file and Email them to my GitHub Email address so I can check what is happening.
Check first your logfiles.
Check these files exist in the directory your defined in garbagecalendarconfig.lua in variable datafilepath whether they exist and/or contain errors:
garbage.data => the file containing the result of the webupdate process by the module.
garbage_run_modulename.log => log of the last time the script was ran
garbage_run_update_modulename.log => log of the last time the script ran the update process
garbage_web_modulename.log => log of the backgroung webupdate process.
So as indicated you probably need to check the last log file in that list as that should contain the nightly update information.
Re: GarbageCalendar (new version) lua scripts
Posted: Monday 26 September 2022 14:08
by Dr8072
Hi jvdz,
Thanks for the hard work...
Just leaving a note for other people in heiloo, uitgeest or castricum when they realise the gemeent has moved away from mijnafvalwijzer to mijnafvalzaken.nl in case they search for these terms
they can use the script m_opzet and use mijafvalzaken.nl as hostname
Re: GarbageCalendar (new version) lua scripts
Posted: Wednesday 04 January 2023 16:52
by jvdz
I am busy making a few changes to garbagecalendar to:
- Allow the script to run in both LUA Time event as well as DzVents
- Added standard notification script that can do Event action in Domoticz when a notification is happening. Eg switch on a light in a particular color for a period. This again supports both commandArray[] as DzVents commands like domoticz.devices(lamp).setLevel(100)
This script can be modified to your needs for easy integration.
- scriptpath variable is removed from the config an determined by the script itself.
Any takers that like to test a development version to ensure things are working in the different environments?
I will make the code available in the Github Development branch somewhere in the next few days.
Jos
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 12:28
by Rolandet
jvdz wrote: Wednesday 04 January 2023 16:52
I am busy making a few changes to garbagecalendar to:
- Allow the script to run in both LUA Time event as well as DzVents
- Added standard notification script that can do Event action in Domoticz when a notification is happening. Eg switch on a light in a particular color for a period. This again supports both commandArray[] as DzVents commands like domoticz.devices(lamp).setLevel(100)
This script can be modified to your needs for easy integration.
- scriptpath variable is removed from the config an determined by the script itself.
Any takers that like to test a development version to ensure things are working in the different environments?
I will make the code available in the Github Development branch somewhere in the next few days.
Jos
Little late, but I can do some testing if you like, but just for the classic setup (no dzvents)
At the moment my scripts isn't working, so I'm fine with some alterations if needed.
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 12:37
by riko
Same here, RMN chenged their app, now de API isn't accessible anymore. The data is somewhere out there, does somebody have a solution?
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 14:42
by jvdz
Rolandet wrote: Sunday 05 March 2023 12:28
[Little late, but I can do some testing if you like, but just for the classic setup (no dzvents)
At the moment my scripts isn't working, so I'm fine with some alterations if needed.
What exactly isn't working with the current GarbageCalendar (Master)?
The Development version of the new version is currently available in the Development branch on github.
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
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 15:17
by Rolandet
jvdz wrote: Sunday 05 March 2023 14:42
Rolandet wrote: Sunday 05 March 2023 12:28
[Little late, but I can do some testing if you like, but just for the classic setup (no dzvents)
At the moment my scripts isn't working, so I'm fine with some alterations if needed.
What exactly isn't working with the current GarbageCalendar (Master)?
The Development version of the new version is currently available in the Development branch on github.
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
Hi Jos.
For Omrin, the data just isn't coming in anymore.
garbagecalender_m_omrin.data:
What's the best way to install the dev branche?
Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 15:31
by jvdz
Maybe first start with updating your setup to the latest version as I did commit an update for OMRIN:
Code: Select all
garbagecalendar - fixed omrin since their website is changed. it now uses an API like HA 2 weeks ago
Jos

Re: GarbageCalendar (new version) lua scripts
Posted: Sunday 05 March 2023 15:34
by Rolandet
jvdz wrote: Sunday 05 March 2023 15:31
Maybe first start with updating your setup to the latest version as I did commit an update for OMRIN:
Code: Select all
garbagecalendar - fixed omrin since their website is changed. it now uses an API like HA 2 weeks ago
Jos
Ha ! I thought that may be a part of your new branch
it's been quite a while. Just follow the initial setup instructions ? (copy files e.a. and save my garbagecalendarconfig.lua)