GarbageCalendar (new version) lua scripts

Moderator: leecollings

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

GarbageCalendar (new version) lua scripts

Post by jvdz »

@All,

The documentation and scripts are committed to the new GITHUB repository: https://github.com/jvanderzande/GarbageCalendar

I am have been reworking the set of scripts currently supported on GITHUB (https://github.com/jvanderzande/mijnafvalwijzer), to make the whole setup modular. The issue that I have is that the script aren't all working in the same way, making it very cumbersome to add/update logic as that would require to visit all the scripts. Also adding new garbage websites was more difficult in the old setup.
The new setup consist of these modules:
  • A single main script with all standard logic for updating Domoticz and sending the notifications, which will be scheduled by the Domoticz event system as Time script running each minute.
  • A personal configuration file avoiding having to copy your settings each time you update the script.
  • A separate script module for each garbage website. You config the module to use in your config file. This module script will be ran by the main script in the background (separate process) ones per day, avoiding to potentially slowdown the event system.
  • Possibility to configure all text so it can be setup for other language than the standard supplied Dutch & English examples.
  • Possibility to create an ICS calendar file to use in a calendar application.
I have also made a TestScript for myself which tests all the different available modules, using the information I have received from some of you while testing, and they all are running fine in my tests.

Here you can find the currently available modules:
https://github.com/jvanderzande/Garbage ... le_modules

In case there are issues, check here for things to check.
When you like my assistance with debugging your issue, just provide me with a copy of the following files in a zip file to my Github email, so I can see what is happening:
  • all 5 garbagecalendar*.log files:
    • garbagecalendar_*modulename*_run.log => log of the last time the script was ran
    • garbagecalendar_*modulename*_run_update.log => log of the last time the script ran the update process in foreground
    • garbagecalendar_*modulename*_run_webupdate_background.log => log of the background webupdate process.
    • garbagecalendar_*modulename*_run_webupdate.log => log of foreground process that shelled the background webupdate process.)
    • garbagecalendar_*modulename*.data => the file containing the result of the webupdate process by the module.
  • garbagecalendarconfig.lua

Ensure you have these variables set in your garbagecalendarconfig.lua as follows, so there will be extra debugging
information in the logfiles:

Code: Select all

-- Switch on mydebug in case of issues and initially and check the domoticz log for any issues or missing
mydebug      = true  -- (true/false)
testdataload = true  -- (true/false)
Cheers,
Jos
Last edited by jvdz on Tuesday 14 April 2020 21:31, edited 12 times in total.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 279
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by eddieb »

Hi Jos,

the script is running here with inzamelkalender.gad.nl using the m_opzet_api as suggested by you.
thanks for your effort.

Eddie
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by JuanUil »

Hi Jos,

looks good, will try this tonight.

Jan
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by rron »

Hello Jos,

Wiil try this also in the weekend and report it back to you.
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by AllesVanZelf »

He Jos,
Very good initiative to recreate the script and make it cleaner.
I disabled the existing script and placed this script in/home/pi/domoticz/scripts/lua
I changed the config according the config of the earlier setup. Suspecting this would work.
But I get this log:

Code: Select all

2020-02-11 14:32:00.560 Status: LUA: @GarbageCal(m_mijnafvalwijzer): #### start garbagecalendar script v20200210-1620
2020-02-11 14:32:00.563 Status: LUA: @GarbageCal(m_mijnafvalwijzer): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-02-11 14:32:00.564 Status: LUA: @GarbageCal(m_mijnafvalwijzer): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-02-11 14:32:00.564 Status: LUA: @GarbageCal(m_mijnafvalwijzer): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-02-11 14:32:00.564 Status: LUA: @GarbageCal(m_mijnafvalwijzer): datafilepath: /var/tmp/
2020-02-11 14:32:00.564 Status: LUA: @GarbageCal(m_mijnafvalwijzer): scriptpath: /home/pi/domoticz/scripts/lua/
2020-02-11 14:32:00.564 Status: LUA: @GarbageCal(m_mijnafvalwijzer): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-02-11 14:32:00.565 Status: LUA: @GarbageCal(m_mijnafvalwijzer): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): Start checking garbagetype_cfg table:
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:14:32 Garbagetype:dummy1
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:19:22 Garbagetype:Kerstbomen
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:19:1 Garbagetype:Takken
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:19:22 Garbagetype:gft
2020-02-11 14:32:00.566 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:19:2 Garbagetype:Plastic, Blik en Drinkpakken
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:19:15 Garbagetype:Restafval
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): -> NotificationTime:19:22 Garbagetype:papier
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): Start update for text device:
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): - Start looping through data from the website: /var/tmp/garbagecalendar.data
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): - End -----------------
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): ==> found schedule:
2020-02-11 14:32:00.567 Status: LUA: @GarbageCal(m_mijnafvalwijzer): Update device from:
2020-02-11 14:32:00.567 0
2020-02-11 14:32:00.567 replace with:
2020-02-11 14:32:00.567
2020-02-11 14:32:00.578 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua 
But myGarbageDevice = 'Afvalwijzer' is not updated.
I have mydebug=true but do not see if I use the right Garbagetype names. This was what I was using, but maybe the script is working different.
Could you have a look at this?
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
User avatar
jvdz
Posts: 2189
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 »

