Page 16 of 49

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 08 November 2017 9:40
by robgeerts
Good NEWS!
In latest Beta, the Rova-calendar should work, try these settings in config.js:

Code: Select all

config['garbage_company'] = 'rova';
config['garbage_icalurl'] = '';
config['garbage_zipcode'] = '7731ZT';
config['garbage_street'] = '';
config['garbage_housenumber'] = '84';
config['garbage_maxitems'] = 5;
config['garbage_width'] = '12';

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 08 November 2017 11:46
by EdwinK
Yeah... there is a new beta :)

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 08 November 2017 16:47
by marxkemp
robgeerts wrote: Wednesday 08 November 2017 9:40 Good NEWS!
In latest Beta, the Rova-calendar should work, try these settings in config.js:

Code: Select all

config['garbage_company'] = 'rova';
config['garbage_icalurl'] = '';
config['garbage_zipcode'] = '7731ZT';
config['garbage_street'] = '';
config['garbage_housenumber'] = '84';
config['garbage_maxitems'] = 5;
config['garbage_width'] = '12';


I did a fresh beta clone into another folder

Code: Select all

git clone https://github.com/robgeerts/dashticz_v2 --branch beta dashboard
The above config gives me a garbage block with "Loading"
New beta not released yet?

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 08 November 2017 18:22
by robgeerts
Weird, could you check console if it gives any error?
Or search in the network-tab to an url wich contains the string 'rova', click it and show me what you see ;)

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 08 November 2017 21:08
by marxkemp
I did another git pull, it updated garbage js and its working with my own zipcode. thank you

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 14 November 2017 15:23
by Gerald
@Rob: You are truly a master sir!
It works like a charm!

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 22 November 2017 22:27
by pvm
Is it possible to mention the short names in the opening post like for 'Afval App' in the config you have to use 'deafvalapp'

Re: Dashticz - Module - Garbage collector

Posted: Wednesday 22 November 2017 22:32
by pvm
I've found an issue with housenumbers with an additional letter, can you integrate the change below?
Code has been tested for Afval App and working correctly

I've fixed this by:
Adding an extra config parameter in config.js

Code: Select all

config['garbage_housenumberadd'] = 'a';
Reading this new parameter in the top of garbage.js with (naming kept similar)

Code: Select all

var homenumberadd = settings['garbage_housenumberadd'];
And adding this parameter to the services who can use this (like afvalapp in this example), in the old code the parameter was not filled

Code: Select all

'&toevoeging=' + homenumberadd, function(data){

Re: Dashticz - Module - Garbage collector

Posted: Thursday 23 November 2017 9:09
by robgeerts
Added in latest beta, could you test this?
If you get a blank page, please reply in the Bug report-topic.

Re: Dashticz - Module - Garbage collector

Posted: Thursday 23 November 2017 20:47
by pvm
Hi Rob, tested latest beta, thnx, working fine

Re: Dashticz - Module - Garbage collector

Posted: Thursday 23 November 2017 23:01
by robgeerts
Nice :)

Re: Dashticz - Module - Garbage collector

Posted: Monday 27 November 2017 21:08
by PeJeWe
I can't get it running the "HVC Groep" afval programma.

my settings in the CONFIG.js

config['garbage_company'] = 'HVC groep';
config['garbage_icalurl'] = 'http://inzamelkalender.hvcgroep.nl/maand';
config['garbage_zipcode'] = 'my zipcode';
config['garbage_street'] = 'my street';
config['garbage_housenumber'] = '17';
config['garbage_maxitems'] = 5;
config['garbage_width'] = '12';


//Afval programma
var trashcan = {}
trashcan.hvc = { maxitems: 10, trashapp: 'hvc groep', width:12, zipcode:'******', housenumber:'17' }

var trashnames = {}
trashnames['Rest'] = 'Grijze bak';
trashnames['Gft'] = 'Groene bak';
trashnames['Pmd'] = 'Plastic';
trashnames['Papier'] = 'Blauwe bak';

var trashcolors = {}
trashcolors['Rest'] = 'Grey';
trashcolors['Gft'] = 'Green';
trashcolors['Pmd'] = 'Orange';
trashcolors['Papier'] = 'Blue';

when i push the button i get the "Domoticz offline" message

do i have to install something in domoticz?
I have done a git pull "beta" without succes.

Re: Dashticz - Module - Garbage collector

Posted: Monday 27 November 2017 23:16
by robgeerts
When you push the button? Wich button?
Could you PM me your zipcode?

Re: Dashticz - Module - Garbage collector

Posted: Monday 27 November 2017 23:18
by aiolos
for hvc you can just use config['garbage_company'] = 'hvc';
With zipcode and housenumber you should get the calendar. The ical url is not necessary.

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 28 November 2017 17:07
by aiolos
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)

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;
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.

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).

A new option for google calendars is also added. The google calendar API can be used with a calendar id and api key (for creating an api key, see https://docs.simplecalendar.io/google-api-key/)
The new config options for google calendars:

Code: Select all

config['garbage_company'] = 'googlecalendar';
config['google_api_key'] = 'YourOwnApiKey';
config['garbage_calendar_id'] = '[email protected]';
If anyone experiences any weird behaviour after the update, let me know. (preferably with information like your garbage config settings)

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 28 November 2017 19:26
by EdwinK
Nice. Of course this means changing stuff again

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 28 November 2017 19:45
by aiolos
Yeah, unfortunately. Especially if you have specific colouring. The garbage_company and address settings haven't changed, so for most people it should just work.

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 28 November 2017 19:50
by EdwinK
Trying to figure things out is not that bad. Already preparing :)

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 28 November 2017 22:26
by robgeerts
Merged and tested!
@aiolos, sent you a few beers via PayPal!

Re: Dashticz - Module - Garbage collector

Posted: Tuesday 28 November 2017 23:12
by EdwinK
Thanks. Was just getting ready to go to bed, when I noticed the update. So, quickly pulled it, and running ;)