Sharing : Afval kalendar in text sensor

Moderator: leecollings

Post Reply
User avatar
jvdz
Posts: 2189
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 »

Reley wrote: Thursday 04 October 2018 8:13 I am sorry guys, but i'm not able to get this to work.
-snip-
any ideas?
I would need to see the whole script to see what you have done with the settings and to be able to test it.
You can also PM it or Email it (jvdzande at yahoo dot com) in case you don't want to share it here publicly.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
jvdz
Posts: 2189
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 have committed an update to https:github to fix an issue encountered while testing with the script for @Reley.
The information for his area had an issue where the afval type description contained 2 spaces between two words creating an issue that it looks like there is only one space and thus not matches with the description in the table. The script will now replace multiple spaces with only one to fix this.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BarryT
Posts: 358
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 »

Since last week the script isnt working anymore?

The log shows:

Code: Select all

2018-12-10 21:54:00.200 Status: LUA: afvalWijzer module start check
2018-12-10 21:54:00.200 Status: LUA: @AFW:=== web update ================================
2018-12-10 21:54:01.151 Status: LUA: os.capture needed more than 1 call: 5
2018-12-10 21:54:01.151 Status: LUA: afvalWijzer: Empty result from curl command
2018-12-10 21:54:01.156 Status: LUA: Lampen Garage UIT, 2 minuten geen beweging
2018-12-10 21:55:00.215 Status: LUA: @AFW:afvaltype_cfg :Restafval;21;55
2018-12-10 21:55:00.215 Status: LUA: @AFW:afvaltype_cfg :dummy;21;54
2018-12-10 21:55:00.215 Status: LUA: @AFW:afvaltype_cfg :Klein chemisch afval;21;55
2018-12-10 21:55:00.215 Status: LUA: @AFW:afvaltype_cfg :Papier en karton;21;55
2018-12-10 21:55:00.215 Status: LUA: @AFW:afvaltype_cfg :Groente, Fruit en Tuinafval;21;55
2018-12-10 21:55:00.215 Status: LUA: @AFW:afvaltype_cfg :Plastic, Metalen en Drankkartons;21;55
2018-12-10 21:55:00.215 Status: LUA: afvalWijzer module start check
2018-12-10 21:55:00.216 Status: LUA: @AFW:=== web update ================================
2018-12-10 21:55:00.864 Status: LUA: os.capture needed more than 1 call: 5
2018-12-10 21:55:00.864 Status: LUA: afvalWijzer: Empty result from curl command
2018-12-10 21:56:00.219 Status: LUA: @AFW:afvaltype_cfg :Groente, Fruit en Tuinafval;21;55
2018-12-10 21:56:00.219 Status: LUA: @AFW:afvaltype_cfg :Klein chemisch afval;21;55
2018-12-10 21:56:00.220 Status: LUA: @AFW:afvaltype_cfg :Plastic, Metalen en Drankkartons;21;55
2018-12-10 21:56:00.220 Status: LUA: @AFW:afvaltype_cfg :Restafval;21;55
2018-12-10 21:56:00.220 Status: LUA: @AFW:afvaltype_cfg :Papier en karton;21;55
2018-12-10 21:56:00.220 Status: LUA: @AFW:afvaltype_cfg :dummy;21;54
2018-12-10 21:56:00.220 Status: LUA: @AFW:Nog geen tijd om te updaten!
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
User avatar
jvdz
Posts: 2189
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 »

There was an pullrequest 2 days ago since the website changed from http:// to https://
https://github.com/jvanderzande/mijnafvalwijzer/pull/1

Think that will fix it for you too.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
BarryT
Posts: 358
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 10 December 2018 22:17 There was an pullrequest 2 days ago since the website changed from http:// to https://
https://github.com/jvanderzande/mijnafvalwijzer/pull/1

Think that will fix it for you too.

Jos
What a hero..
I didn't see that one, thanks Jos!!

Ps, check your msgs :)
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
snellejellep
Posts: 241
Joined: Tuesday 16 May 2017 13:05
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Neterlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by snellejellep »

in the latest beta the script does not run anymore, anyone else having this problem?
raspberry pi | xiaomi vacuum | yeelight | philips hue | zwave | ubiquiti unifi | harmony | sonoff | zigbee2mqtt | https://www.youtube.com/channel/UC2Zidl ... m1OLuNldfQ
Martijn85
Posts: 53
Joined: Wednesday 20 January 2016 20:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by Martijn85 »