It looks like your garbagecalendar.data file is empty or invalid.
I have just uploaded a modified version for the main script which will add the modulename to the datafilename to avoid an issues for wrong datafiles when the wrong module was selected initially.
Have a look at this Wiki page for debugging: https://github.com/jvanderzande/Garbage ... ki/Testing
.. or send me the 3 files via Email so I can have a look what is happening. :)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by AllesVanZelf »

Ohh. I did something stupid. I chose afvalwijzer module, but I had to use opzet api for afvalkalender.Meerlanden.nl.
It is working now. thank you Jos.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
User avatar
jvdz
Posts: 2189
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 you have it working.
I have added an extra check to the main script to report a warning in case no valid data is found in the data file, pointing you to check the LOGs.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BarryT
Posts: 358
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by BarryT »

Great work Jos!!
I was using your older script for a long time, but this one is much easier..
It works out of the box with mijnafvalwijzer, thanks :-)
jos.jpg
jos.jpg (104.63 KiB) Viewed 8816 times
Raspberry / ESP Boards / Relais / Milight / Hue / OTGW / P1 / Xiaomi / RFXCom / RFLink / ZWave / Conbee II / Z2M / MQTT / A lot of scripts and many more..
Software: Linux, Android and Windows
User avatar
jvdz
Posts: 2189
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 »

Thanks for testing Barry, but I have a different result for your info than I see in your image:

Code: Select all

@GarbageCal(m_mijnafvalwijzer): ==> found schedule:
Oranje Container met Plastic en Metalen: Din 11 feb ; 
Groene Container met Tuinafval: Don 13 feb ; 
Oranje Container met Plastic en Metalen: Din 18 feb ; 
... or am I missing something? :)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BarryT
Posts: 358
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by BarryT »

jvdz wrote: Tuesday 11 February 2020 21:17 Thanks for testing Barry, but I have a different result for your info than I see in your image:

Code: Select all

@GarbageCal(m_mijnafvalwijzer): ==> found schedule:
Oranje Container met Plastic en Metalen: Din 11 feb ; 
Groene Container met Tuinafval: Don 13 feb ; 
Oranje Container met Plastic en Metalen: Din 18 feb ; 
... or am I missing something? :)

Jos
No problem!
I changed the text, i like it small, but the garbages are correct with our postal.
Today it where the green ones since we have a big garden we have 2 green ones, 1 orange, 1 blue and 1 gray garbage. It depends on postal, 10km from here it was orange, in here it was green ;)
Raspberry / ESP Boards / Relais / Milight / Hue / OTGW / P1 / Xiaomi / RFXCom / RFLink / ZWave / Conbee II / Z2M / MQTT / A lot of scripts and many more..
Software: Linux, Android and Windows
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by JuanUil »

Hi Jos,

I miss https://mijnblink.nl/adres/"
so it is not working for me

Jan
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
User avatar
jvdz
Posts: 2189
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 »

JuanUil wrote: Wednesday 12 February 2020 19:55 Hi Jos,

I miss https://mijnblink.nl/adres/"
so it is not working for me

Jan
Hi Jan,

