Dashticz - Module - Garbage collector Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
User avatar
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

Post by EdwinK »

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
User avatar
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

Post by gielie »

robgeerts wrote:
gielie 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.
Try latest beta, the icon gets the color of the first upcoming type of trash that gets picked up
This doesnt work in my setup. I changed the colour of the grey bin text but the icon is not changing.
ImageImage



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
User avatar
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

Post by mvveelen »

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:

Code: Select all

11-05-2017,25-05,2017, etc
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:

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
niceandeasy
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

Post by niceandeasy »

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.
robgeerts wrote:Could you send me your trash-config including zipcode?
So I can test with it..
zip PM'ed ...

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

Post by niceandeasy »

EdKo66 wrote:I think Rob should make something to alert us on Dashticz that there is a new update :)
You should just put your git clone command in your cron.
User avatar
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

Post by EdwinK »

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
User avatar
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

Post by mvveelen »

With the paper-script (few posts up):
Schermafbeelding 2017-05-11 om 19.30.02.png
Schermafbeelding 2017-05-11 om 19.30.02.png (120.25 KiB) Viewed 2979 times
:D
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
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

Post by capman »

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 ;)
User avatar
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

Post by EdwinK »

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
User avatar
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

Post by capman »

EdKo66 wrote:Try and see if they give a JSON of XML file.
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 think :?:
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 :)
robgeerts
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

Post by robgeerts »

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' }
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by geertvercamer »

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"}]
User avatar
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

Post by capman »

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 :(
User avatar
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

Post by EdwinK »

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
barbaar
Posts: 56
Joined: Wednesday 24 December 2014 16:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by barbaar »

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?
sonar
Posts: 18
Joined: Saturday 31 January 2015 11:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Dashticz - Module - Garbage collector

Post by sonar »

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"},
With this url you can get the id for your addres:
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.
robgeerts
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

Post by robgeerts »

yes, i can :)
(asap)
geertvercamer
Posts: 84
Joined: Friday 12 May 2017 20:03
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - Module - Garbage collector

Post by geertvercamer »

Thanks Sonar, figured that out around midnight and would post it this morning.

And thanks to Rob, of course!
User avatar
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

Post by capman »

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 :D
User avatar
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

Post by gielie »

my garbage bin doesn't change color.
Image

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'
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.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest