Page 16 of 18
Re: Sharing : Afval kalendar in text sensor
Posted: Saturday 24 October 2020 17:30
by Dutchsea
Hi Jos,
Thank you for making the changes! And
Great, but you do know there is a new thread for that version here?
Good to know
Also:
The whole set of files as they are on GitHub do need to be stored into “domoticz/scripts/lua"
Yes of course. Should have indeed been “domoticz/scripts/lua" My bad..
Next, my reason for adding the examples of the Zipcode, hostname etc. is because to me it is not obvious how the formating must be done.
So for example if the hostname includes
http://www or not and if the zipcode must include spaces or not. And if the "" characters must be used or replaced. I get you point that people know the information from the website. (However I never looked at the website

, except long time ago to determine the website builder)
Also good to see the seperate section concerning the modules. Maybe you can add a link to this section in your set-up instruction.
Re: Sharing : Afval kalendar in text sensor
Posted: Saturday 24 October 2020 17:43
by jvdz
Dutchsea wrote: ↑Saturday 24 October 2020 17:30
So for example if the hostname includes
http://www or not
Ok understand this comment now, but "technically" is this an URL: "
http://the-hostname/the-page" ...and the hostname is the indicated part.
... but will add an example valid hostname as example.
Dutchsea wrote: ↑Saturday 24 October 2020 17:30
Also good to see the seperate section concerning the modules. Maybe you can add a link to this section in your set-up instruction.
It is mentioned at the bottom of each of the Wiki's pages as footer.
Jos
Re: Sharing : Afval kalendar in text sensor
Posted: Saturday 24 October 2020 21:36
by Dutchsea
See: NOOB.

But learning something every day
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 14:22
by wimbre
Hi,
I have problems adding hardware (dummy) to Domoticz, see earlier post:
viewtopic.php?f=6&t=36293.
My logfile in/var/tmp:
...........
02:31:00 MainScript: -< End data loop
02:31:00 MainScript: ==> found schedule:Grijze container: vrijdag 14 mei ; Groene container: donderdag 20 mei ; Blauwe container: vrijdag 21 mei ;
02:31:00 MainScript: ### Error: Couldn't get the current data from Domoticz text device Containers
Not being able to add hardware (and text sensor) is the cause of this last line.
Is this correct?
If so, I have to get that problem solved first
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 14:34
by plugge
If so, I have to get that problem solved first
Did you allow "Accept new Hardware Devices"? In tab Setup -> Settings.
(In the example below, it is 'Off'.)