Guess you didn't update for a while ;)
From the old version githib site:
Obsolete:
huisvuil-purmerend (Please use script_time_huisvuil_opzet.lua going forward)
huisvuil-zuidwest-friesland (Please use script_time_huisvuil_opzet.lua going forward)
huisvuil-mijnblink (Please use script_time_huisvuil_opzet.lua going forward)
So use m_opzet_api to be safe, but I think the m_opzet will also work for you.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by JuanUil »

Hi Jos,

followed your advice, this is what I get:

Code: Select all

020-02-13 19:32:00.269 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_TijdSchakelenPIR.lua
2020-02-13 19:32:03.559 Status: OpenZWave: Received timeout notification from HomeID: 3232078985, NodeID: 73 (0x49)
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): #### start garbagecalendar script v20200211-2130
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): #### Debuging dataload each cycle in the foreground because "testdataload=true" in garbagecalendarconfig.lua
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): #### please change it back to "testdataload=false" when done testing to avoid growing a big domoticz log and slowing down the event system.
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): datafilepath: /var/tmp/
2020-02-13 19:33:00.187 Status: LUA: @GarbageCal(m_opzet): scriptpath: /home/pi/domoticz/scripts/lua/
2020-02-13 19:33:00.188 Status: LUA: @GarbageCal(m_opzet): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-02-13 19:33:00.188 Status: LUA: @GarbageCal(m_opzet): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-02-13 19:33:00.188 Status: LUA: @GarbageCal(m_opzet): start foreground webupdate for module m_opzet of file /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 19:33:00.252 Status: LUA: @GarbageCal(m_opzet): lua /home/pi/domoticz/scripts/lua/garbagecalendar/m_opzet.lua "/home/pi/domoticz/scripts/lua/" "5721GW" "74" "a" "/var/tmp/garbagecalendar_m_opzet.data" "/var/tmp/garbagecalendar_web_m_opzet.log" "https://mijnblink.nl/adres/" ""
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): Start checking garbagetype_cfg table:
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:gft
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:papier
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:pmd
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:2:30 Garbagetype:dummy1
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): Start update for text device:
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): - Start looping through data from the website: /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 19:33:00.253 Status: LUA: @GarbageCal(m_opzet): ### Warning: No valid records found in the datafile: /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 19:33:00.254 Status: LUA: @GarbageCal(m_opzet): ### Please check the garbagecalendar log files for issues : /var/tmp/garbagecalendar_web_m_opzet.log and /var/tmp/garbagecalendar_run_m_opzet.log
2020-02-13 19:33:00.254 Status: LUA: @GarbageCal(m_opzet): - End -----------------
2020-02-13 19:33:00.254 Status: LUA: @GarbageCal(m_opzet): ==> found schedule:
2020-02-13 19:33:00.254 Status: LUA: @GarbageCal(m_opzet): Update device from:
2020-02-13 19:33:00.254 0
2020-02-13 19:33:00.254 replace with:
2020-02-13 19:33:00.254
used both opzet_api and opzet
Last edited by JuanUil on Thursday 13 February 2020 19:45, edited 1 time in total.
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by JuanUil »

changed the adress and this is the result:

Code: Select all

020-02-13 19:42:00.252 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagewijzer.lua
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): #### start garbagecalendar script v20200211-2130
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): datafilepath: /var/tmp/
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): scriptpath: /home/pi/domoticz/scripts/lua/
2020-02-13 19:43:00.256 Status: LUA: @GarbageCal(m_opzet): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-02-13 19:43:00.257 Status: LUA: @GarbageCal(m_opzet): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-02-13 19:43:00.257 Status: LUA: @GarbageCal(m_opzet): Start checking garbagetype_cfg table:
2020-02-13 19:43:00.257 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:pmd
2020-02-13 19:43:00.257 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:papier
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:gft
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:2:30 Garbagetype:dummy1
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): Start update for text device:
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): - Start looping through data from the website: /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): ### Warning: No valid records found in the datafile: /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): ### Please check the garbagecalendar log files for issues : /var/tmp/garbagecalendar_web_m_opzet.log and /var/tmp/garbagecalendar_run_m_opzet.log
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): - End -----------------
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): ==> found schedule:
2020-02-13 19:43:00.258 Status: LUA: @GarbageCal(m_opzet): Update device from:
2020-02-13 19:43:00.258 0
2020-02-13 19:43:00.258 replace with:
2020-02-13 19:43:00.258
used both opzet_api and opzet
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
User avatar
jvdz
Posts: 2189
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 »

