GarbageCalendar (new version) lua scripts
Moderator: leecollings
- 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
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
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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- 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
I think.. you have right..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 guess i accidentally copied the notification text from my older script... #nerdy#
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
Software: Linux, Android and Windows
-
- 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
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
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
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
- 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
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"},
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
Last edited by jvdz on Sunday 23 February 2020 18:08, edited 3 times in total.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- 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
HinJos,
I wrote:
But still get the long version in my text device
I wrote:
Code: Select all
["Plastic, Metaal en Drankkartons:"] ={hour=19,min=22,daysbefore=1,reminder=0,text="pmd"},
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
-
- Posts: 7
- Joined: Sunday 13 November 2016 13:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands (Almere)
- Contact:
Re: GarbageCalendar (new version) lua scripts
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
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
Raspberry pi
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
- 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
PM/Email me the details for the website and your address info so I can have a look and test.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 7
- Joined: Sunday 13 November 2016 13:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands (Almere)
- Contact:
Re: GarbageCalendar (new version) lua scripts
Hello Jos,
A can't use that option to send you a PM or Mail.
Rowdy
Raspberry pi
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
-
- Posts: 7
- Joined: Sunday 13 November 2016 13:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands (Almere)
- Contact:
Re: GarbageCalendar (new version) lua scripts
I have send you a e-mail ;0)
Rowdy
The messages stay in the outbox, strange
Raspberry pi
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
- 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
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
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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 7
- Joined: Sunday 13 November 2016 13:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands (Almere)
- Contact:
Re: GarbageCalendar (new version) lua scripts
Raspberry pi
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
RFXtrx433E
Sompfy sunscreen
Promax switches ( action)
Klik aan klik uit switches
must be added:
Ipcamera
motion sensors
Light switches Livolo
Thermometer
Smoke sensors
-
- 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
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.
Any idea what I am doing wrong?
This is my config:
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
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"
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
- 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
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:
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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- 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
Hi Jos,
here is garbagecalendarconfig:
I am not able to download the other two log files with filezilla.
hope you can do with this.
thnx for your help
jan
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"}
hope you can do with this.
thnx for your help
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
- 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
Ok, I understand what your issue is.
Here is the output of garbagecalendar_web_m_opzet_api.log:
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:
Jos
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
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 ;
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- 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
did it with nano
and
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
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$
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
- 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
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:
Wait till is is ran and change them both back to false.
Jos
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)
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- 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
Hi Jos,
Tnx for your help but
replaced to mijnblink.nl but still no result:
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
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
-
- 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
Sorry didn't put dataload to true
all working now,
thnx again for your help!!!
all working now,
thnx again for your help!!!
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
It only works when it is opened!
RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
-
- Posts: 38
- Joined: Thursday 18 October 2018 14:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9700
- Location: netherlands, Kuuk
- Contact:
Re: GarbageCalendar (new version) lua scripts
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?
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
Who is online
Users browsing this forum: No registered users and 0 guests