Dashticz - Module - Garbage collector Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

curious
Posts: 132
Joined: Saturday 02 April 2016 19:38
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by curious »

Great, thank you Rob and aiolos.
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dashticz - Module - Garbage collector

Post by htilburgs »

Maybe I'm the only one using IE11, but I'm keep getting "Loading..." when the Garbage modules loads data.
This only occurs with IE11.

When I remove https://cors-anywhere.herokuapp.com/ from the garbage.js (I'm having CURE, so I remove in function getAfvalstromenData), it works.

Code: Select all

function getAfvalstromenData(address, date, random, baseUrl) {
    $('.trash' + random + ' .state').html('');
    $.getJSON(baseUrl + '/rest/adressen/' + address.postcode + '-' + address.housenumber, function (data) {
        $.getJSON(baseUrl + '/rest/adressen/' + data[0].bagId + '/afvalstromen', function (data) {
            data = data
                .filter(function (element) { return element.ophaaldatum !== null; })
                .map(function (element) {
                    return {
                        date: moment(element.ophaaldatum, 'YYYY-MM-DD'),
                        summary: element.title,
                        garbageType: mapGarbageType(element.title),
                    };
                });
            addToContainer(random, data);
        });
    });
}
Can this be solved? Or maybe a variable to put on true of false (config['use_garbage_cors-url'] = true;)?
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

It could be that IE handles the url a bit different, which causes aan error. And probably IE doesn't do the security check for which the core stuff is needed, so then it can be removed. This week I don't have the time for it I think, next week at the earliest.
Contributor to Dashticz
More on my Github profile
rbeech
Posts: 2
Joined: Wednesday 06 December 2017 21:21
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by rbeech »

Love the work on this, just working on mounting a tablet on the wall by the front door so I might have lots of questions to come up.

I *always* forget which bin to put out.
Apologies if I've missed it, to add my own calendar as I don't have a service provided one:
a) Can I create me own json file and serve it locally? If so, what format should it be in?
b) If I use a google calendar, what format do I add events to it?

Thanks.
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by robgeerts »

You could create an Ical for this.
Just enter the type of bins on the correct date, for example, add a 'whole day'-event on 10-12-2017 with the name: 'Rest'.
With the right config you can show them in the right colors, for example:

Code: Select all

config['garbage'] = {
    gft: {kliko: 'green', code: '#375b23', name: 'GFT'},
    pmd: {kliko: 'orange', code: '#db5518', name: 'PMD'},
    rest: {kliko: 'grey', code: '#5e5d5c', name: 'Rest'},
    papier: {kliko: 'blue', code: '#153477', name: 'Papier'},
    kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval'},
    brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin'},
    black: {kliko: 'black', code: '#000000', name: 'Zwart'},
};
config['garbage_use_names'] = true;
config['garbage_use_colors'] = true;
Zoekm
Posts: 20
Joined: Friday 18 November 2016 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Zoekm »

Just recently installed Dashticz and I like it very much, great work! Yesterday was the first time the garbage ("Restafval") pickupdate passed by and I noticed that on the day of pickup of "Restafval", in my case Thursdays ("donderdag"), the block already shows the next pickup days/dates and garbage type, so on Thursday I see the next weeks messages and later. Yesterday, Thursday, they came to pickup "Restafval", but the Dashticz shows "GFT":"Thursday". For me this is confusing, is it possible that the first line displays the garbage type until that day has passed? Is there a configuration setting for this?


afval dashticz.jpg
afval dashticz.jpg (2.38 KiB) Viewed 2173 times
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

Which garbage company do you use? In a situation where an ical link is used, I can imagine the 'appointment' is in the morning, so later on the day it is gone (however, that somehow can be fixed I think). Or maybe the company that you use removes it on the day it is due. Still an error, but that's harder to fix...

Please give some more information about your config.

Thanks.
Contributor to Dashticz
More on my Github profile
Zoekm
Posts: 20
Joined: Friday 18 November 2016 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Zoekm »

Thanks for looking into this, we have only GFT and Restafval collected, at Thursdays, my garbage configurations:

config['garbage_company'] = 'mijnafvalwijzer';
config['garbage_zipcode'] = 'XXXXXX';
config['garbage_housenumber'] = 'XX';
config['garbage_maxitems'] = '2';
config['garbage_width'] = '12';
config['garbage_hideicon'] = 0;

config['garbage'] = {
gft: {kliko: 'green', code: '#7DBF59', name: 'GFT'},
pmd: {kliko: 'orange', code: '#db5518', name: 'PMD'},
rest: {kliko: 'grey', code: '#CDCCCB', name: 'Restafval'},
papier: {kliko: 'blue', code: '#153477', name: 'Papier'},
kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval'},
brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin'},
black: {kliko: 'black', code: '#000000', name: 'Zwart'},
};

config['garbage_use_names'] = true;
config['garbage_use_colors'] = true;
config['garbage_icon_use_colors'] = true;

Note, on "mijnafvalwizer", 7 December is still the first day listed for collection of garbage.
afval dashticz2.jpg
afval dashticz2.jpg (7.73 KiB) Viewed 2140 times
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

Zoekm wrote: Friday 08 December 2017 13:10 Just recently installed Dashticz and I like it very much, great work! Yesterday was the first time the garbage ("Restafval") pickupdate passed by and I noticed that on the day of pickup of "Restafval", in my case Thursdays ("donderdag"), the block already shows the next pickup days/dates and garbage type, so on Thursday I see the next weeks messages and later. Yesterday, Thursday, they came to pickup "Restafval", but the Dashticz shows "GFT":"Thursday". For me this is confusing, is it possible that the first line displays the garbage type until that day has passed? Is there a configuration setting for this?



afval dashticz.jpg
I created a PR for this. It should show the garbage collection now also on the day itself. This problem could happen with all kinds of garbage companies. I couldn't do a real test since it is sunday right now, but simulating it a few days ahead, I could reproduce it, and solve it. If Rob merges it, you can see how it works next thursday.
Contributor to Dashticz
More on my Github profile
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

htilburgs wrote: Tuesday 05 December 2017 9:24 Maybe I'm the only one using IE11, but I'm keep getting "Loading..." when the Garbage modules loads data.
This only occurs with IE11.

When I remove https://cors-anywhere.herokuapp.com/ from the garbage.js (I'm having CURE, so I remove in function getAfvalstromenData), it works.
...
Can this be solved? Or maybe a variable to put on true of false (config['use_garbage_cors-url'] = true;)?
Is created a PR which adds a new option. If merged, you can use

Code: Select all

config['garbage_use_cors_prefix'] = false;
This value is normally true, so the cors-anywhere prefix is used. But if this causes errors, you can now disable it. For now this is only added to the garbage functionality, not (yet) on other places.
Contributor to Dashticz
More on my Github profile
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by robgeerts »

It's merged :)
Zoekm
Posts: 20
Joined: Friday 18 November 2016 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Zoekm »

aiolos/Rob, Thanks for the upddate! Will check coming Thursday.
Zoekm
Posts: 20
Joined: Friday 18 November 2016 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by Zoekm »

Todays picture looks as I expect it to be, great, thanks for the help!
afval updated.jpg
afval updated.jpg (2.82 KiB) Viewed 2033 times
jdemas
Posts: 15
Joined: Saturday 16 September 2017 9:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by jdemas »

hi Rob,

is it possible to add one other garbage collector

https://www.rd4info.nl/NSI/Burger/Aspx/ ... lv&nr=4&t=

this is the tekst version of the callendar

It is the callendar for south of Limburg.

regards

Jeffrey
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

jdemas wrote: Thursday 14 December 2017 18:45 hi Rob,

is it possible to add one other garbage collector

https://www.rd4info.nl/NSI/Burger/Aspx/ ... lv&nr=4&t=

this is the tekst version of the callendar

It is the callendar for south of Limburg.

regards

Jeffrey
I created a PR for it. On the last days of the year it might not show the next year yet, but I expect that to 'solve' itself from January 1. (This might also happen with other garbage companies).
Contributor to Dashticz
More on my Github profile
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by robgeerts »

Merged!
Also added an option to the settings-popup!
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

Cool, unfortunately there is a small bug in it, I just found out. Almost fixed it, but then it turned out the page is not available between 00:00 and 03:00, due to a refresh of the information...

I'll complete the fix later.
Contributor to Dashticz
More on my Github profile
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: Dashticz - Module - Garbage collector

Post by DewGew »

I have added more garbage setting to the setting menu. See my pull request.
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
JacEngels
Posts: 18
Joined: Sunday 03 December 2017 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Dashticz - Module - Garbage collector

Post by JacEngels »

Is it possible to add support for Venlo https://www.venlo.nl/afvalkalender
aiolos
Posts: 127
Joined: Sunday 13 September 2015 18:58
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Location: Nieuwegein, NL
Contact:

Re: Dashticz - Module - Garbage collector

Post by aiolos »

JacEngels wrote: Thursday 21 December 2017 0:53 Is it possible to add support for Venlo https://www.venlo.nl/afvalkalender
I'll have a look and see what I can do.
Contributor to Dashticz
More on my Github profile
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests