Sharing : Afval kalendar in text sensor

Moderator: leecollings

User avatar
Dutchsea
Posts: 120
Joined: Tuesday 08 December 2015 13:22
Target OS: Raspberry Pi / ODroid
Domoticz version: v2023.2
Location: The Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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 :D, 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.
Raspberry PI 3B on USB drive, Debian version: 12 (bookworm), Domoticz 2024.7
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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. :D
... 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Dutchsea
Posts: 120
Joined: Tuesday 08 December 2015 13:22
Target OS: Raspberry Pi / ODroid
Domoticz version: v2023.2
Location: The Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by Dutchsea »

Ok understand this comment now, but "technically" is this an URL: "http://the-hostname/the-page" ...and the hostname is the indicated part.
See: NOOB. :D But learning something every day
Raspberry PI 3B on USB drive, Debian version: 12 (bookworm), Domoticz 2024.7
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
wimbre
Posts: 11
Joined: Saturday 14 November 2020 11:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
plugge

Re: Sharing : Afval kalendar in text sensor

Post 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
NewHardware.PNG (8.74 KiB) Viewed 1596 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
wimbre
Posts: 11
Joined: Saturday 14 November 2020 11:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by wimbre »

Yes I dit.
Image
Attachments
Schermafbeelding 2021-05-14 om 14.43.48.png
Schermafbeelding 2021-05-14 om 14.43.48.png (143 KiB) Viewed 1593 times
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by jvdz »

wimbre wrote: Friday 14 May 2021 14:45 Yes I dit.
Image
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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
wimbre
Posts: 11
Joined: Saturday 14 November 2020 11:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by wimbre »

Hi Jos,

The name in the config file:
Image

I already tried to add the text manually like this but the add button does not appear.
Image
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.
Attachments
Schermafbeelding 2021-05-14 om 16.38.30.png
Schermafbeelding 2021-05-14 om 16.38.30.png (160.3 KiB) Viewed 1575 times
Schermafbeelding 2021-05-14 om 16.34.04.png
Schermafbeelding 2021-05-14 om 16.34.04.png (87.37 KiB) Viewed 1575 times
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
wimbre
Posts: 11
Joined: Saturday 14 November 2020 11:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.
User avatar
waltervl
Posts: 5722
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
wimbre
Posts: 11
Joined: Saturday 14 November 2020 11:07
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by wimbre »

Rebooting the raspberry did the job!
smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BarryT
Posts: 367
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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!
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BarryT
Posts: 367
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.
BarryT
Posts: 367
Joined: Tuesday 31 March 2015 22:06
Target OS: Linux
Domoticz version: 2024.3
Location: east netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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!
User avatar
RonkA
Posts: 100
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2025.1
Location: Harlingen
Contact:

Re: Sharing : Afval kalendar in text sensor

Post 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.
SolarEdge ModbusTCP - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest