Hi Jos
I have to debug / testload the script once in a month to get new data. Otherwise it won't update.
I receiver the following error in
garbagecalendar_web_m_recycleapp-be.log:
Code: Select all
02:30:00 _runmodule: #1 scriptpath /home/pi/domoticz/scripts/lua/garbagecalendar/
02:30:00 _runmodule: --> Start -- foreground _runmodule.lua (v20210330-1836) for garbage module m_recycleapp-be
02:30:00 _runmodule: !! Module m_recycleapp-be had hard error. check log:/var/tmp/garbagecalendar_web_m_recycleapp-be.log
cannot open /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendar/m_recycleapp-be.lua: No such file or directory
stack traceback:
.../domoticz/scripts/lua/garbagecalendar/_runmodule.lua:10: in function <.../domoticz/scripts/lua/garbagecalendar/_runmodule.lua:9>
[C]: in function 'dofile'
.../domoticz/scripts/lua/garbagecalendar/_runmodule.lua:78: in function <.../domoticz/scripts/lua/garbagecalendar/_runmodule.lua:29>
[C]: in function 'xpcall'
.../domoticz/scripts/lua/garbagecalendar/_runmodule.lua:96: in main chunk
[C]: ?
02:30:00 _runmodule: /var/tmp/garbagecalendar_web_m_recycleapp-be.log
02:30:00 _runmodule:
%%%%% LUA Hardcrash log %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02:30:00 _runmodule: nil
02:30:00 _runmodule: stack traceback:
.../domoticz/scripts/lua/garbagecalendar/_runmodule.lua:105: in main chunk
[C]: ?
02:30:00 _runmodule: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02:30:00 _runmodule: --< End module m_recycleapp-be.lua (v??)
"cannot open /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendar/m_recycleapp-be.lua" is indeed true as the garbagecalendar folder is named twice in the error?
Setting debug and testload to true, updates the data file however... If I do this, I have a new data file that's valid for one more month each time...
My latest debug + testload was on 26/04 and gave the following data:
Code: Select all
return {
-- Table: {1}
{
{2},
{3},
{4},
{5},
{6},
{7},
{8},
{9},
["Garbage_LastUpdate"]="Mon Apr 26 10:08:03 2021",
},
-- Table: {2}
{
["garbagedate"]="2021-4-30",
["garbagetype"]="PMD",
},
-- Table: {3}
{
["garbagedate"]="2021-4-30",
["garbagetype"]="Gft",
},
-- Table: {4}
{
["garbagedate"]="2021-5-7",
["garbagetype"]="Restafval",
},
-- Table: {5}
{
["garbagedate"]="2021-5-7",
["garbagetype"]="Glas",
},
-- Table: {6}
{
["garbagedate"]="2021-5-14",
["garbagetype"]="PMD",
},
-- Table: {7}
{
["garbagedate"]="2021-5-14",
["garbagetype"]="Gft",
},
-- Table: {8}
{
["garbagedate"]="2021-5-19",
["garbagetype"]="Papier-karton",
},
-- Table: {9}
{
["garbagedate"]="2021-5-21",
["garbagetype"]="Restafval",
},
}
I have to debug + testload again to make it get new data.
Debug true and testload false gives:
Code: Select all
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: ### Start garbagecalendar script v20210516-1114 Sun May 16 15:28:00 2021
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: ---> Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: ---> please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: datafilepath: /var/tmp/
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: scriptpath: /home/pi/domoticz/scripts/lua/
2021-05-16 15:28:00.504 Status: LUA: 15:28:00 MainScript: Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2021-05-16 15:28:00.507 Status: LUA: 15:28:00 MainScript: Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/generalfuncs.lua (v20210516-1114)
2021-05-16 15:28:00.507 Status: LUA: 15:28:00 MainScript: => Start checking garbagetype_cfg table whether an action is needed:
2021-05-16 15:28:00.507 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:02 Garbagetype=papier-karton
2021-05-16 15:28:00.507 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:02 Garbagetype=glas
2021-05-16 15:28:00.507 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:02 Garbagetype=snoeiafval
2021-05-16 15:28:00.507 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:02 Garbagetype=restafval
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:22 Garbagetype=gft
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:22 Garbagetype=pmd
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: > NotificationTime=02:30 Garbagetype=reloaddata
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: > NotificationTime=02:31 Garbagetype=dummy1
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: > NotificationTime=19:02 Garbagetype=p-k
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: #> Perform update because mydebug=true.
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: => Action starting, First check access to required files:
2021-05-16 15:28:00.508 Status: LUA: 15:28:00 MainScript: Run command:
2021-05-16 15:28:00.508 ls -l /var/tmp/garbagecal*m_recycleapp-be*:
2021-05-16 15:28:00.541 Status: LUA: -rwxrwxrwx 1 root root 784 apr 26 10:08 /var/tmp/garbagecalendar_m_recycleapp-be.data
2021-05-16 15:28:00.541 -rwxrwxrwx 1 root root 1646 mei 16 15:28 /var/tmp/garbagecalendar_run_m_recycleapp-be.log
2021-05-16 15:28:00.541 -rwxrwxrwx 1 root root 2235 mei 16 02:31 /var/tmp/garbagecalendar_run_update_m_recycleapp-be.log
2021-05-16 15:28:00.541 -rwxrwxrwx 1 root root 1361 mei 16 02:30 /var/tmp/garbagecalendar_web_m_recycleapp-be.log
2021-05-16 15:28:00.542 Status: LUA: 15:28:00 MainScript: Access OK: /var/tmp/garbagecalendar_m_recycleapp-be.data
2021-05-16 15:28:00.542 Status: LUA: 15:28:00 MainScript: Access OK: /var/tmp/garbagecalendar_run_m_recycleapp-be.log
2021-05-16 15:28:00.542 Status: LUA: 15:28:00 MainScript: Access OK: /var/tmp/garbagecalendar_web_m_recycleapp-be.log
2021-05-16 15:28:00.542 Status: LUA: 15:28:00 MainScript: => Start update for text device:
2021-05-16 15:28:00.543 Status: LUA: 15:28:00 MainScript: 8 data records loaded, updated at Mon Apr 26 10:08:03 2021 from datafile:/var/tmp/garbagecalendar_m_recycleapp-be.data
2021-05-16 15:28:00.543 Status: LUA: 15:28:00 MainScript: -> Start looping through data to find the first 3 events to show:
2021-05-16 15:28:00.545 Status: LUA: ==> GarbageDate:2021-5-19 GarbageType:papier-karton; Notify: Active=on Time=19:2 DaysBefore=1 reminder=0 Calc Days Diff=3
2021-05-16 15:28:00.545 Status: LUA: ==> GarbageDate:2021-5-21 GarbageType:restafval; Notify: Active=on Time=19:2 DaysBefore=1 reminder=0 Calc Days Diff=5
2021-05-16 15:28:00.545 Status: LUA: 15:28:00 MainScript: -< End data loop
2021-05-16 15:28:00.545 Status: LUA: 15:28:00 MainScript: ==> found schedule:Papier-karton: woe 19 mei ; Restafval: vri 21 mei ;
2021-05-16 15:28:00.546 Status: LUA: 15:28:00 MainScript: No updated text for TxtDevice.
2021-05-16 15:28:00.546 Status: LUA: 15:28:00 MainScript: ==< End garbagecalendar script v20210516-1114
2021-05-16 15:28:00.560 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua