Page 3 of 23

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 17 February 2020 19:26
by jvdz
Could it be you copied it from your old script and didn't use the provided model config?
This is one of the reasons why I needed to change this as it slowly became a maintenance nightmare as the different scripts had their own variablenames and different level of Dutch/English mix etc.
Main thing is that the garbagecalendarconfig_model.lua file contains the correct information.
In case this isn't correct then please let me know so it can be corrected in Github.

Thanks
Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 17 February 2020 19:29
by BarryT
jvdz wrote: Monday 17 February 2020 19:26 Could it be you copied it from your old script and didn't use the provided model config?
This is one of the reasons why I needed to change this as it slowly became a maintenance nightmare as the different scripts had their own variablenames and different level of Dutch/English mix etc.
Main thing is that the garbagecalendarconfig_model.lua file contains the correct information.
In case this isn't correct then please let me know so it can be corrected in Github.

Thanks
Jos
I think.. you have right..
i guess i accidentally copied the notification text from my older script... #nerdy# :ugeek:

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 23 February 2020 17:40
by JuanUil
Hi Jos,

Where can I change the text wich appers in the textdevice.
For instance I want to change:
GFT Asten ans Plastic Metaal en Drankkortons into:
GFT, PMD

Thanx in advance

Jan

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 23 February 2020 17:49
by jvdz
JuanUil wrote: Sunday 23 February 2020 17:40 Where can I change the text wich appers in the textdevice.
For instance I want to change:
GFT Asten ans Plastic Metaal en Drankkortons into:
GFT, PMD
Hi Jan,

You simply update the text field in table garbagetype_cfg in the garbagecalendarconfig.lua! ;)
Something like this:

Code: Select all

["Plastic, Metaal en Drankkartons"]  ={hour=19,min=02,daysbefore=1,reminder=0,text="PMD"},
... and this section in the config determines the format and which text is shown by defining it in field textformat :

Code: Select all

-- ### define format for text device
   -- date options:
   --    wd   = weekday in 3 characters as defined in the daysoftheweek table below. eg Zon;Maa;Din
   --    dd   = day in 2 digits   eg 31
   --    mm   = month in 2 digits eg 01
   --    mmm  = month abbreviation in 3 characters as defined in the ShortMonth table below. eg : jan
   --    mmmm = month  as defined in the LongMonth table below. eg: januari
   --    yy   = year in 2 digits eg 19
   --    yyyy = year in 4 digits eg 2019
   -- Garbage type description options
   --    sdesc = short garbage type description from Website  eg pmd
   --    ldesc = long garbage type description from Website when available, will be replaced by table description when not
   --    tdesc = Use the description available in the table text field
textformat = "tdesc: wd dd mmm"
-- ### define  what to show in the domoticz text device
   -- false => show multiple occurrences of a garbagetype (default)
   -- true  => show one the next occurrence for a unique garbagetype
ShowSinglePerType = false


Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 23 February 2020 17:58
by JuanUil
HinJos,

I wrote:

Code: Select all

   ["Plastic, Metaal en Drankkartons:"]  ={hour=19,min=22,daysbefore=1,reminder=0,text="pmd"},
But still get the long version in my text device

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 01 March 2020 14:08
by Rowdy
Hello,

I try to make this script work for Almere.
Is there anybody who can help me to make it working, i try olmost everything.

Regards

Rowdy

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 01 March 2020 14:12
by jvdz
Rowdy wrote: Sunday 01 March 2020 14:08 I try to make this script work for Almere.
Is there anybody who can help me to make it working, i try olmost everything.
PM/Email me the details for the website and your address info so I can have a look and test. ;)

Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 01 March 2020 14:30
by Rowdy
jvdz wrote: Sunday 01 March 2020 14:12
Rowdy wrote: Sunday 01 March 2020 14:08 I try to make this script work for Almere.
Is there anybody who can help me to make it working, i try olmost everything.
PM/Email me the details for the website and your address info so I can have a look and test. ;)

Jos
Hello Jos,

A can't use that option to send you a PM or Mail.

Rowdy

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 01 March 2020 14:36
by Rowdy
Rowdy wrote: Sunday 01 March 2020 14:30
jvdz wrote: Sunday 01 March 2020 14:12
Rowdy wrote: Sunday 01 March 2020 14:08 I try to make this script work for Almere.
Is there anybody who can help me to make it working, i try olmost everything.
PM/Email me the details for the website and your address info so I can have a look and test. ;)

Jos
Hello Jos,

A can't use that option to send you a PM or Mail.

Rowdy
I have send you a e-mail ;0)

Rowdy

The messages stay in the outbox, strange :shock:

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 01 March 2020 17:36
by jvdz
The Almere garbage calendar is provided by XIMMIO, so that module needs to be made.
I have a test version written and is being tested at this moment after which it will be added to Github for others to use.
XIMMIO is providing this services to multiple municipalities.

Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Sunday 01 March 2020 19:15
by Rowdy
Rowdy wrote: Sunday 01 March 2020 14:36
Rowdy wrote: Sunday 01 March 2020 14:30
jvdz wrote: Sunday 01 March 2020 14:12
PM/Email me the details for the website and your address info so I can have a look and test. ;)

Jos
Jos,

The new module for Almere works perfect. :D :D
Thanx for the fast reply.

Rowdy

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 14:02
by JuanUil
Hi Jos,

I tried to change the garbage types, which apperently succeeded.
But now I get this.
Allready reinstalled everything but no data is seen.

Code: Select all

2020-03-02 13:58:00.328 Status: LUA: @GarbageCal(m_opzet_api): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-03-02 13:58:00.328 Status: LUA: @GarbageCal(m_opzet_api): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-03-02 13:58:00.328 Status: LUA: @GarbageCal(m_opzet_api): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-03-02 13:58:00.328 Status: LUA: @GarbageCal(m_opzet_api): datafilepath: /var/tmp/
2020-03-02 13:58:00.328 Status: LUA: @GarbageCal(m_opzet_api): scriptpath: /home/pi/domoticz/scripts/lua/
2020-03-02 13:58:00.328 Status: LUA: @GarbageCal(m_opzet_api): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-03-02 13:58:00.329 Status: LUA: @GarbageCal(m_opzet_api): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-03-02 13:58:00.329 Status: LUA: @GarbageCal(m_opzet_api): Start checking garbagetype_cfg table:
2020-03-02 13:58:00.329 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:19:22 Garbagetype:pmd
2020-03-02 13:58:00.329 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:19:22 Garbagetype:gft
2020-03-02 13:58:00.329 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-03-02 13:58:00.329 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:19:22 Garbagetype:papier
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:2:30 Garbagetype:dummy1
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): Start update for text device:
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): - Start looping through data from the website: /var/tmp/garbagecalendar_m_opzet_api.data
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): ### Warning: No valid records found in the datafile: /var/tmp/garbagecalendar_m_opzet_api.data
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): ### Please check the garbagecalendar log files for issues : /var/tmp/garbagecalendar_web_m_opzet_api.log and /var/tmp/garbagecalendar_run_m_opzet_api.log
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): - End -----------------
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): ==> found schedule:
2020-03-02 13:58:00.330 Status: LUA: @GarbageCal(m_opzet_api): Update device from:
2020-03-02 13:58:00.330 0
2020-03-02 13:58:00.330 replace with:
2020-03-02 13:58:00.330
2020-03-02 13:58:00.339 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua
Any idea what I am doing wrong?

This is my config:

Code: Select all

