Toon app: Afvalwijzer

Forum about forum-provided applications on Toon

Moderators: marcelr, TheHogNL, TerrorSource, Toonz

Re: Toon app: waste collection (Afvalwijzer)

Postby Rudolf » Tue Feb 27, 2018 1:16 pm

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 8:07 pm, edited 1 time in total.
Rudolf
Member
Member
 
Posts: 116
Joined: December 2017

Re: Toon app: waste collection (Afvalwijzer)

Postby madpatrick » Tue Feb 27, 2018 4:55 pm

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.
User avatar
madpatrick
Member
Member
 
Posts: 85
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Postby Toonz » Tue Feb 27, 2018 11:20 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1236
Joined: December 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby Toonz » Tue Feb 27, 2018 11:22 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1236
Joined: December 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby Toonz » Tue Feb 27, 2018 11:23 pm

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
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1236
Joined: December 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby madpatrick » Wed Feb 28, 2018 7:21 pm

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 ?
User avatar
madpatrick
Member
Member
 
Posts: 85
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Postby Toonz » Thu Mar 01, 2018 6:15 pm

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
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1236
Joined: December 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby madpatrick » Thu Mar 01, 2018 9:03 pm

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: 85
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Postby madpatrick » Sat Mar 03, 2018 10:20 am

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
User avatar
madpatrick
Member
Member
 
Posts: 85
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Postby Prutzer » Sat Mar 03, 2018 7:02 pm

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?
Prutzer
Starting Member
Starting Member
 
Posts: 9
Joined: February 2018

Re: Toon app: waste collection (Afvalwijzer)

Postby madpatrick » Sun Mar 04, 2018 1:36 pm

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.
User avatar
madpatrick
Member
Member
 
Posts: 85
Joined: December 2017
Location: Zuid-Holland

Re: Toon app: waste collection (Afvalwijzer)

Postby Toonz » Sun Mar 04, 2018 2:59 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1236
Joined: December 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby hayman » Mon Mar 05, 2018 4:24 pm

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
hayman
Starting Member
Starting Member
 
Posts: 32
Joined: February 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby Toonz » Mon Mar 05, 2018 5:15 pm

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
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1236
Joined: December 2016

Re: Toon app: waste collection (Afvalwijzer)

Postby hayman » Mon Mar 05, 2018 6:45 pm

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???
hayman
Starting Member
Starting Member
 
Posts: 32
Joined: February 2016

PreviousNext

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest