
Dashticz - Module - Garbage collector Topic is solved
Moderators: leecollings, htilburgs, robgeerts
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Dashticz - Module - Garbage collector
I think Rob should make something to alert us on Dashticz that there is a new update 

Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- gielie
- Posts: 290
- Joined: Tuesday 12 January 2016 11:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest β
- Location: The Netherlands (Alkmaar)
- Contact:
Re: Dashticz - Module - Garbage collector
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.


I looked at the code and i already what is happening, the code doesn't look at the colour of the text but at the next trash, i will know next week if it is working, probably it does.
Last edited by gielie on Thursday 11 May 2017 14:48, edited 2 times in total.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
- mvveelen
- Posts: 697
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - Module - Garbage collector
Coloured trashcan working over here. Subtle and very nice! Thanks Rob 
Question:
My city works with several different companies who collect paper. For this, they have a PDF file with the dates. I'd like to have this in the dashboard.
If I put the dates (for my location) in a .txt file, or whatever file, could there be something added to Dashticz so the file (use CONFIG.js for the location) can be read and the data can be displayed in an extra block? Maybe a komma-seperated file or something? Like:
Edit:
for now (I hope Rob can make something so I / we can use a .txt file or something to use in the Dashboard) I altered the bin_selecter script to only show me the dates for picking up the paper. I changed it so you now if it's the week the paper is picked up, if it will be picked up tomorrow and if it will be picked up tonight (in my situation it will be picked up every uneven week on Thursday evening).
I haven't tested it yet, but for today it all seems to work:

Question:
My city works with several different companies who collect paper. For this, they have a PDF file with the dates. I'd like to have this in the dashboard.
If I put the dates (for my location) in a .txt file, or whatever file, could there be something added to Dashticz so the file (use CONFIG.js for the location) can be read and the data can be displayed in an extra block? Maybe a komma-seperated file or something? Like:
Code: Select all
11-05-2017,25-05,2017, etc
for now (I hope Rob can make something so I / we can use a .txt file or something to use in the Dashboard) I altered the bin_selecter script to only show me the dates for picking up the paper. I changed it so you now if it's the week the paper is picked up, if it will be picked up tomorrow and if it will be picked up tonight (in my situation it will be picked up every uneven week on Thursday evening).
I haven't tested it yet, but for today it all seems to work:
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
Last edited by mvveelen on Thursday 11 May 2017 16:58, edited 2 times in total.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
-
- Posts: 102
- Joined: Thursday 28 January 2016 22:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: NL
- Contact:
Re: Dashticz - Module - Garbage collector
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..
And after getting the latest beta, it works perfectly. It now shows a darkblue container and this text:
Zak_blauw: Woensdag
Gft: Woensdag
Pbp: 24-05-2017
Gft: 24-05-2017
....which is correct, at least, for now, hahaha.
Thanks for the fast bugfixes.
-
- Posts: 102
- Joined: Thursday 28 January 2016 22:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: NL
- Contact:
Re: Dashticz - Module - Garbage collector
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
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Dashticz - Module - Garbage collector
I rather do git pull 

Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- mvveelen
- Posts: 697
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Dashticz - Module - Garbage collector
With the paper-script (few posts up):


RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Dashticz - Module - Garbage collector
Is it possible to add some script for belgium garbage collector site ? The site is http://www.ophaalkalender.be/Calendar .
A ask this a couple of days here before http://www.domoticz.com/forum/viewtopic ... 20#p133120, but get no response . So a ask again
A ask this a couple of days here before http://www.domoticz.com/forum/viewtopic ... 20#p133120, but get no response . So a ask again

- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Dashticz - Module - Garbage collector
Try and see if they give a JSON of XML file.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Dashticz - Module - Garbage collector
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.

I'm not a coder so if someone can have a look if there is something to do with it ?
Thanks from all Belgium dashticz users

-
- 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
You can now define the maxitems that are listed:
Code: Select all
var trashcan = {}
trashcan.afvalapp = { maxitems: 10, trashapp: 'deafvalapp', width:12,zipcode:'5692VG', housenumber:'33', country:'NL' }
-
- Posts: 84
- Joined: Friday 12 May 2017 20:03
- Target OS: -
- Domoticz version:
- Contact:
Re: Dashticz - Module - Garbage collector
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"},
{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"}]
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Dashticz - Module - Garbage collector
Can it implentent in dashticz with this code ? A search on the side for some js or xml code , but a don't know where to look 

- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Dashticz - Module - Garbage collector
I'm not sure if that can be done. Lookss like a calendar to me. But, maybe the creator of the script knows more about this.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
-
- Posts: 56
- Joined: Wednesday 24 December 2014 16:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz - Module - Garbage collector
I'm having some invalid date issues using afvalwijzer.
Both GFT and Plastic show the invalid date for the most recent items..
Anybody else with this?
Both GFT and Plastic show the invalid date for the most recent items..
Anybody else with this?
-
- Posts: 18
- Joined: Saturday 31 January 2015 11:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Dashticz - Module - Garbage collector
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"},
Example :
http://www.ophaalkalender.be/calendar/f ... pcode=2930
The ID that is in the JSON result can be used to get the schedule in JSON format from the following URL:
http://www.ophaalkalender.be/api/rides? ... pcode=2930
With this input I think Rob can make it work in the garbage script.
-
- 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
yes, i can 
(asap)

(asap)
-
- Posts: 84
- Joined: Friday 12 May 2017 20:03
- Target OS: -
- Domoticz version:
- Contact:
Re: Dashticz - Module - Garbage collector
Thanks Sonar, figured that out around midnight and would post it this morning.
And thanks to Rob, of course!
And thanks to Rob, of course!
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Dashticz - Module - Garbage collector
Thanks Geert to figured this out. This dashboard goes still better and better ... also thanks to Rob !
@ Sonar , how did you become to this url ? Did you find this in some code when using the F12 on that page ? Also thanks for this
@ Sonar , how did you become to this url ? Did you find this in some code when using the F12 on that page ? Also thanks for this

- gielie
- Posts: 290
- Joined: Tuesday 12 January 2016 11:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest β
- Location: The Netherlands (Alkmaar)
- Contact:
Re: Dashticz - Module - Garbage collector
my garbage bin doesn't change color.

this is the code i use
What am i doing wrong?
Ok i figured it out already, the names i use are not compatible with the colored bin code, changed the names and its working.

this is the code i use
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'
Ok i figured it out already, the names i use are not compatible with the colored bin code, changed the names and its working.
Last edited by gielie on Sunday 14 May 2017 12:37, edited 1 time in total.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
Who is online
Users browsing this forum: No registered users and 1 guest