Page 1 of 2

Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Tuesday 01 May 2018 22:43
by robgeerts
Show air quality from longfonds.nl

Available in latest BETA!
Install the beta and add this to config.js:

Settings:

Code: Select all

config['longfonds_zipcode'] = '5654SB';
config['longfonds_housenumber'] = '3';
Width of the block (not required)

Code: Select all

blocks['longfonds'] = {};
blocks['longfonds']['width'] = 4;
Add block to a column like:

Code: Select all

columns[1] = {};
columns[1]['blocks'] = ['longfonds']
columns[1]['width'] = 5;

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Tuesday 01 May 2018 22:51
by EdwinK
Thanks. Now to find out what those numbers mean ;)

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Tuesday 01 May 2018 23:14
by robgeerts
0 = good, 11 is very bad ;)

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 02 May 2018 9:23
by EdwinK
:)

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 02 May 2018 15:45
by freakshock
Cool feature Rob, thanks !

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Sunday 10 June 2018 16:29
by joostnl
Works great! Could it be that width is not adjustable?

I tried:
blocks['longfonds']['width'] = 4;

(I think this also not work on bitcoin addin)

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Thursday 14 June 2018 12:08
by robgeerts
Just tested in latest beta and works like a charm here...

Code: Select all

blocks['longfonds'] = {};
blocks['longfonds']['width'] = 12;

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Monday 13 August 2018 19:55
by Derik
Thanks From my kids...

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Monday 13 August 2018 21:50
by EdwinK
Would be nice if those numbers would represent a colour. So, with 11 the cloud will be a deep-red, and at '0' it will be a nice green.

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Tuesday 14 August 2018 0:42
by HansieNL
Hello Rob,
I tried to change the cloud image using blocks['longfonds']['image'] = 'cust_lungs.png'; , but without succes. Is it a fixed image? If so, will it be possible to change it to use our own image? I've created a lungs image as you can see...
Image

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 15 August 2018 16:46
by Herman-H
Nice feature, longfonds. I have only one question. Where can i change "Luchtkwaliteit" in "Luchtkwaliteit: 0 - goed, 11 - zeer slecht"

Update: Found it.

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Tuesday 11 June 2019 22:32
by EdwinK
Looks like this isn't working anymore. Only got an empty tile. When I go to longfonds.nl, data takes forever to show

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 12 June 2019 13:13
by HansieNL
EdwinK wrote: Tuesday 11 June 2019 22:32 Looks like this isn't working anymore. Only got an empty tile. When I go to longfonds.nl, data takes forever to show
Still working here. I just tried with their own address: https://www.longfonds.nl/gezondelucht/a ... Number=127

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 12 June 2019 17:48
by EdwinK
That seems to work, yet I don't get any results on my Dashticz installation.

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 12 June 2019 18:48
by EastXIII
HansieNL wrote: Wednesday 12 June 2019 13:13
EdwinK wrote: Tuesday 11 June 2019 22:32 Looks like this isn't working anymore. Only got an empty tile. When I go to longfonds.nl, data takes forever to show
Still working here. I just tried with their own address: https://www.longfonds.nl/gezondelucht/a ... houseNumbe
Maybe you should remove this link since you just told the whole wide web where you live... I assume. But then again; assumption is the mother of all f**k ups.

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 12 June 2019 20:10
by EdwinK
HansieNL used the address from the Longfonds, not his.

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 12 June 2019 20:22
by EastXIII
Should have known... Apologies!

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 12 June 2019 20:28
by jake
EdwinK wrote:HansieNL used the address from the Longfonds, not his.
No wonder that it worked well....


... Just kidding

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 31 July 2019 9:40
by EdwinK
tried again, still not working for me :(

Re: Dashticz - Module - Longfonds / luchtkwaliteit (Dutch only)

Posted: Wednesday 27 January 2021 16:50
by BlueMotion
Works like a a charm. Except the coloring part.

Code in config.js

Code: Select all

config['longfonds_zipcode'] = '8888AA';
config['longfonds_housenumber'] = '11';

blocks['longfonds'] = {
  title: 'Longfonds',
  switch: true,
  width: 3,
}
Besides the Longfonds I also have a Co2 Sensor, the PM10 and PM25 sensor.
For those sensors I configured the coloring based on the luchtkwaliteitsindex (air quality index)
https://www.luchtmeetnet.nl/informatie/ ... ndex-(lki)

Code: Select all

// pm25
function getStatus_124(block){
var idx = block.idx;
var device = block.device;
   if(parseFloat(device['Data'])<10){
      block.addClass='kleurStatus1';
   }
   if((parseFloat(device['Data'])>=10) && (parseFloat(device['Data'])<15)){
      block.addClass='kleurStatus2';
   }
      if((parseFloat(device['Data'])>=15) && (parseFloat(device['Data'])<20)){
      block.addClass='kleurStatus3';
   }
      if((parseFloat(device['Data'])>=20) && (parseFloat(device['Data'])<30)){
      block.addClass='kleurStatus4';
   }
      if((parseFloat(device['Data'])>=30) && (parseFloat(device['Data'])<40)){
      block.addClass='kleurStatus5';
   }
      if((parseFloat(device['Data'])>=40) && (parseFloat(device['Data'])<50)){
      block.addClass='kleurStatus6';
   }
      if((parseFloat(device['Data'])>=50) && (parseFloat(device['Data'])<70)){
      block.addClass='kleurStatus7';
   }
      if((parseFloat(device['Data'])>=70) && (parseFloat(device['Data'])<90)){
      block.addClass='kleurStatus8';
   }
      if((parseFloat(device['Data'])>=90) && (parseFloat(device['Data'])<100)){
      block.addClass='kleurStatus9';
   }
   if(parseFloat(device['Data'])>=100)  {
      block.addClass='kleurStatus10';
   }
}
With a link to the coloring in the custom.css

Code: Select all

/* kleuren voor luchtkwaliteit (PM10, PM25, Longfonds) */

.kleurStatus1 {
  color: royalblue !important;
}
.kleurStatus2 {
  color: cornflowerblue !important;
}
.kleurStatus3 {
  color: skyblue !important;
}
.kleurStatus4 {
  color: lightyellow !important;
}
.kleurStatus5 {
  color: khaki !important;
}
.kleurStatus6 {
  color: yellow !important;
}
.kleurStatus7 {
  color: orange !important;
}
.kleurStatus8 {
  color: darkorange !important;
}
.kleurStatus9 {
  color: orangered !important;
}
.kleurStatus10 {
  color: red !important;
}
The problem I have is that the longfonds has no idx number or whatsoever. Does any know how to color the longfonds block based on the 0-11 (great to bad) classes?