-- Specify your information here as needed for your needs
myGarbageDevice = 'Afval Kalender'      -- The Text devicename in Domoticz
ShowNextEvents = 3                 -- indicate the next x events to show in the TEXT Sensor in Domoticz
Zipcode = '5721 GW'                       -- Your zipcode
Housenr = '74'                       -- Your housnr
Housenrsuf = 'A'                    -- Your housnr suffix                    (Optional: a/b/c  etc)
Hostname = 'https://mijnblink.nl'                      -- Specify the hostname of your website. Only needed for: m_opzet ; m_opzet_api ;
Street=''                          -- Street name                           Only needed for: m_ophaalkalender-be

-- choose one of these modules
--websitemodule = "m_deafvalapp"
--websitemodule = "m_goeree-overflakkee"
--websitemodule = "m_mijnafvalwijzer"
--websitemodule = "m_ophaalkalender-be"
--websitemodule = "m_opzet"
websitemodule = "m_opzet_api"
--websitemodule = "m_westland"
--websitemodule = "m_zuidlimburg"

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 17:43
by jvdz
The posted config is "only" the top part and my wild guess is you made a error in the table. :)
Did you check the /var/tmp/garbagecalendar_web_m_opzet_api.log file for errors as suggested in the posted output?

Send me these files when you want me to look at the issue:
  • /var/tmp/garbagecalendar_web_m_opzet_api.log
  • /var/tmp/garbagecalendar_run_m_opzet_api.log
  • GarbageCalendarConfig.lua
Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 19:10
by JuanUil
Hi Jos,

here is garbagecalendarconfig:

Code: Select all

-----------------------------------------------------------------------------
-- garbagecalendarconfig.lua
-----------------------------------------------------------------------------
-- Specify your information here as needed for your needs
myGarbageDevice = 'Afval Kalender'      -- The Text devicename in Domoticz
ShowNextEvents = 3                 -- indicate the next x events to show in the TEXT Sensor in Domoticz
Zipcode = '5721GW'                       -- Your zipcode
Housenr = '74'                       -- Your housnr
Housenrsuf = 'a'                    -- Your housnr suffix                    (Optional: a/b/c  etc)
Hostname = 'https://mijnblink.nl'                      -- Specify the hostname of your website. Only needed for: m_opzet ; m_opzet_api ;
Street=''                          -- Street name                           Only needed for: m_ophaalkalender-be

-- choose one of these modules
--websitemodule = "m_deafvalapp"
--websitemodule = "m_goeree-overflakkee"
--websitemodule = "m_mijnafvalwijzer"
--websitemodule = "m_ophaalkalender-be"
--websitemodule = "m_opzet"
websitemodule = "m_opzet_api"
--websitemodule = "m_westland"
--websitemodule = "m_zuidlimburg"

-- Switch on mydebug in case of issues and initially and check the domoticz log for any issues or missing
mydebug      = false  -- (true/false)
testdataload = false  -- (true/false)

-- Specify the appropriate directories (Raspberry Pi example)
datafilepath     = '/var/tmp'                           -- specify the directory where the garbagecalendar.data & garbagecalendar.log will be stored
scriptpath       = '/home/pi/domoticz/scripts/lua'      -- specify the directory for the main "script_time_garbagecalendar.lua" script
domoticzjsonpath = '/home/pi/domoticz/scripts/lua'      -- specify the path to domoticz where the JSON.lua file can be found
-- Specify the appropriate directories (Windows example)
--datafilepath     = 'D:/temp'                            -- specify the directory where the garbagecalendar.data & garbagecalendar.log will be stored
--scriptpath       = 'D:/_domoticz/scripts/lua'   -- specify the directory for this script
--domoticzjsonpath = 'D:/_domoticz/scripts/lua'   -- specify the path to domoticz where the JSON.lua file can be found

------------------------------------------------------------------------------------------------------------------------------------
-- ### define format for text device
   -- date options:
   --    wd   = weekday in 3 characters as defined in the daysoftheweek table below. eg Zon;Maa;Din
   --    dd   = day in 2 digits   eg 31
   --    mm   = month in 2 digits eg 01
   --    mmm  = month abbreviation in 3 characters as defined in the ShortMonth table below. eg : jan
   --    mmmm = month  as defined in the LongMonth table below. eg: januari
   --    yy   = year in 2 digits eg 19
   --    yyyy = year in 4 digits eg 2019
   -- Garbage type description options
   --    sdesc = short garbage type description from Website  eg pmd
   --    ldesc = long garbage type description from Website when available, will be replaced by table description when not
   --    tdesc = Use the description available in the table text field
textformat = "tdesc: wd dd mmm"
-- ### define  what to show in the domoticz text device
   -- false => show multiple occurrences of a garbagetype (default)
   -- true  => show one the next occurrence for a unique garbagetype
ShowSinglePerType = false

------------------------------------------------------------------------------------------------------------------------------------
-- Configuration for the Notificaton system:
NotificationEmailAdress = {'',''}  -- Specify multiple Email Addresses for the notifications. Leave empty to skip email notification
Notificationsystem = ''            -- Specify notification system eg "telegram/pushover/gcm/http/kodi/lms/nma/prowl/pushalot/pushbullet/pushsafer" leave empty to skip
Notificationscript = ''            -- Specify personal notification script/command eg:  lua sendmessage.lua "@TEXT@"  (where @TEXT@ will be replaced by the notification text.)
-- Define how the title and bodytext should look
-- @DAY@         ==> Will be replaced by notificationtoday; notificationtomorrow; notificationlonger depending on the days difference.
-- @GARBAGEDATE@ ==> Will be replaced by the pickup date found on the schedule data
-- @GARBAGETEXT@ ==> Will be replaced by the text from garbagetype_cfg[].text field
--### Dutch example
notificationtitle    = 'GarbageCalendar: @DAY@ de @GARBAGETEXT@ aan de weg zetten!'
notificationtext     = '@GARBAGETEXT@ wordt @DAY@ opgehaald!'
notificationtoday    = 'vandaag'
notificationtomorrow = 'morgen'
notificationlonger   = 'over @DAYS@ dagen'
--### English example
--~ notificationtitle    = 'GarbageCalendar: @GARBAGETEXT@ will be picked up in @DAY@!'
--~ notificationtext     = 'Put the @GARBAGETEXT@ out as it will be picked up @DAY@.!'
--~ notificationtoday    = 'today'
--~ notificationtomorrow = 'tomorrow'
--~ notificationlonger   = 'in @DAYS@ days'

------------------------------------------------------------------------------------------------------------------------------------
-- ### define a line for each garbage type returned by the webrequest.
-- Look at the Domoticz log for any missing records as they will be displayed there and can be just copy/pasted in.
-- Fields description:
   -- hour & min ==> the time the check needs to be performed and notification send when daysbefore is true
   -- daysbefore ==> 0 means that the notification is send on the day of the planned garbage collection
   -- daysbefore ==> X means that the notification is send X day(s) before the day of the planned garbage collection
   -- reminder   ==> Will send a second reminder after x hours. 0=no reminder (needs to be in the same day!)
   -- text       ==> define the text for the notification and Text Device.
-- The "reloaddata" entry is required to run the background process to update the data one time per day.
-- The "dummy" entry can be used to force reading the data, update the Domoticz text device and see if there are any errors or missing garbadge types.

garbagetype_cfg = {
-- Add any missing records below this line
   ["Plastic, Metaal en Drankkartons"]                              ={hour=19,min=22,daysbefore=1,reminder=0,text="pmd"},
   ["gft"]                              ={hour=19,min=22,daysbefore=1,reminder=0,text="gft"},
   ["papier"]                           ={hour=19,min=22,daysbefore=1,reminder=0,text="papier"},
-- Add any missing records above this line
   ["reloaddata"]                       ={hour=02,min=30,daysbefore=0,reminder=0,text="trigger for reloading data from website into garbagecalendar.data"},
   ["dummy1"]                           ={hour=02,min=30,daysbefore=0,reminder=0,text="dummy to trigger testing"}}


