-
Notifications
You must be signed in to change notification settings - Fork 2
Testing
In case you have issues with your setup you can do the following steps to check for errors:
-
Check if whether these files exist in the directory your defined in garbagecalendarconfig.lua in variable datafilepath:
- 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.
In case any of these is missing:
- Check your access and directory name in case the files do not exist.
- Set any/all of these debugging options to true to test the specified part of the logic:
-- Switch on mydebug in case of issues and initially and check the domoticz log for any issues or missing mydebug = false -- (true/false) -- run the script as it normally does when any of the scheduled times is the current time testdataload = false -- (true/false) -- run the web update module with each run for testing/debugging purposes testnotification = false -- (true/false) -- this will trigger a test notification for the first record for testing the notification system
- Check the garbage_run_modulename.log, garbage_run_update_modulename.log and domoticz log for any errors in case they still don't exist.
-
When these files exist then check the content of garbage_web_modulename.log for any errors. Also check garbage.data for valid table information looking like this format:
return { -- Table: {1} { {2}, {3}, }, -- Table: {2} { ["garbagetype"]="pmd", ["wdesc"]="Plastic, Metalen en Drankkartons", ["garbagedate"]="2020-02-11", }, -- Table: {3} { ["garbagetype"]="gft", ["wdesc"]="Groente, Fruit en Tuinafval", ["garbagedate"]="2020-02-13", }, }
-
When the datafile is available and looking good, then check the garbage_run_modulename.log , garbage_run_update_modulename.log and Domoticz log for any messages in case the text devices isn't updated. Normally it should say something like this in case the new text is the same as the current text (Domoticz text device will still be updated so you can see that the script has ran):
@GarbageCalendar(m_mijnafvalwijzer): ==> found schedule:Plastic, Metalen en Drankkartons: Din 11 feb ; Groente, Fruit en Tuinafval: Don 13 feb ; Plastic, Metalen en Drankkartons: Din 18 feb ; @GarbageCalendar(m_mijnafvalwijzer): No updated text for TxtDevice.
... and this when there is a update to be made for the text device:
@GarbageCalendar(m_mijnafvalwijzer): ==> found schedule:Plastic, Metalen en Drankkartons: Din 11 feb ; Groente, Fruit en Tuinafval: Don 13 feb ; Plastic, Metalen en Drankkartons: Din 18 feb ; @GarbageCalendar(m_mijnafvalwijzer): Update device from: Groente, Fruit en Tuinafval: Don 6 feb Plastic, Metalen en Drankkartons: Din 11 feb Groente, Fruit en Tuinafval: Don 13 feb replace with: Plastic, Metalen en Drankkartons: Din 11 feb Groente, Fruit en Tuinafval: Don 13 feb Plastic, Metalen en Drankkartons: Din 18 feb
When the Domoticz device name is invalid you see something like this:
@GarbageCalendar(m_mijnafvalwijzer): Error: Couldn't get the current data from Domoticz text device Container
-
Notification issues:
- Ensure a record for each garbagetype is added to the garbagetype_cfg table. The log will contain a Warning section when you are missing any record in this table. (see Setup page section 4.iv)
- Ensure you defined an appropriate notification service configured and tested in Domoticz, as defined in Setup paragraph 5.
- Switch on testnotification to force the testing of the notifications:
testnotification = false -- (true/false) -- this will trigger a test notification for the first record for testing the notification system
-
additional checking steps will be added as people start using it and issues are encountered. :-)
More information can be found or questions can asked here: https://www.domoticz.com/forum/viewtopic.php?f=61&t=31295