- NewHardware.PNG (8.74 KiB) Viewed 1716 times
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 14:40
by waaren
plugge wrote: ↑Friday 14 May 2021 14:34
Did you allow "Accept new Hardware Devices"? In tab Setup -> Settings.
This is not needed for adding a virtual device on dummy hardware.
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 14:45
by wimbre
Yes I dit.
![Image]()
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 15:32
by jvdz
wimbre wrote: ↑Friday 14 May 2021 14:45
Yes I dit.
You just need to add the dummy text device manually first, with the name you've specified in the config!
I also think you are in the wrong (old) thread when you are using the scripts available in my signature.
This is the current one:
viewtopic.php?f=61&t=31295
Jos
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 16:51
by wimbre
Hi Jos,
The name in the config file:
I already tried to add the text manually like this but the add button does not appear.
also think you are in the wrong (old) thread when you are using the scripts available in my signature.
This is the current one: viewtopic.php?f=61&t=31295
I saw a similar message in this thread but did not notice I was in the wrong thread, apologies.
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 17:55
by jvdz
I don't see the dummy hardware in that list and then you need to create the text dummy device first with the appropriate name used in the config.
Jos
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 19:05
by wimbre
I don't see the dummy hardware in that list and then you need to create the text dummy device first with the appropriate name used in the config.
.
Thats just my point.
It seems logical to me that the newly added hardware will appear in the list after hitting the ADD button, but I can't because that button is not visible for me in Domoticz.
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 19:17
by waltervl
wimbre wrote: ↑Friday 14 May 2021 19:05
I don't see the dummy hardware in that list and then you need to create the text dummy device first with the appropriate name used in the config.
.
Thats just my point.
It seems logical to me that the newly added hardware will appear in the list after hitting the ADD button, but I can't because that button is not visible for me in Domoticz.
Then fix that first:
viewtopic.php?f=6&t=36293
Re: Sharing : Afval kalendar in text sensor
Posted: Friday 14 May 2021 19:24
by wimbre
Rebooting the raspberry did the job!
Re: Sharing : Afval kalendar in text sensor
Posted: Tuesday 15 March 2022 19:54
by smaus
My calendar stopped working for two days
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:Opzet Afval module start check
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :Plastic, Metaal en Drankkartons;18;10
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :Dummy1;0;1
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :GFT;18;20
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :Dummy2;0;1
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :Kerstbomen;19;22
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :Restafval;0;1
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:afvaltype_cfg :Papier en karton;18;11
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet module start check for 1442wd-2
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:=== web update ================================
2022-03-15 19:50:00.284 Status: LUA: @AFOpzet:curl --max-time 5 -s "
https://afvalkalender.purmerend.nl/adres/****wd:*:"
2022-03-15 19:50:00.364 Error: LUA: @AFOpzet Error: Could not find the ophaaldata section in the data. skipping the rest of the logic.
Re: Sharing : Afval kalendar in text sensor
Posted: Tuesday 15 March 2022 20:33
by jvdz
Check out this post:
viewtopic.php?p=287867#p287867
.. and reply there please to let me know whether that also fixes it for you.
Jos
Re: Sharing : Afval kalendar in text sensor
Posted: Monday 25 April 2022 9:10
by BarryT
Mijn afvalwijzer geeft een 404 pagina fout, dus het script werkt niet meer..
Het jaaroverzicht werkt nog wel, misschien kan de url aangepast worden om de data daarvandaan te halen?
Alvast bedankt!
Re: Sharing : Afval kalendar in text sensor
Posted: Monday 25 April 2022 9:21
by jvdz
@BarryT,
I think I still have your info and just ran that with my test-setup for
m_mijnafvalwijzer_API and got this result:
Code: Select all
din 3 mei: gft ; vri 6 mei: Blauwe bak ; din 10 mei: pmd
Is that the one or are you running?
So, lets start, as always ,with you sending me your set of logfiles so I can see what is happening.
Jos
Re: Sharing : Afval kalendar in text sensor
Posted: Monday 25 April 2022 19:44
by BarryT
jvdz wrote: ↑Monday 25 April 2022 9:21
@BarryT,
I think I still have your info and just ran that with my test-setup for
m_mijnafvalwijzer_API and got this result:
Code: Select all
din 3 mei: gft ; vri 6 mei: Blauwe bak ; din 10 mei: pmd
Is that the one or are you running?
So, lets start, as always ,with you sending me your set of logfiles so I can see what is happening.
Jos
Hi Jos, thanks for answering...
I'll get:
Code: Select all
Incoming connection from: 192.168.1.11
2022-04-25 16:15:00.537 Status: LUA: 16:15:00 MainScript: => Start update for text device:
2022-04-25 16:15:00.538 Status: LUA: 16:15:00 MainScript: ### Warning: No valid records found in the datafile: /var/tmp/garbagecalendar_m_mijnafvalwijzer.data
2022-04-25 16:15:00.538 Status: LUA: 16:15:00 MainScript: ### Please check the garbagecalendar log files for issues : /var/tmp/garbagecalendar_web_m_mijnafvalwijzer.log and /var/tmp/garbagecalendar_run_m_mijnafvalwijzer.log
2022-04-25 16:15:00.538 Status: LUA: 16:15:00 MainScript: ==> found schedule:
and log:
Code: Select all
08:10:00 m_mijnafvalwijzer: #### Mon Apr 25 08:10:00 2022 ### Start garbagecalendar module m_mijnafvalwijzer (v20201028-1918)
08:10:00 m_mijnafvalwijzer: !!! perform background update to /var/tmp/garbagecalendar_m_mijnafvalwijzer.data for Zipcode 70**** - 4 (optional) Hostname:
08:10:00 m_mijnafvalwijzer: ---- web update ----------------------------------------------------------------------------
08:10:00 m_mijnafvalwijzer: sQuery=curl -k "https://www.mijnafvalwijzer.nl/nl/70****/4" 2>/var/tmp/garbagecalendar_web_err_m_mijnafvalwijzer.log
08:10:03 m_mijnafvalwijzer: ---- web data ----------------------------------------------------------------------------
08:10:03 m_mijnafvalwijzer:
08:10:03 m_mijnafvalwijzer: ---- web err ------------------------------------------------------------------------
08:10:03 m_mijnafvalwijzer: Web_Err= % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
08:10:03 m_mijnafvalwijzer: ---- end web data ------------------------------------------------------------------------
08:10:03 m_mijnafvalwijzer: ### Error: Empty result from curl command
08:10:03 m_mijnafvalwijzer: Error Web_Data is empty.
08:10:03 m_mijnafvalwijzer: => Write data to /var/tmp/garbagecalendar_m_mijnafvalwijzer.data
08:10:03 m_mijnafvalwijzer: ==> Data is saved, file contains 0 records.
Re: Sharing : Afval kalendar in text sensor
Posted: Monday 25 April 2022 19:54
by BarryT
Hmm, weird!
I think they updated the site or page today, i got an 404 error on the page when you entered the zipcode/housenumber.
But, i did an debug and everything works again...
Thanks!
Re: Sharing : Afval kalendar in text sensor
Posted: Tuesday 26 July 2022 20:40
by RonkA
Hello Jos,
I get an error in my log:
- Spoiler: show
- 2022-07-26 20:22:00.410 Status: LUA: 20:22:00 MainScript: ### Start garbagecalendar script v20220503-1709 Tue Jul 26 20:22:00 2022
2022-07-26 20:22:00.410 Status: LUA: 20:22:00 MainScript: ---> Debuging with extra messages because "mydebug=true" in garbagecalendarconfig.lua
2022-07-26 20:22:00.410 Status: LUA: 20:22:00 MainScript: ---> please change it back to "mydebug=false" when done testing to avoid growing a big domoticz log.
2022-07-26 20:22:00.410 Status: LUA: 20:22:00 MainScript: domoticzjsonpath: /opt/domoticz/scripts/lua/
2022-07-26 20:22:00.410 Status: LUA: 20:22:00 MainScript: datafilepath: /opt/domoticz/
2022-07-26 20:22:00.410 Status: LUA: 20:22:00 MainScript: scriptpath: /opt/domoticz/scripts/lua/
2022-07-26 20:22:00.411 Status: LUA: 20:22:00 MainScript: Loaded /opt/domoticz/scripts/lua/garbagecalendar/garbagecalendarconfig.lua.
2022-07-26 20:22:00.411 Status: LUA: 20:22:00 MainScript: Loaded /opt/domoticz/scripts/lua/garbagecalendar/generalfuncs.lua (v20220503-1709)
2022-07-26 20:22:00.411 Error: LUA: 20:22:00 MainScript: ### Error: module not found: /opt/domoticz/scripts/lua/garbagecalendar/m_omrin.lua
2022-07-26 20:22:00.411 Error: LUA: 20:22:00 MainScript: ### Error: Please check the path&name in variables "scriptpath=" "websitemodule= " in your "garbagecalenderconfig.lua" setup and try again.
2022-07-26 20:22:00.411 Error: EventSystem: Lua script /opt/domoticz/userdata/scripts/lua/script_time_garbagecalendar.lua did not return a commandArray
The m_omrin.lua file is in the same directory as garbagecalendarconfig.lua and generalfuncs.lua but gets the error not found.
Piece of my configfile:
- Spoiler: show
- -- ==============================
-- choose one of these modules ==
-- ==============================
--websitemodule = "m_deafvalapp"
--websitemodule = "m_goeree-overflakkee"
--websitemodule = 'm_mijnafvalwijzer'
--websitemodule = "m_montferland"
--websitemodule = "m_recycleapp-be"
--websitemodule = "m_opzet"
--websitemodule = "m_opzet_api"
websitemodule = "m_omrin"
--websitemodule = "m_rova_api"
--websitemodule = "m_westland"
--websitemodule = "m_ximmio" --
--websitemodule = "m_zuidlimburg"
-------------------------------------------------------------------------------------------------------
-- When using a CSV input file uncomment the next 2 lines and specify the location and name of the file.
-- check the m_csv_file.lua file for the appropriate format.
--websitemodule = "m_csv_file"
--input_csv_file = "c:/data/garbage_input.csv"
--input_csv_file = "/home/pi/garbage_input.csv"
-- =====================================================================================================
-- Switch on mydebug in case of issues and initially and check the domoticz log for any issues or missing
mydebug = true -- (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
-- Specify the appropriate directories (Raspberry Pi example)
datafilepath = '/opt/domoticz/' -- specify the directory where the garbagecalendar.data & garbagecalendar.log will be stored
scriptpath = '/opt/domoticz/scripts/lua/' -- specify the directory for the main "script_time_garbagecalendar.lua" script
domoticzjsonpath = '/opt/domoticz/scripts/lua/' -- specify the path to domoticz where the JSON.lua file can be found
I'm stuck! Please advise. Thanks.