-------------------------------------------------------------------------
-- Language options Dutch
-- Date/day info:
daysoftheweek={"zon","maa","din","woe","don","vri","zat"}
ShortMonth={"jan","feb","maa","apr","mei","jun","jul","aug","sep","okt","nov","dec"}
LongMonth={"januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"}
-------------------------------------------------------------------------
-- Language options English
-- Date/day info:
--~ daysoftheweek={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}
--~ ShortMonth={"Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"}
--~ LongMonth={"January","February","March","April","May","June","July","August","September","October","November","December"}
I am not able to download the other two log files with filezilla.

hope you can do with this.

thnx for your help

jan

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 19:22
by jvdz
Ok, I understand what your issue is.
Here is the output of garbagecalendar_web_m_opzet_api.log:

Code: Select all

@m_opzet_api:!!! perform background update to D:/temp/garbagecalendar_m_opzet_api.data for Zipcode 5721GW - 74a  (optional) Hostname:https://mijnblink.nl
@m_opzet_api:---- web update ----------------------------------------------------------------------------
@m_opzet_api:sQuery=curl "https://https://mijnblink.nl/rest/adressen/5721GW-74" 2>nul
@m_opzet_api:Error: Empty result from curl command
As you can see there is a clear issue with the URL!
So the issue is that you have specified the whole URL for HostName in your config which should be:

Code: Select all

Hostname = 'mijnblink.nl'  -- Specify the hostname of your website. Only needed for: m_opzet ; m_opzet_api ;
Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 19:25
by JuanUil
did it with nano

Code: Select all

@m_opzet_api:Start garbagekalerder module m_opzet_api (v20200213-2015)
@m_opzet_api:Loaded JSON.lua.
@m_opzet_api:!!! perform background update to /var/tmp/garbagecalendar_m_opzet_$
@m_opzet_api:---- web update --------------------------------------------------$
@m_opzet_api:sQuery=curl "https://https://mijnblink.nl//rest/adressen/5721GW-74$
@m_opzet_api:Error: Empty result from curl command
@m_opzet_api:=> Write data to /var/tmp/garbagecalendar_m_opzet_api.data
and

Code: Select all

@GarbageCalendar(m_opzet_api): #### start garbagecalendar script v20200211-2130
@GarbageCalendar(m_opzet_api): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
@GarbageCalendar(m_opzet_api): datafilepath: /var/tmp/
@GarbageCalendar(m_opzet_api): scriptpath: /home/pi/domoticz/scripts/lua/
@GarbageCalendar(m_opzet_api): Loaded /home/pi/domoticz/scripts/lua/garbagecale$
@GarbageCalendar(m_opzet_api): Loaded /home/pi/domoticz/scripts/lua/garbagecale$
@GarbageCalendar(m_opzet_api): Start checking garbagetype_cfg table:
@GarbageCalendar(m_opzet_api): -> NotificationTime:19:22  Garbagetype:papier
@GarbageCalendar(m_opzet_api): -> NotificationTime:19:22  Garbagetype:Plastic, $
@GarbageCalendar(m_opzet_api): -> NotificationTime:2:30  Garbagetype:dummy1
@GarbageCalendar(m_opzet_api): -> NotificationTime:19:22  Garbagetype:gft
@GarbageCalendar(m_opzet_api): -> NotificationTime:2:30  Garbagetype:reloaddata
@GarbageCalendar(m_opzet_api): Scheduled time(s) not reached yet, so nothing to$



Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 19:29
by jvdz
Nothing was done as you can see in the second log, because debugging is off.
When you want to ensure both the WebUpdate and Check is ran you need to temporarily change these to true:

Code: Select all

mydebug      = true  -- (true/false)
testdataload = true -- (true/false)
Wait till is is ran and change them both back to false. ;)

Jos

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 19:30
by JuanUil
Hi Jos,

