GarbageCalendar (new version) lua scripts

Moderator: leecollings

User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Rolandet
Posts: 95
Joined: Thursday 31 January 2019 21:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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 ;) )
Custodes Septentrionum
User avatar
Rolandet
Posts: 95
Joined: Thursday 31 January 2019 21:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
Custodes Septentrionum
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by jvdz »

Great ..and great race today! 8-)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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!
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by jvdz »

All PostCode/Housenr combinations I have in my test environment for MijnAfvalwijzer (both screenscraping and API modules) are working fine. :)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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 ;-)
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by sincze »

afval.png
afval.png (176.19 KiB) Viewed 2841 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
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
Mooms
Posts: 17
Joined: Monday 09 April 2018 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.01
Location: Valkenswaard
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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
koensch
Posts: 15
Joined: Sunday 27 December 2020 22:55
Target OS: Linux
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Mooms
Posts: 17
Joined: Monday 09 April 2018 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.01
Location: Valkenswaard
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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?
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Mooms
Posts: 17
Joined: Monday 09 April 2018 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.01
Location: Valkenswaard
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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 !
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Mooms
Posts: 17
Joined: Monday 09 April 2018 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.01
Location: Valkenswaard
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
mvveelen
Posts: 686
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by mvveelen »

I've managed to get it running on my RPi for hvcgroep.nl in Hoorn:
Scherm­afbeelding 2023-06-20 om 20.28.53.png
Scherm­afbeelding 2023-06-20 om 20.28.53.png (59.37 KiB) Viewed 2709 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?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
jvdz
Posts: 2208
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
mvveelen
Posts: 686
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by mvveelen »

Thanks,

- found and changed
- error while uploading iconset: undefined (investigating why viewtopic.php?t=30754&start=20)
- next on my list
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest