Page 23 of 83

Re: Toon app: waste collection (Afvalwijzer)

Posted: Tue Feb 27, 2018 2:16 pm
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?

Re: Toon app: waste collection (Afvalwijzer)

Posted: Tue Feb 27, 2018 5:55 pm
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.

Re: Toon app: waste collection (Afvalwijzer)

Posted: Wed Feb 28, 2018 12:20 am
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

Re: Toon app: waste collection (Afvalwijzer)

Posted: Wed Feb 28, 2018 12:22 am
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)

Re: Toon app: waste collection (Afvalwijzer)

Posted: Wed Feb 28, 2018 12:23 am
by Toonz
Rudolf wrote:For my zipcode there was a minor issue with PMD.
Thanks, will include this in next release.

Re: Toon app: waste collection (Afvalwijzer)

Posted: Wed Feb 28, 2018 8:21 pm
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 ?

Re: Toon app: waste collection (Afvalwijzer)

Posted: Thu Mar 01, 2018 7:15 pm
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/

Re: Toon app: waste collection (Afvalwijzer)

Posted: Thu Mar 01, 2018 10:03 pm
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

Re: Toon app: waste collection (Afvalwijzer)

Posted: Sat Mar 03, 2018 11:20 am
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

Re: Toon app: waste collection (Afvalwijzer)

Posted: Sat Mar 03, 2018 8:02 pm
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?

Re: Toon app: waste collection (Afvalwijzer)

Posted: Sun Mar 04, 2018 2:36 pm
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.

Re: Toon app: waste collection (Afvalwijzer)

Posted: Sun Mar 04, 2018 3:59 pm
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

Re: Toon app: waste collection (Afvalwijzer)

Posted: Mon Mar 05, 2018 5:24 pm
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

Re: Toon app: waste collection (Afvalwijzer)

Posted: Mon Mar 05, 2018 6:15 pm
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

Re: Toon app: waste collection (Afvalwijzer)

Posted: Mon Mar 05, 2018 7:45 pm
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???