Tnx for your help but
replaced to mijnblink.nl but still no result:

Code: Select all

2020-03-02 19:29:00.406 Status: LUA: @GarbageCal(m_opzet_api): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-03-02 19:29:00.406 Status: LUA: @GarbageCal(m_opzet_api): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-03-02 19:29:00.406 Status: LUA: @GarbageCal(m_opzet_api): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-03-02 19:29:00.406 Status: LUA: @GarbageCal(m_opzet_api): datafilepath: /var/tmp/
2020-03-02 19:29:00.406 Status: LUA: @GarbageCal(m_opzet_api): scriptpath: /home/pi/domoticz/scripts/lua/
2020-03-02 19:29:00.406 Status: LUA: @GarbageCal(m_opzet_api): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): Start checking garbagetype_cfg table:
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:2:30 Garbagetype:dummy1
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:19:22 Garbagetype:papier
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:19:22 Garbagetype:Plastic, Metaal en Drankkartons
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:19:22 Garbagetype:gft
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-03-02 19:29:00.407 Status: LUA: @GarbageCal(m_opzet_api): Start update for text device:
2020-03-02 19:29:00.408 Status: LUA: @GarbageCal(m_opzet_api): - Start looping through data from the website: /var/tmp/garbagecalendar_m_opzet_api.data
2020-03-02 19:29:00.408 Status: LUA: @GarbageCal(m_opzet_api): ### Warning: No valid records found in the datafile: /var/tmp/garbagecalendar_m_opzet_api.data
2020-03-02 19:29:00.408 Status: LUA: @GarbageCal(m_opzet_api): ### Please check the garbagecalendar log files for issues : /var/tmp/garbagecalendar_web_m_opzet_api.log and /var/tmp/garbagecalendar_run_m_opzet_api.log
2020-03-02 19:29:00.408 Status: LUA: @GarbageCal(m_opzet_api): - End -----------------
2020-03-02 19:29:00.408 Status: LUA: @GarbageCal(m_opzet_api): ==> found schedule:
2020-03-02 19:29:00.408 Status: LUA: @GarbageCal(m_opzet_api): Update device from:
2020-03-02 19:29:00.408 0
2020-03-02 19:29:00.408 replace with:
2020-03-02 19:29:00.408
2020-03-02 19:29:00.418 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua

Re: GarbageCalendar (new version) lua scripts

Posted: Monday 02 March 2020 19:33
by JuanUil
Sorry didn't put dataload to true
all working now,
thnx again for your help!!!

Re: GarbageCalendar (new version) lua scripts

Posted: Tuesday 03 March 2020 21:32
by Basssment
Hi Jos,

I used your script and it works! I'm verry happy with this!
I ran into 1 problem, if i fill in one emailadres and remove the , in the script and save it.
It does not run.
If i add 2 adresses (what i saw with someone else in this topic) it does not run.
If i remove the adresses and just add the , it all works fine.
what am i doing wrong?

Code: Select all

 2020-03-03 21:27:00.445 Status: LUA: #### start garbagecalendar script v20200211-2130
2020-03-03 21:27:00.445 Status: LUA: Ensure you have copied "garbagecalendarconfig_model.lua" to "garbagecalendarconfig.lua" and modified it to your requirements.
2020-03-03 21:27:00.445 Status: LUA: Also check the path in variable "scriptpath= " is correctly set.
2020-03-03 21:27:00.445 Status: LUA: 1
2020-03-03 21:27:00.445 Error: LUA: Error: failed loading "garbagecalendarconfig.lua" from : "/home/pi/domoticz/scripts/lua/garbagecalendar/"
2020-03-03 21:27:00.445 Error: EventSystem: Lua script /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua did not return a commandArray

Code: Select all

NotificationEmailAdress = {''********@gmail.com,******@hotmail.com''}  -- Specify multiple Email Addresses for the notifications. Leave empty to skip email notification