Toon app: Afvalwijzer

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, Toonz

Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Rudolf »

For my zipcode there was a minor issue with PMD.

Code: Select all

	                                		<a href="#waste-plastic" class="wasteInfoIcon textDecorationNone" title="Plastic, Metalen en Drankkartons"><p class="plastic">donderdag 01 februari<br />
	                                    	<span class="afvaldescr">Plastic, Metalen en Drankkartons</span></p></a>
I was perfectly able to follow the app's code, so I could write a fix myself.
I simply added 'plastic' to the type-conversion for Mijnafvalwijzer, as shown below.

Code: Select all

        function wasteTypeMijnafvalwijzer(shortName) {
                switch (shortName) {
                        case "grofvuil": return 8;
                        case "tuinafval": return 4;
                        case "papier": return 2;
                        case "gft": return 3;
                        case "gft-afval": return 3;
                        case "gft+e(tensresten)": return 3;
                        case "opk": return 2;
                        case "pmd": return 1;
                        case "restafval": return 0;
                        case "takken": return 4;
                        case "kerstbomen": return 4;
                        case "papier & karton": return 2;
                        case "papier en karton": return 2;
                        case "plastic verpakking & drankkartons": return 1;
                        case "plastic, metalen en drankkartons": return 1;
                        case "plastic": return 1;
                        case "grofvuil (op afroep)": return 8;
                        case "snoeihout (op afroep)": return 4;
                        default: break;
                }



EDIT: Pardon my Dutch. :lol: I fixed my post. Thanks for the "friendly" reminder.
Edit marcelr: Agreed, and removed. That was a bit harsh, wasn't it?
Last edited by Rudolf on Tue Feb 27, 2018 9:07 pm, edited 1 time in total.
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Post by madpatrick »

Very nice !!
Now you can use the app for every city with the waste.txt.

Is it possible to have an icon or text on dim state when there is no wast collection schedule within 18 hours.
Now it is empy box.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Toonz »

Demif wrote:Toonz, question, is waste collector omrin.nl still on the todo list? or is it possible for me to ad it my self?
thnx for all the good work
Completely forgot about it when we implemented all the https stuff.
Will be in next release (just had a peak and it can be done).

Kind regardz,

Toonz
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Toonz »

madpatrick wrote:Is it possible to have an icon or text on dim state when there is no wast collection schedule within 18 hours.
Now it is empy box.
Can be done easily, but just wondering what additional info it will give you compared to showing nothing (meaning 'nothing' to do)
member of the Toon Software Collective
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Toonz »

Rudolf wrote:For my zipcode there was a minor issue with PMD.
Thanks, will include this in next release.
member of the Toon Software Collective
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Post by madpatrick »

Toonz wrote:
or "A" through "Z" for custom icons and descriptions (use capitals)

In this example the file with dates is called waste.txt on my webserver and contains this:

Code: Select all

2018-02-14,7
2018-02-15,7
2018-02-16,A
2018-02-16,B

If you want to use custom icons these should be placed in the folder mentioned in the configuration screen and named A.png, B.png etc.
This same folder should also contain the file "iconLabels.txt" with custom descriptions in JSON format.
In this case the file iconLabels.txt contains

Code: Select all

{"A": "Verjaardag A", "B": "Verjaardag B"}
icons folder on the webserver containing this:
screenshot_4.png
Hello Toonz,

I've followed you instructions and the list for Garbage is working.
The custom icons voor Birthdays is unfortunately not working.
in waste.txt i've put a birthday with a date as mentioned above, but when the file is loaded instead of "birthday" is mentioned "onbekend" (unkown) and no icon is displayed.

what can be the trick ?
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Toonz »

madpatrick wrote:what can be the trick ?
My first guess: make sure the location for extra icons ends with an '/' in the settings screen.
Examples:
file:///root/icons/
or http://1.1.1.1/icons/
member of the Toon Software Collective
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Post by madpatrick »

I’ve found the problem.
/icons is sort of a standard internal directory in apache.
After changing it to /icon (no S) the app is working
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Post by madpatrick »

Toonz wrote: You can click again on the button on the tile (red cross) to confirm you have collected the container and the icons will be removed.
stage3.png
Any comments? Like it? Want a different implementation? This is the time to shout :D .
By the way, if you do not press the extra button on the tile at all, the behaviour is as it was before.
Hi Toonz,

Is it possible to have the time or other icon displayed when there is no garbage collection ?
A black tile looks a bit empy..... :D
Prutzer
Starting Member
Starting Member
Posts: 16
Joined: Thu Feb 01, 2018 12:46 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Prutzer »

Is it possible to at the waste calender of GAD? (Gooi en Vechtstreek)?
https://www.gad.nl/mijn-afval/inzamelkalender/

I have put all the dates in waste.txt and stored it locally on toon. But the waste kalender is staying empty and searching for data (bezig met ophalen gegevens).
postcode: 0
Straatnr: 0
Afvalverwerker: 0

waste.txt:

2018-05-09,3
2018-05-09,2
2018-05-09,1
2018-05-16,3
2018-05-17,0
What am I doing wrong?
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Post by madpatrick »

Toonz wrote:
madpatrick wrote:Is it possible to have an icon or text on dim state when there is no wast collection schedule within 18 hours.
Now it is empy box.
Can be done easily, but just wondering what additional info it will give you compared to showing nothing (meaning 'nothing' to do)
The time will be ok for me or date for next garbage collection.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Toonz »

Prutzer wrote:Is it possible to at the waste calender of GAD? (Gooi en Vechtstreek)?
https://www.gad.nl/mijn-afval/inzamelkalender/
Unfortunately no(t yet), the website just gives you a link to a PDF document, I need to look into processing PDF's first.
Potentially you could reverse engineer their mobile app to find direct http calls to their website.
Prutzer wrote: I have put all the dates in waste.txt and stored it locally on toon. But the waste kalender is staying empty and searching for data (bezig met ophalen gegevens).
postcode: 0
Straatnr: 0
Afvalverwerker: 0

waste.txt:

2018-05-09,3
2018-05-09,2
2018-05-09,1
2018-05-16,3
2018-05-17,0
What am I doing wrong?
Nothing, this is actually a bug. I don't read the extra dates for waste provider 0, my bad.... :?
Will fix it in release 3.5.
EDIT: fixed in 3.5. Will release it when I've completed the omrin.nl implementation
member of the Toon Software Collective
hayman
Starting Member
Starting Member
Posts: 36
Joined: Fri Feb 26, 2016 6:16 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by hayman »

i was running the old vers. of this app ,after getting help and updating my Toon 4.11.6,i've install the app again from store aevery thing went smooth but know i can't find the icon to start the app ,do i still need the zip file to send it to my toon ... ?


thanks
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by Toonz »

hayman wrote:i was running the old vers. of this app ,after getting help and updating my Toon 4.11.6,i've install the app again from store aevery thing went smooth but know i can't find the icon to start the app ,do i still need the zip file to send it to my toon ... ?
thanks
You should be able to add the afvalwijzer to a new tile
member of the Toon Software Collective
hayman
Starting Member
Starting Member
Posts: 36
Joined: Fri Feb 26, 2016 6:16 pm

Re: Toon app: waste collection (Afvalwijzer)

Post by hayman »

Toonz wrote:
hayman wrote:i was running the old vers. of this app ,after getting help and updating my Toon 4.11.6,i've install the app again from store aevery thing went smooth but know i can't find the icon to start the app ,do i still need the zip file to send it to my toon ... ?
thanks
You should be able to add the afvalwijzer to a new tile
After installing it can't find any where any icons where to put data or choose something???
Post Reply

Return to “Toon Apps”