Re: Dashticz - Module - Garbage collector
Posted: Tuesday 28 November 2017 23:47
Cool, I saw them, thanks!robgeerts wrote: Tuesday 28 November 2017 22:26 Merged and tested!
@aiolos, sent you a few beers via PayPal!
Open source Home Automation System
https://forum.domoticz.com/
Cool, I saw them, thanks!robgeerts wrote: Tuesday 28 November 2017 22:26 Merged and tested!
@aiolos, sent you a few beers via PayPal!
I'm trying to figure out how it works exactly, so I can update the wiki. As an example, I use the GFT line:aiolos wrote: Tuesday 28 November 2017 17:07 A PR for changes in the garbage collection module has been created, so this will be merged soon. There are some changes related to the colouring and naming.
The following config options are new (and trashnames/trashcolors config is gone)Within this config you can change the kliko color and color code of the lines in the block (color code only used if you enable the 'garbage_use_colors' config option). The name property is used if the 'garbage_use_names' option is enabled, otherwise the information from your garbage company will be used.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: '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;
All various garbage company handling has slightly changed (but the outcome should not be different).
All garbage collection information that was fetched through an ical calender is now loaded directly through javascript (without the need of a php script, which was loaded externally).
Code: Select all
gft: {kliko: 'green', code: '#375b23', name: 'GFT'},Code: Select all
gft: {kliko: 'white', code: '#375b23', name: 'GFT'},
config['garbage_use_colors'] = false;Code: Select all
config['garbage'] = {
gft: {kliko: 'green', code: '#375b23', name: 'GFT', icon: 'img/kliko_green.png'},
pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/kliko_orange.png'},
rest: {kliko: 'grey', code: '#5e5d5c', name: 'Restafval', icon: 'img/kliko_grey.png'},
papier: {kliko: 'blue', code: '#153477', name: 'Papier', icon: 'img/kliko_blue.png'},
kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval', icon: 'img/kliko_red.png'},
brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin', icon: 'img/kliko_brown.png'},
black: {kliko: 'black', code: '#000000', name: 'Zwart', icon: 'img/kliko_black.png'},
};
Code: Select all
config['garbage_icon_use_colors'] = false;
I think you have the wrong garbage_calendar_id. If you go to calendar settings of the specific calendar in Google Calendar, you will see 'address for calendar' and 'private address'. A calender ID is also shown there. It is not your e-mail address as it looks like in the config you've given.curious wrote: Friday 01 December 2017 11:10 This is my config :
CODE: SELECT ALL
config['garbage_company'] = 'googlecalendar';
config['google_api_key']='AIzaxxxxxxJekxoonE8-M0YfRCGD_tM';
config['garbage_calendar_id'] = '[email protected]@group.calendar.google.com';
In the developer view of google chrome I get this error :
CODE: SELECT ALL
.googleapis.com/calendar/v3/calendars/[email protected]@group.calendar.google.com/events?key=AIzaxxxxxxJekxoonE8-M0YfRCGD_tM&singleEvents=true&timeMin=2017-12-01T00%3A00%3A00%2B00%3A00&timeMax=2018-01-02T00%3A00%3A00%2B00%3A00&orderBy=startTime&maxResults=5 Failed to load resource: the server responded with a status of 404 ()
The dashticz dashboard shows : "Loading"
when referring to an ics I get the same error by the way.
Besides that : How does the module recognize what kind of garbage will be collected.
The ics I downloaded from my township Zuidhorn uses texts like 'Grijze container', 'Milieuboer' and 'Groene container"
Code: Select all
config['garbage_icalurl'] = 'https://afvalkalender.zuidhorn.nl/nc/afvalkalender/zoek-postcode/Ical/calendar/postcode/9801JM22-102520115.html?tx_windwastecalendar_pi1%5Bformat%5D=ics&cHash=9bdce5f3863b0f4d6ffd5e449332f211';
config['garbage_company'] = 'ical';
Code: Select all
config['garbage'] = {
gft: {kliko: 'green', code: '#375b23', name: 'GFT', icon: 'img/kliko_green.png'},
pmd: {kliko: 'orange', code: '#db5518', name: 'PMD', icon: 'img/kliko_orange.png'},
rest: {kliko: 'grey', code: '#5e5d5c', name: 'Restafval', icon: 'img/kliko_grey.png'},
papier: {kliko: 'blue', code: '#153477', name: 'Papier', icon: 'img/kliko_blue.png'},
kca: {kliko: 'red', code: '#b21807', name: 'Chemisch afval', icon: 'img/kliko_red.png'},
brown: {kliko: 'brown', code: '#7c3607', name: 'Bruin', icon: 'img/kliko_brown.png'},
black: {kliko: 'black', code: '#000000', name: 'Zwart', icon: 'img/kliko_black.png'},
milieu: {kliko: 'yellow', code: '#f9e231', name: 'Geel', icon: 'img/kliko_yellow.png'},
};
Looks like it's gone already. Didn't get any updates since a at last mid-NovemberPlease also note that the recycle manager company type is discontinued in 2018. So if you use that, look at the website of your municipality to see what the alternative is (which we maybe need to add then...)
Well, the ical-url is just what I copied from the page you showed me. Most of the times development is just copy/pasting...curious wrote: Friday 01 December 2017 21:41 Great, I used the ical-rule and now I have a nice overview of when to to pull which bin to the street.
The code-line is rocket science to me, but hé, what is a rocket-scientist without a thankful audience.
Off topic: a "milieuboer" is great, they collect paper, glass, clothing, cans,plastics
Thank you for this solution
Do you need a new garbage company?EdwinK wrote: Friday 01 December 2017 21:59Looks like it's gone already. Didn't get any updates since a at last mid-NovemberPlease also note that the recycle manager company type is discontinued in 2018. So if you use that, look at the website of your municipality to see what the alternative is (which we maybe need to add then...)
Must be trueaiolos wrote: Saturday 02 December 2017 0:56
Well, the ical-url is just what I copied from the page you showed me. Most of the times development is just copy/pasting...
aiolos wrote: Saturday 02 December 2017 0:56Do you need a new garbage company?EdwinK wrote: Friday 01 December 2017 21:59Looks like it's gone already. Didn't get any updates since a at last mid-NovemberPlease also note that the recycle manager company type is discontinued in 2018. So if you use that, look at the website of your municipality to see what the alternative is (which we maybe need to add then...)
I found another way to fetch it (I do not directly see what the random part in the url is, and have no time to dive into that). Right now I simulate the post of the form, and get the right information from the resulting page. Seems to work, with either the ical and also directly parse the site. Expect a change sooncurious wrote: Saturday 02 December 2017 10:13Must be trueaiolos wrote: Saturday 02 December 2017 0:56
Well, the ical-url is just what I copied from the page you showed me. Most of the times development is just copy/pasting.... But thne you have to know WHAT to copy/paste
I thought the ical-url should be referring to a ics file or a calendar file
Calander disappeared, still loadingSo there must be a time lock indeed.
Very likely we can also simulate the request the app does.EdwinK wrote: Saturday 02 December 2017 19:36 ...
Waiting for the city to tell what they are going to use. Hope it's not their own crappy app.
Code: Select all
config['garbage_company'] = 'zuidhornical'; // or 'zuidhorn'
config['garbage_zipcode'] = '9801JM';
config['garbage_housenumber'] = 22;