robertraaijmakers / com.trashchecker

Trashcan Reminder 2.0 is an app for Homey (Home Automation Hub) and gives you the ability to get notifications when your trash is being collected.
10 stars 32 forks source link

Geen triggers voor afval Homey v5.0.2, TCReminder 3.0.4 #113

Closed stofferr closed 3 years ago

stofferr commented 3 years ago

Hoi,

Geen triggers meer voor afval. Ik krijg ook de melding "Geen afval" in alle tags

Dit speelt bij mijn weten na de update van Homey V5.0.0 maar daar ben ik niet zeker van. Ik had op Homey v4 nl. ook al problemen hiermee. Toen was het een datum formaat issue.

Mijn huidige config:

Adres opgevoerd is gevalideerd voor RD4. Ik heb ook de datums uit het setup scherm even gekopieerd en hieronder weergegeven:

{ "GFT": [ "07-01-2021", "21-01-2021", "04-02-2021", "18-02-2021", "04-03-2021", "18-03-2021", "01-04-2021", "15-04-2021", "29-04-2021", "15-05-2021", "27-05-2021", "10-06-2021", "24-06-2021", "08-07-2021", "22-07-2021", "05-08-2021", "19-08-2021", "02-09-2021", "16-09-2021", "30-09-2021", "14-10-2021", "28-10-2021", "11-11-2021", "25-11-2021", "09-12-2021", "23-12-2021", "2019-09-22", "2020-09-22" ], "PMD": [ "08-01-2021", "22-01-2021", "05-02-2021", "19-02-2021", "05-03-2021", "19-03-2021", "02-04-2021", "16-04-2021", "30-04-2021", "14-05-2021", "28-05-2021", "11-06-2021", "25-06-2021", "09-07-2021", "23-07-2021", "06-08-2021", "20-08-2021", "03-09-2021", "17-09-2021", "01-10-2021", "15-10-2021", "29-10-2021", "12-11-2021", "26-11-2021", "10-12-2021", "24-12-2021" ], "KERSTBOOM": [ "13-01-2021" ], "OVERIG": [ "13-01-2021", "26-01-2021", "30-03-2021", "14-04-2021", "05-05-2021", "01-06-2021", "02-06-2021", "27-07-2021", "28-09-2021", "06-10-2021", "27-10-2021", "23-11-2021", "24-11-2021" ], "PAPIER": [ "13-01-2021", "10-02-2021", "10-03-2021", "14-04-2021", "12-05-2021", "09-06-2021", "14-07-2021", "11-08-2021", "08-09-2021", "13-10-2021", "10-11-2021", "08-12-2021" ], "REST": [ "14-01-2021", "11-02-2021", "11-03-2021", "08-04-2021", "06-05-2021", "03-06-2021", "01-07-2021", "29-07-2021", "26-08-2021", "23-09-2021", "21-10-2021", "18-11-2021", "16-12-2021" ], "BEST": [ "26-01-2021", "30-03-2021", "01-06-2021", "27-07-2021", "28-09-2021", "23-11-2021" ], "SNOEIAFVAL_OP_AFSPRAAK": [ "14-04-2021", "05-05-2021", "02-06-2021", "06-10-2021", "27-10-2021", "24-11-2021" ] }

robertraaijmakers commented 3 years ago

Jup, again a date format issue. Will be fixed in version 3.0.5.... Would be nice if those APIs would stop changing their format every time.

stofferr commented 3 years ago

Would it be a problem to have an automatic date format detection routine, that can autodetect and cover the most common formats? I did something like this a looooong time ago when I was still proficient with programming.

I can imagine a scenario where an iterator through the collection of date entries downloaded from the API is trying to establish, based upon the standard separators :.- etc. what the values for the first, second and 3rd section of the date format are.

If a section has values up to "12" it must be a "month" field, sections where the max value is larger than 12 but smaller than 32 it must be a "day" field. Sections of 4 digits must be a "year" field.

Could this work for most API implementations I wonder. Good luck! Offering help if you need it, although I'm a rusty old Java J2SE1.2 programmer. Don't expect too much :P