Can someone can help me out to get this to work with:
I have tried to edit the scripts on the github with this adres but it seems not getting any information...
User avatar
jvdz
Posts: 2189
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 »

Martijn85 wrote: Thursday 03 January 2019 22:53 Can someone can help me out to get this to work with:
I have tried to edit the scripts on the github with this adres but it seems not getting any information...
PM me a working url with postcode and huisnummer and I will have a look for you when you want by adapting one of the existing versions.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
steef84
Posts: 37
Joined: Friday 30 August 2013 20:24
Target OS: NAS (Synology & others)
Domoticz version: DS213+
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by steef84 »

anyone got problems with huisvuil-westland? For me its not updating since november I just saw in domoticz. (no time to run update).
Did anything changed?
- Stefan
User avatar
jvdz
Posts: 2189
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 »

Correct, they have changed the website so I fixed it a couple of weeks ago, but hadn't uploaded the change yet. (it is committed now to github)
Just give that version a try and let me know. :)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by Derik »

is there perhaps a how to so i can get the afval device works again..
I come from the option with "dashticz.nl" .... And i try to make some stuff works again..
Afval and calendar etc..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
jvdz
Posts: 2189
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 »

This is an description in Dutch how to make the script working for any of the variations I have published in github:
  • Maak een dummy TEKST sensor aan in domoticz (ik heb Heerlen-Afval gebruikt voor het testen)
  • Kopieer juiste versie script voor jouw regio van https://github.com/jvanderzande/mijnafvalwijzer naar directory domoticz\scripts\lua
  • Edit script en:
    • Pas de variable myAfvalDevice aan met de Device naam die jij hebt aangemaakt in Domoticz.
    • Pas de variable NotificationEmailAdress aan naar jouw email adres.
    • Pas de afvaltype_cfg tabel aan met de tijden en daysbefore die jij wilt per afval type en de tekst die je in de notificatie wilt ontvangen.
Nu zou het moeten werken, maar de tekst sensor wordt pas geupdate als een van de tijden uit de tabel gelijk is aan de huidige tijd, want dan alleen gaat hij de website info ophalen. Je kan dus even tijdelijk de dummy regel aanpassen naar huidige tijd plus 1 minute om de update te forceren.

Sorry for the Dutch and let me know in case anybody needs a translation, but these script are only valid for several Dutch areas.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by freijn »

little bit off topic, sorry...

I am working on my calendar as well ( Purmerend)
Question, how do you test and debug this? As the website is completely different I have to start from scratch.
Now with a few lines of code changes I need to wait for the next 1 min kickoff to see the debug lines in the logfile.
Not the fastest way of developing.. :-(

Is there a clever/better way to do the debugging?

Thanks, Frank
User avatar
jvdz
Posts: 2189
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 »

There is a purmerend version already in in my github you can check. ;)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by freijn »

jvdz wrote: Monday 07 January 2019 9:33 There is a purmerend version already in in my github you can check. ;)

Jos
AAAhhhhhhhhhh :-)

Copied and installed , now waiting for the update....... if it fails we have a problem tomorrow as tomorrow is "rest afval" collection day....

Many thanks for doing the work !!!

Frank
User avatar
jvdz
Posts: 2189
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 »

Just update the dummy record in the Table to a time 1 minute from Now to force the update to see if it works. ;)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by freijn »

jvdz wrote: Monday 07 January 2019 10:40 Just update the dummy record in the Table to a time 1 minute from Now to force the update to see if it works. ;)

Jos
Jos I did :

["Dummy"] ={hour=10,min=51,daysbefore=0,text="dummy"}}

now, 10:57, nothing happenend...

Was this what you meant by updating?
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by freijn »

2019-01-07 11:03:00.817 Error: EventSystem: in AfvalAlarm: [string "-- AF-PUR module to get the Afval schedule fo..."]:145: bad argument #1 to 'gmatch' (string expected, got nil)

:-(
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Sharing : Afval kalendar in text sensor

Post by freijn »

local MyArea='Weidevenne+en+Hazepolder'

had to put + in between, perhaps a remark in the notes?
Attachments
Capture.JPG
Capture.JPG (21.05 KiB) Viewed 1390 times
User avatar
jvdz
Posts: 2189
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 »

freijn wrote: Monday 07 January 2019 11:20 local MyArea='Weidevenne+en+Hazepolder'
had to put + in between, perhaps a remark in the notes?
Good to see you fixed it and yes you do need to get the MyArea from the URL after you selected the "WIjk". Will make a note in the script in the comment behind the field.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest