Re: Dashticz - Module - Garbage collector
Posted: Thursday 11 May 2017 11:04
I think Rob should make something to alert us on Dashticz that there is a new update 

Open source Home Automation System
https://forum.domoticz.com/
This doesnt work in my setup. I changed the colour of the grey bin text but the icon is not changing.robgeerts wrote:Try latest beta, the icon gets the color of the first upcoming type of trash that gets picked upgielie wrote:I have different colours for the text corresponding to the afval, is it possible to change the color of the trashcan, corresponding to the trash of that week.
Code: Select all
11-05-2017,25-05,2017, etc
Code: Select all
week = tonumber (os.date( "%V"))
dag = tostring(os.date("%a"));
status = tonumber(otherdevices_svalues['Paper'])
print('script paper_script executed')
-- Every Thursday evening in the uneven weeks paper get's picked up here.
-- IDX 3573 is my dummy text utility (see below) called 'Paper' (see above)
-- If in your city the paper is picked up in the even weeks, change the ~= to ==
commandArray = {}
if (dag=='Sat' or dag=='Sun' ) then
weekend = true; weekdag = false
end
if (dag=='Mon' or dag=='Tue' or dag=='Wed' or dag=='Thu' or dag=='Fri') then
weekend = false ; weekdag = true
end
--Bepalen morgen papier
if(week % 2 ~= 0 and dag=='Wed') then
morgenpapier = true; papier = true; vanavondpapier = false
-- ('Morgen papier')
end
--Bepalen vanavond papier
if(week % 2 ~= 0 and dag=='Thu') then
morgenpapier = false; papier = true; vanavondpapier = true
-- ('Vanavond papier')
end
--Bepalen deze week papier
if(week % 2 ~= 0 and dag~='Wed' and dag~='Thu') then
morgenpapier = false; papier = true; vanavondpapier = false
-- ('Deze week papier')
end
if (papier and weekdag) or (papier and weekend) then
commandArray ['UpdateDevice']= '3573|1|Deze week oud papier'
end
if (morgenpapier and weekdag and papier) then
commandArray ['UpdateDevice']= '3573|1|Morgen oud papier'
end
if (vanavondpapier and weekdag and papier) then
commandArray ['UpdateDevice']= '3573|1|Vanavond oud papier'
end
if (not(morgenpapier) and not(papier) and not(vanavondpapier)) then
commandArray ['UpdateDevice']= '3573|1|Deze week geen oud papier'
end
return commandArray
niceandeasy wrote:In my municipality, trash collection day is always Wednesday, for all kinds of trash.
Today, they collected GFT and PBD. Next week, it will be GFT only. In 2 weeks, GFT and Rest, in 3 weeks: GFT only, and in 4 weeks, the cycle repeats: GFT and PBD.
Now, my afvalapp block only shows GFT pick-up dates.
Are the Rest and PBD dates suppressed, because they coincide with the GFT dates? Can I change something, to correct this, or to filter out GFT, because I already know that they pick that up every week?
I did not set any custom names, trash icons and colours, so that is not causing this weird issue.
zip PM'ed ...robgeerts wrote:Could you send me your trash-config including zipcode?
So I can test with it..
You should just put your git clone command in your cron.EdKo66 wrote:I think Rob should make something to alert us on Dashticz that there is a new update
When a go to the site and push F12 a screen appear with some codding. At the tab debugging a see some js code , a thinkEdKo66 wrote:Try and see if they give a JSON of XML file.
Code: Select all
var trashcan = {}
trashcan.afvalapp = { maxitems: 10, trashapp: 'deafvalapp', width:12,zipcode:'5692VG', housenumber:'33', country:'NL' }
Code: Select all
[{allDay: true, color: "grey", start: "2017-05-12T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-05-12T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-05-19T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-05-19T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-05-26T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-06-02T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-06-02T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-06-09T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-06-09T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-06-16T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-06-16T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-06-23T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-06-30T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-06-30T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-07-07T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-07-07T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-07-14T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-07-14T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-07-20T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-07-28T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-07-28T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-08-04T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-08-04T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-08-11T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-08-11T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-08-18T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-08-25T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-08-25T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-09-01T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-09-01T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-09-08T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-09-08T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-09-15T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-09-22T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-09-22T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-09-29T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-09-29T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-10-06T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-10-06T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-10-13T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-10-20T00:00:00+02:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-10-20T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-10-27T00:00:00+02:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-10-27T00:00:00+02:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-11-03T00:00:00+01:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-11-03T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-11-10T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-11-17T00:00:00+01:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-11-17T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-11-24T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-11-24T00:00:00+01:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-12-01T00:00:00+01:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-12-01T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-12-08T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "blue", start: "2017-12-15T00:00:00+01:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-12-15T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "grey", start: "2017-12-22T00:00:00+01:00", title: "Restafval"},
{allDay: true, color: "brown", start: "2017-12-22T00:00:00+01:00", title: "P-K"},
{allDay: true, color: "blue", start: "2017-12-29T00:00:00+01:00", title: "PMD"},
{allDay: true, color: "grey", start: "2017-12-29T00:00:00+01:00", title: "Restafval"}]
With this url you can get the id for your addres:geertvercamer wrote:This is what I found with F12 on http://www.ophaalkalender.be
Code: Select all
[{allDay: true, color: "grey", start: "2017-05-12T00:00:00+02:00", title: "Restafval"},
Code: Select all
var trashcan = {}
trashcan.afvalwijzer = { maxitems: 3, trashapp: 'mijnafvalwijzer', width:12, zipcode:'', housenumber:'' }
var trashnames = {}
trashnames['Gft'] = 'Groene bak';
trashnames['Papier'] = 'Blauwe bak';
trashnames['Restafval'] = 'Grijze bak'
var trashcolors = {}
trashcolors['Gft'] = 'Lime';
trashcolors['Papier'] = 'deepskyBlue';
trashcolors['Restafval'] = 'Darkgrey'