Could you zip up your config, log files and data file and email that to me so I can check?

Scratch that: you have the wrong host name in your config.
It should be:

Code: Select all

hostname = "mijnblink.nl"                      -- Specify the hostname of your website. eg: afvalkalender.purmerend.nl
EDIT: I had to fix a month abbreviation for maart to make the m_opzet.lua to work. m_opzet_api worked right away with your info.
Just download the latest version from github when you prefer that version else just use the m_opzet_api version which is probably better anyways.

This is what I did you debug: I used your info and ran the script and got this information in garbagecalendar_web_m_opzet.log:

Code: Select all

@m_opzet:Start garbagekalerder module m_opzet (v20200209-1800)
@m_opzet:!!! perform background update to D:/temp/garbagecalendar_m_opzet.data for Zipcode 1111aa - 74a  (optional) Hostname:https://mijnblink.nl/adres/
@m_opzet:---- web update ----------------------------------------------------------------------------
@m_opzet:sQuery=curl ""https://https://mijnblink.nl/adres//adres/1111aa:74:a"" 2>nul
@m_opzet:Error: Empty result from curl command
@m_opzet:Error Web_Data is empty.
@m_opzet:=> Write data to D:/temp/garbagecalendar_m_opzet.data
It shows the error and invalid url. :D

Jos
Last edited by jvdz on Thursday 13 February 2020 20:44, edited 1 time in total.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by JuanUil »

Hi Jos,

changed it but still no update:

Code: Select all

020-02-13 20:38:00.507 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagewijzer.lua
2020-02-13 20:39:00.457 Status: LUA: @GarbageCal(m_opzet): #### start garbagecalendar script v20200211-2130
2020-02-13 20:39:00.458 Status: LUA: @GarbageCal(m_opzet): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-02-13 20:39:00.458 Status: LUA: @GarbageCal(m_opzet): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-02-13 20:39:00.458 Status: LUA: @GarbageCal(m_opzet): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-02-13 20:39:00.458 Status: LUA: @GarbageCal(m_opzet): datafilepath: /var/tmp/
2020-02-13 20:39:00.458 Status: LUA: @GarbageCal(m_opzet): scriptpath: /home/pi/domoticz/scripts/lua/
2020-02-13 20:39:00.458 Status: LUA: @GarbageCal(m_opzet): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): Start checking garbagetype_cfg table:
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:2:30 Garbagetype:dummy1
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:pmd
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:papier
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): -> NotificationTime:19:22 Garbagetype:gft
2020-02-13 20:39:00.459 Status: LUA: @GarbageCal(m_opzet): Start update for text device:
2020-02-13 20:39:00.460 Status: LUA: @GarbageCal(m_opzet): - Start looping through data from the website: /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 20:39:00.460 Status: LUA: @GarbageCal(m_opzet): ### Warning: No valid records found in the datafile: /var/tmp/garbagecalendar_m_opzet.data
2020-02-13 20:39:00.460 Status: LUA: @GarbageCal(m_opzet): ### Please check the garbagecalendar log files for issues : /var/tmp/garbagecalendar_web_m_opzet.log and /var/tmp/garbagecalendar_run_m_opzet.log
2020-02-13 20:39:00.460 Status: LUA: @GarbageCal(m_opzet): - End -----------------
2020-02-13 20:39:00.460 Status: LUA: @GarbageCal(m_opzet): ==> found schedule:
2020-02-13 20:39:00.460 Status: LUA: @GarbageCal(m_opzet): Update device from:
2020-02-13 20:39:00.460 0
2020-02-13 20:39:00.460 replace with:
2020-02-13 20:39:00.460
2020-02-13 20:39:00.470 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagewijzer.lua
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: GarbageCalendar (new version) lua scripts

Post by JuanUil »

switched to the api version and now I have an update!
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
User avatar
jvdz
Posts: 2189
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 »

You need to delete the "empty" data file to trigger the background update or wait till tomorrow. ;)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
jvdz
Posts: 2189
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 »

JuanUil wrote: Thursday 13 February 2020 20:45 switched to the api version and now I have an update!
Correct, as that data file didn't exist yet.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest