Pardon meNah ... he is using the provide scripts.
Jos

Moderator: leecollings
Code: Select all
-- Add any missing records below this line
["PMD"] ={hour=19,min=22,daysbefore=1,reminder=0,text="PMD"},
["GFT"] ={hour=19,min=22,daysbefore=1,reminder=0,text="GFT"},
["P-K"] ={hour=19,min=22,daysbefore=1,reminder=0,text="Papier"},
Creating the file "garbagecalendar_m_ophaalkalender-be.data"2020-04-05 19:53:00.479 Status: LUA: !!! table.load error:cannot open /home/pi/domoticz/logs/garbagecalendar_m_ophaalkalender-be.data: No such file or directory
2020-04-05 19:54:00.484 Status: LUA: @GarbageCal(m_ophaalkalender-be): #### Sun Apr 5 19:54:00 2020 ### Start garbagecalendar script v20200404-1400
2020-04-05 19:54:00.484 Status: LUA: @GarbageCal(m_ophaalkalender-be): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2020-04-05 19:54:00.484 Status: LUA: @GarbageCal(m_ophaalkalender-be): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2020-04-05 19:54:00.484 Status: LUA: @GarbageCal(m_ophaalkalender-be): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
2020-04-05 19:54:00.484 Status: LUA: @GarbageCal(m_ophaalkalender-be): datafilepath: /home/pi/domoticz/logs/
2020-04-05 19:54:00.484 Status: LUA: @GarbageCal(m_ophaalkalender-be): scriptpath: /home/pi/domoticz/scripts/lua/
2020-04-05 19:54:00.485 Status: LUA: @GarbageCal(m_ophaalkalender-be): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2020-04-05 19:54:00.486 Status: LUA: @GarbageCal(m_ophaalkalender-be): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
2020-04-05 19:54:00.486 Status: LUA: @GarbageCal(m_ophaalkalender-be): Start checking garbagetype_cfg table:
2020-04-05 19:54:00.486 Status: LUA: @GarbageCal(m_ophaalkalender-be): P-K change to p-k
2020-04-05 19:54:00.487 Status: LUA: @GarbageCal(m_ophaalkalender-be): PMD change to pmd
2020-04-05 19:54:00.487 Status: LUA: @GarbageCal(m_ophaalkalender-be): Glas change to glas
2020-04-05 19:54:00.487 Status: LUA: @GarbageCal(m_ophaalkalender-be): GFT change to gft
2020-04-05 19:54:00.487 Status: LUA: @GarbageCal(m_ophaalkalender-be): Restafval change to restafval
2020-04-05 19:54:00.487 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:pmd
2020-04-05 19:54:00.487 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:restafval
2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:2:30 Garbagetype:reloaddata
2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:p-k
2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:2:31 Garbagetype:dummy1
2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:glas
2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:gft
2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): Start update for text device:
2020-04-05 19:54:00.489 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua: .../pi/domoticz/scripts/lua/garbagecalendar/table_funcs.lua:124: attempt to concatenate a nil value (local 'err')
The recent versions are case insensitive, so shouldn't matter.iTDB wrote: ↑Sunday 05 April 2020 17:51 Sorry, my fault. I had the old (mijnafvalwijzer) and the new (GarbageCalendar) in the lua folder.
Old ones removed and no more errors. And for street just placed 'Pintelaan'.
Text Sensor data remains 'Hello World'
Does it matter for case sensitivity > PMD / pmd ?
That error shouldn't happen and should be changed to a friendly one, so will fix that in the next release, but it means it was unable to load the data file. Could there be an issue with the rights for the process to open the file?iTDB wrote: ↑Sunday 05 April 2020 20:09 2020-04-05 19:54:00.488 Status: LUA: @GarbageCal(m_ophaalkalender-be): Start update for text device:
2020-04-05 19:54:00.489 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua: .../pi/domoticz/scripts/lua/garbagecalendar/table_funcs.lua:124: attempt to concatenate a nil value (local 'err')
garbagecalendar_run_update_m_ophaalkalender-be.log@GarbageCal(m_ophaalkalender-be): #### Sun Apr 5 20:11:00 2020 ### Start garbagecalendar script v20200404-1400
@GarbageCal(m_ophaalkalender-be): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
@GarbageCal(m_ophaalkalender-be): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
@GarbageCal(m_ophaalkalender-be): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
@GarbageCal(m_ophaalkalender-be): datafilepath: /home/pi/domoticz/logs/
@GarbageCal(m_ophaalkalender-be): scriptpath: /home/pi/domoticz/scripts/lua/
@GarbageCal(m_ophaalkalender-be): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
@GarbageCal(m_ophaalkalender-be): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
@GarbageCal(m_ophaalkalender-be): Start checking garbagetype_cfg table:
@GarbageCal(m_ophaalkalender-be): GFT change to gft
@GarbageCal(m_ophaalkalender-be): P-K change to p-k
@GarbageCal(m_ophaalkalender-be): PMD change to pmd
@GarbageCal(m_ophaalkalender-be): Restafval change to restafval
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:restafval
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:2:30 Garbagetype:reloaddata
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:p-k
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:Glas
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:pmd
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:gft
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:2:31 Garbagetype:dummy1
@GarbageCal(m_ophaalkalender-be): Start update for text device:
garbagecalendar_web_m_ophaalkalender-be.log@GarbageCal(m_ophaalkalender-be): #### Sun Apr 5 19:53:00 2020 ### Start garbagecalendar script v20200404-1400
@GarbageCal(m_ophaalkalender-be): #### Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
@GarbageCal(m_ophaalkalender-be): #### please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
@GarbageCal(m_ophaalkalender-be): domoticzjsonpath: /home/pi/domoticz/scripts/lua/
@GarbageCal(m_ophaalkalender-be): datafilepath: /home/pi/domoticz/logs/
@GarbageCal(m_ophaalkalender-be): scriptpath: /home/pi/domoticz/scripts/lua/
@GarbageCal(m_ophaalkalender-be): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
@GarbageCal(m_ophaalkalender-be): Loaded /home/pi/domoticz/scripts/lua/garbagecalendar/tablefuncs.lua.
@GarbageCal(m_ophaalkalender-be): Start checking garbagetype_cfg table:
@GarbageCal(m_ophaalkalender-be): P-K change to p-k
@GarbageCal(m_ophaalkalender-be): PMD change to pmd
@GarbageCal(m_ophaalkalender-be): GFT change to gft
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:p-k
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:pmd
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:2:31 Garbagetype:dummy1
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:Glas
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:Restafval
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:2:30 Garbagetype:reloaddata
@GarbageCal(m_ophaalkalender-be): -> NotificationTime:19:22 Garbagetype:gft
@GarbageCal(m_ophaalkalender-be): Start update for text device:
@GarbageCal(m_ophaalkalender-be): Warning: Datafile not found:/home/pi/domoticz/logs/garbagecalendar_m_ophaalkalender-be.data . Start webupdate now.
@GarbageCal(m_ophaalkalender-be): start foreground webupdate for module m_ophaalkalender-be of file /home/pi/domoticz/logs/garbagecalendar_m_ophaalkalender-be.data
@GarbageCal(m_ophaalkalender-be): lua /home/pi/domoticz/scripts/lua/garbagecalendar/m_ophaalkalender-be.lua "/home/pi/domoticz/scripts/lua/" "9000" "59" "" "/home/pi/domoticz/logs/garbagecalendar_m_ophaalkalender-be.data" "/home/pi/domoticz/logs/garbagecalendar_web_m_ophaalkalender-be.log" "" "Pintelaan"
@GarbageCal(m_ophaalkalender-be): Unable to load the data. please check your setup and runlogfile :/home/pi/domoticz/logs/garbagecalendar_run_m_ophaalkalender-be.log
@GarbageCal(m_ophaalkalender-be): ### Warning: No valid records found in the datafile: /home/pi/domoticz/logs/garbagecalendar_m_ophaalkalender-be.data
@GarbageCal(m_ophaalkalender-be): ### Please check the garbagecalendar log files for issues : /home/pi/domoticz/logs/garbagecalendar_web_m_ophaalkalender-be.log and /home/pi/domoticz/logs/garbagecalendar_run_m_ophaalkalender-be.log
@GarbageCal(m_ophaalkalender-be): - End -----------------
@GarbageCal(m_ophaalkalender-be): ==> found schedule:
@GarbageCal(m_ophaalkalender-be): Update device from:
Hello World
replace with:
@m_ophaalkalender-be:#### Sun Apr 5 19:53:00 2020 ### Start garbagekalerder module m_ophaalkalender-be (v20200317-1600)
@m_ophaalkalender-be:Loaded JSON.lua.
@m_ophaalkalender-be:!!! perform background update to /home/pi/domoticz/logs/garbagecalendar_m_ophaalkalender-be.data for Zipcode 9000 - 59 (optional) Hostname:
@m_ophaalkalender-be:---- web update ----------------------------------------------------------------------------
@m_ophaalkalender-be:sQuery=curl "https://www.ophaalkalender.be/Calendar/ ... pcode=9000" 2>nul
lua: .../scripts/lua/garbagecalendar/m_ophaalkalender-be.lua:113: attempt to index global 'adressdata' (a nil value)
stack traceback:
.../scripts/lua/garbagecalendar/m_ophaalkalender-be.lua:113: in function 'Perform_Update'
.../scripts/lua/garbagecalendar/m_ophaalkalender-be.lua:175: in main chunk
[C]: ?
@m_ophaalkalender-be:Web_Data=
@m_ophaalkalender-be:Error: Empty result from curl command
@m_ophaalkalender-be:adressid:
Code: Select all
pi@raspbian:~ $ lua -v
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
pi@raspbian:~ $ curl --version
curl 7.64.0 (arm-unknown-linux-gnueabihf) libcurl/7.64.0 OpenSSL/1.1.1d zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
So what happens when you go onto your RPI and do these commands:iTDB wrote: ↑Monday 06 April 2020 1:11 It's installedCode: Select all
pi@raspbian:~ $ curl --version curl 7.64.0 (arm-unknown-linux-gnueabihf) libcurl/7.64.0 OpenSSL/1.1.1d zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Code: Select all
cd /home/pi/domoticz/scripts/lua/
curl "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000"
Code: Select all
2020-04-06 16:07:00.338 Status: LUA: #### 16:07:00 start garbagecalendar script v20200404-1400
2020-04-06 16:07:00.344 Status: LUA: Ensure you have copied "garbagecalendarconfig_model.lua" to "garbagecalendarconfig.lua" and modified it to your requirements.
2020-04-06 16:07:00.346 Status: LUA: Also check the path in variable "scriptpath= " is correctly set.
2020-04-06 16:07:00.346 Status: LUA: 1
2020-04-06 16:07:00.341 Error: LUA: !!! Error: failed loading "garbagecalendarconfig.lua" from : "/home/pi/domoticz/scripts/lua/garbagecalendar/"
2020-04-06 16:07:00.346 Error: EventSystem: Lua script /home/pi/domoticz/scripts/lua/script_time_garbagecalendar.lua did not return a commandArray
Code: Select all
pi@rpi-domoticz:~/domoticz/scripts/lua $ ls -l
totaal 120
drwxr-xr-x 2 pi pi 4096 apr 6 16:09 garbagecalendar
-rw-r--r-- 1 pi pi 50533 mei 10 2019 JSON.lua
-rw-r--r-- 1 pi pi 1870 mei 10 2019 script_device_demo.lua
-rw-r--r-- 1 pi pi 1932 mei 10 2019 script_time_demo.lua
-rw-r--r-- 1 pi pi 26990 apr 6 15:45 script_time_garbagecalendar.lua
-rw-r--r-- 1 pi pi 5968 nov 24 08:36 xml2lua.lua
drwxr-xr-x 2 pi pi 4096 nov 24 08:36 xmlhandler
-rw-r--r-- 1 pi pi 12387 nov 24 08:36 XmlParser.lua
pi@rpi-domoticz:~/domoticz/scripts/lua $
and:
pi@rpi-domoticz:~/domoticz/scripts/lua $ ls -l garbagecalendar/
totaal 136
-rw-r--r-- 1 pi pi 9746 apr 6 16:09 garbagecalendarconfig.lua
-rw-r--r-- 1 pi pi 7798 feb 11 19:39 garbagecalendarconfig.lua.bkup
-rw-r--r-- 1 pi pi 9727 apr 6 15:55 garbagecalendarconfig_model.lua
-rw-r--r-- 1 pi pi 7455 apr 6 15:45 m_deafvalapp.lua
-rw-r--r-- 1 pi pi 7554 apr 6 15:45 m_goeree-overflakkee.lua
-rw-r--r-- 1 pi pi 8999 apr 6 15:45 m_mijnafvalwijzer.lua
-rw-r--r-- 1 pi pi 8928 apr 6 15:45 m_montferland.lua
-rw-r--r-- 1 pi pi 7814 apr 6 15:45 m_ophaalkalender-be.lua
-rw-r--r-- 1 pi pi 9319 apr 6 15:45 m_opzet_api.lua
-rw-r--r-- 1 pi pi 8495 apr 6 15:45 m_opzet.lua
-rw-r--r-- 1 pi pi 7786 apr 6 15:45 m_westland.lua
-rw-r--r-- 1 pi pi 9867 apr 6 15:45 m_ximmio.lua
-rw-r--r-- 1 pi pi 7706 apr 6 15:45 m_zuidlimburg.lua
-rw-r--r-- 1 pi pi 3829 apr 6 15:45 table_funcs.lua
pi@rpi-domoticz:~/domoticz/scripts/lua $
Jos2020-04-06 16:07:00.344 Status: LUA: Ensure you have copied "garbagecalendarconfig_model.lua" to "garbagecalendarconfig.lua" and modified it to your requirements.
----
2020-04-06 16:07:00.341 Error: LUA: !!! Error: failed loading "garbagecalendarconfig.lua" from : "/home/pi/domoticz/scripts/lua/garbagecalendar/"
Code: Select all
----------------------------------------------------------------------------
-- garbagecalendarconfig.lua
-----------------------------------------------------------------------------
-- Specify your information here as needed for your needs
myGarbageDevice = 'Afvalwijzer' -- The Text devicename in Domoticz
ShowNextEvents = 3 -- indicate the next x events to show in the TEXT Sensor in Domoticz
Zipcode = '2100aa' -- Your zipcode aangepast om privacy redenen
Housenr = '1' -- Your housnr
Housenrsuf = '' -- Your housnr suffix (Optional: a/b/c etc)
Street='' -- Street name Only needed for: m_ophaalkalender-be
Hostname = 'afvalkalender.meerlanden.nl' -- Specify the hostname of your website. Only needed for: m_opzet ; m_opzet_api ;
-- OR Specify the companycode for the m_ximmio.lua module. See m_ximmio.lua on how to find this code.
-- choose one of these modules
--websitemodule = "m_deafvalapp"
--websitemodule = "m_goeree-overflakkee"
--websitemodule = "m_mijnafvalwijzer"
--websitemodule = "m_montferland"
--websitemodule = "m_ophaalkalender-be"
--websitemodule = "m_opzet"
websitemodule = "m_opzet_api"
--websitemodule = "m_westland"
--websitemodule = "m_ximmio" --
--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 wil$
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)
Code: Select all
liblua5.2-0/stable,now 5.2.4-1.1+b1 armhf [ge�nstalleerd,automatisch]
liblua5.3-0/stable,now 5.3.3-1.1 armhf [ge�nstalleerd,automatisch]
Code: Select all
pi@rpi-domoticz:~ $ lua -v
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
Not sure about LUA 5.1 but I am using 5.2.3 & 5.2.4 on my systems.AllesVanZelf wrote: ↑Monday 06 April 2020 17:54 Yes, I did. But maybe I'm missing something. Have a look in the second codefield above this post.
-rw-r--r-- 1 pi pi 9746 apr 6 16:09 garbagecalendarconfig.lua
-snip-
... I will be happy to have a closer look at them and let you know.
jvdz wrote: ↑Monday 06 April 2020 9:37 So what happens when you go onto your RPI and do these commands:Code: Select all
cd /home/pi/domoticz/scripts/lua/ curl "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000"
Jos
Code: Select all
pi@raspbian:~/domoticz/scripts/lua $ curl "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000"
curl: (35) error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
So it looks like you have a version of curl installed that doesn't support ssl?iTDB wrote: ↑Monday 06 April 2020 18:48Code: Select all
pi@raspbian:~/domoticz/scripts/lua $ curl "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000" curl: (35) error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
No idea. It is the Curl version in 2020-02-13 raspbian buster and upgrade the raspbian
I do that
Code: Select all
curl --tlsv1.0 "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000"
Samejvdz wrote: ↑Monday 06 April 2020 19:28 Could you try this command to force a lower tlsv?:Code: Select all
curl --tlsv1.0 "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000"
Code: Select all
pi@raspbian:~/domoticz/scripts/lua $ curl --tlsv1.0 "https://www.ophaalkalender.be/Calendar/findstreets/?query=Pintelaan&zipcode=9000"
curl: (35) error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
pi@raspbian:~/domoticz/scripts/lua $
It looks like ophaalkalender.be uses tls1. This is a problem on debian.jvdz wrote: ↑Tuesday 07 April 2020 11:07 As that article states: there is are some defaults changed for ssl in buster, but i do not have a system running on buster yet so can't test.
Maybe it is possible to run a demian buster in VMware so I can test?
... else I am depending on somebody helping me out and finding the root cause for getting the data of this particular website with curl.
Ideas/suggestions welcome!![]()
you could try changing that line to "curl --tlsv1.1" or 1.2 or 1.3.
Jos
Maybe it works if you change this value in /etc/ssl/openssl.cnf to MinProtocol = TLSv1.0.With the introduction of openssl version 1.1.1 in Debian the defaults are set to more secure values by default. This is done in the /etc/ssl/openssl.cnf config file. At the end of the file there is:
[system_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT@SECLEVEL=2
Users browsing this forum: No registered users and 1 guest