Re: Dashticz - Module - Garbage collector
Posted: Sunday 03 December 2017 15:24
Great, thank you Rob and aiolos.
Open source Home Automation System
https://forum.domoticz.com/
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);
});
});
}
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;
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.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
Is created a PR which adds a new option. If merged, you can usehtilburgs 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;)?
Code: Select all
config['garbage_use_cors_prefix'] = false;
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).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'll have a look and see what I can do.JacEngels wrote: ↑Thursday 21 December 2017 0:53 Is it possible to add support for Venlo https://www.venlo.nl/afvalkalender