Author Topic: Support of "Leuven" Air Quality scripts  (Read 4784 times)

0 Members and 1 Guest are viewing this topic.

Offline pimohdaimaoh

  • Senior Contributor
  • ****
  • Posts: 267
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: Support of "Leuven" Air Quality scripts
« Reply #50 on: May 20, 2020, 08:12:22 AM »
Hi There,

Before we can start, do you have the user sensor file coming to your /luftdaten/data directory on your server?

it will look like "luft_24data_esp8266-14900835.arr"

Regards,
Dave.

Hello, yes I have that exactly but I temporarily disabled it because im using WIM's script that directly reads data from luft servers


Regards

-Mike-

Offline WraxallDave

  • Senior Member
  • **
  • Posts: 62
    • Wraxall Weather, Uk
Re: Support of "Leuven" Air Quality scripts
« Reply #51 on: May 20, 2020, 08:40:03 AM »
Hi Mike,

First task is to read that sensor file, I modified Wim's "Saratoga" script to read the sensor file.

Then wrote a script to run as a cron to load the data into an SQL database.

There are several graph/chart packages that can be used to display SQL data, I like JPGraphs, but you could use HighCharts.

I can help with reading the sensor file  and the SQL load script, but explaining graph packages would take forever. There is a lot on the forum about using these packages.

If you would like to go down the route of getting the data into an SQL database, let me know?

Cheers,

Dave

Offline pimohdaimaoh

  • Senior Contributor
  • ****
  • Posts: 267
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: Support of "Leuven" Air Quality scripts
« Reply #52 on: May 23, 2020, 08:43:50 AM »
Well not bad i INSTEAD USE its gaffana graphs, however the monthly and yearly graphs are not available so still need to redirect to MADAVI site for it, but at least I got daily graphs

Offline Sperber

  • Member
  • *
  • Posts: 2
Re: Support of "Leuven" Air Quality scripts
« Reply #53 on: August 21, 2020, 12:51:06 PM »
Hi Wim,
i like your skript for purpleair,
and i have a little problem..

https://wetter.priesterath.net/purpleair/_test2.php

I would like only the page with all the data first. Otherwise I always have to click on more.
I just can't do it.  :roll:

Thx Sperber


Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #54 on: August 21, 2020, 01:08:40 PM »
Hi Wim,
i like your skript for purpleair,
and i have a little problem..

https://wetter.priesterath.net/purpleair/_test2.php

I would like only the page with all the data first. Otherwise I always have to click on more.
I just can't do it.  :roll:

Thx Sperber
Most people only want a low (small)  block on their page. So default the condensed data is used with a button to extend.

Script ws_purpleair2.php  lines 360-361 now use the $aq_condensed_html
Code: [Select]
if (isset ($purple_html) && $purple_html == true)
     {  echo $pageHTML_0.$aq_condensed_html.$pageHTML_9; }
Change that so that all information is shown
Code: [Select]
if (isset ($purple_html) && $purple_html == true)
     {  echo $pageHTML_0.$aq_fullpage_html.$pageHTML_9; }

That should do it.

Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline Sperber

  • Member
  • *
  • Posts: 2
Re: Support of "Leuven" Air Quality scripts
« Reply #55 on: August 21, 2020, 01:47:32 PM »
Thanks, that was quick.
It's going to be a special project.
Since all the air data measuring devices differ too much for me, I will present 3 manufacturers on one page.

Your script is the first for Purple Air.

IQAir AirVisual Pro from Switzerland and https://www.air-q.com/ from Germany are added.
I'm waiting for the delivery.

All are placed in the same location.

Maybe you can help me with the page ?!

Thanks Sperber

Offline the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 303
    • test site
Re: Support of "Leuven" Air Quality scripts
« Reply #56 on: August 23, 2020, 09:06:00 PM »
Hello Wim ...
Long time since the beteljuice last annoyed you  :grin:

Woken up by the last few posts I fancied a change, and thought I'd have a quick look under the bonnet and see what you've done with the AQ stuff.

So I've messed about tweaked a bit and Here are the results

Done very little really, just light cosmetics.  :roll:

BTW - You seem to have very good air ATM - Last 24h avg    4 g/m3
I judge my air by how bad the birds are coughing !
Imagine what you will KNOW tomorrow !

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #57 on: August 24, 2020, 02:56:07 AM »
@the beteljuice

 [tup]
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline big2000

  • Member
  • *
  • Posts: 6
    • meteotaranto.org
Re: Support of "Leuven" Air Quality scripts
« Reply #58 on: September 11, 2020, 11:42:06 AM »
Hi Wim!

Thanks for the script!

It is working "kinda good" :roll:

Having a little problem with saratoga-template...
Do you know why nothing is shown in /wxAqLuft.php while using ws_luftdaten2.php ???

_test2.php and ws_luftdaten2.php are actually working but wxAqLuft.php is not showing anything... :???: (i already changed wxAqLuft.php to show ws_luftdaten2.php but nothing...)?

www.meteotaranto.org/wxAqLuft.php

Thank you,

Silvio. :grin:

« Last Edit: September 11, 2020, 11:46:09 AM by big2000 »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #59 on: September 11, 2020, 12:35:33 PM »
Hi Wim!

Thanks for the script!

It is working "kinda good" :roll:

Having a little problem with saratoga-template...
Do you know why nothing is shown in /wxAqLuft.php while using ws_luftdaten2.php ???

_test2.php and ws_luftdaten2.php are actually working but wxAqLuft.php is not showing anything... :???: (i already changed wxAqLuft.php to show ws_luftdaten2.php but nothing...)?

www.meteotaranto.org/wxAqLuft.php

Thank you,

Silvio. :grin:
Fairly difficult to debug. On top of that, add  the continuous change and blocking of luftdaten maps and madavi graphs which also needs some work.

So it is easier for you to make a new page to the menu starting with the wxnewpage.php
You can then add the working http://www.meteotaranto.org/luftdaten/ws_luftdaten2.php  in an iframe
And add any other interesting and still working information you may need.

Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline big2000

  • Member
  • *
  • Posts: 6
    • meteotaranto.org
Re: Support of "Leuven" Air Quality scripts
« Reply #60 on: September 11, 2020, 05:47:04 PM »
Hi Wim!

Thanks for the script!

It is working "kinda good" :roll:

Having a little problem with saratoga-template...
Do you know why nothing is shown in /wxAqLuft.php while using ws_luftdaten2.php ???

_test2.php and ws_luftdaten2.php are actually working but wxAqLuft.php is not showing anything... :???: (i already changed wxAqLuft.php to show ws_luftdaten2.php but nothing...)?

www.meteotaranto.org/wxAqLuft.php

Thank you,

Silvio. :grin:
Fairly difficult to debug. On top of that, add  the continuous change and blocking of luftdaten maps and madavi graphs which also needs some work.

So it is easier for you to make a new page to the menu starting with the wxnewpage.php
You can then add the working http://www.meteotaranto.org/luftdaten/ws_luftdaten2.php  in an iframe
And add any other interesting and still working information you may need.

Wim

Thank you Wim.

I'll try what you said once i'm back home.

Will let you know if it works!

Thank you! :grin:

Silvio

Offline big2000

  • Member
  • *
  • Posts: 6
    • meteotaranto.org
Re: Support of "Leuven" Air Quality scripts
« Reply #61 on: September 12, 2020, 06:26:56 AM »
Dear Wim,

while i'm trying to make work about what you said, i'm now using ws_luftdaten1.php

Good. Now the "big" question:

Is there a way to create a new IQA for like Italy??  :-k :-k

Silvio.
 :grin:

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #62 on: September 12, 2020, 06:37:08 AM »
Dear Wim,
. . .
Is there a way to create a new IQA for like Italy??  :-k :-k
. . .

If you want to use the Italian language
  • Copy ws_luft_langEN.php  and name it ws_luft_langEN.php
  • Change all English text at the right of the =  to Italian texts.
    Do not change any texts at the lef of the = !
Then the texts would all be in Italian.

Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline big2000

  • Member
  • *
  • Posts: 6
    • meteotaranto.org
Re: Support of "Leuven" Air Quality scripts
« Reply #63 on: September 12, 2020, 06:44:17 AM »
Dear Wim,
. . .
Is there a way to create a new IQA for like Italy??  :-k :-k
. . .

If you want to use the Italian language
  • Copy ws_luft_langEN.php  and name it ws_luft_langEN.php
  • Change all English text at the right of the =  to Italian texts.
    Do not change any texts at the lef of the = !
Then the texts would all be in Italian.

Wim

Dear Wim,

i guess we didn't understand each other :oops:

I'm talking about creating a new IQA Index with the Italian values...

Like the US/NL etc...
 [ You are not allowed to view attachments ]

Thank you :grin:

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #64 on: September 12, 2020, 06:59:49 AM »
Dear Wim,
. . .
Is there a way to create a new IQA for like Italy??  :-k :-k
. . .

If you want to use the Italian language
  • Copy ws_luft_langEN.php  and name it ws_luft_langEN.php
  • Change all English text at the right of the =  to Italian texts.
    Do not change any texts at the lef of the = !
Then the texts would all be in Italian.

Wim

Dear Wim,

i guess we didn't understand each other :oops:

I'm talking about creating a new IQA Index with the Italian values...

Like the US/NL etc...
 [ You are not allowed to view attachments ]

Thank you :grin:
I was not  aware of an Italian AQ-index.

As you can understand adding a totally new index (not the words but the levels) will costs a lot of hours of my spare time.

Sadly the AQ scripts seems not to be used that much  and neither are they appreciated that much.

I should better spent my free time enhancing scripts which are used and valued more.

Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline big2000

  • Member
  • *
  • Posts: 6
    • meteotaranto.org
Re: Support of "Leuven" Air Quality scripts
« Reply #65 on: September 12, 2020, 07:40:01 AM »
Dear Wim,
. . .
Is there a way to create a new IQA for like Italy??  :-k :-k
. . .

If you want to use the Italian language
  • Copy ws_luft_langEN.php  and name it ws_luft_langEN.php
  • Change all English text at the right of the =  to Italian texts.
    Do not change any texts at the lef of the = !
Then the texts would all be in Italian.

Wim

Dear Wim,

i guess we didn't understand each other :oops:

I'm talking about creating a new IQA Index with the Italian values...

Like the US/NL etc...
 [ You are not allowed to view attachments ]

Thank you :grin:
I was not  aware of an Italian AQ-index.

As you can understand adding a totally new index (not the words but the levels) will costs a lot of hours of my spare time.

Sadly the AQ scripts seems not to be used that much  and neither are they appreciated that much.

I should better spent my free time enhancing scripts which are used and valued more.

Wim

Dear Wim,

i totally understand what you are saying.

I kinda knew that it wasn't an "easy-to-do" thing but i asked anyway...

Thank you for your support!  :grin:

Offline zmarfak

  • Contributor
  • ***
  • Posts: 108
    • Matar
Re: Support of "Leuven" Air Quality scripts
« Reply #66 on: April 21, 2021, 03:50:32 AM »
Hi Wim,
I switched my website to phph 8.0.3 yesterday.
Everything is (seems) ok.
I decided to check one of the error files on my site and I saw this error appearing since yesterday :
Code: [Select]
2021/04/20 16:31:00 [error] 16737#0: *7634892 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "accuracy" in /var/www/vhosts/matar.be/httpdocs/weather/sensorpurple3.php on line 133" while reading response header from upstream, client: 81.242.122.10, server: matar.be, request: "POST /weather/sensorpurple3.php HTTP/1.1", upstream: "fastcgi://unix:///var/www/vhosts/system/matar.be/php-fpm.sock:", host: "www.matar.be"

Because I don't know php very well, have you an idea how to solve this?

Thank you
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #67 on: April 21, 2021, 04:31:11 AM »
Hi Wim,
I switched my website to phph 8.0.3 yesterday.
Everything is (seems) ok.
I decided to check one of the error files on my site and I saw this error appearing since yesterday :
Code: [Select]
2021/04/20 16:31:00 [error] 16737#0: *7634892 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "accuracy" in /var/www/vhosts/matar.be/httpdocs/weather/sensorpurple3.php on line 133" while reading response header from upstream, client: 81.242.122.10, server: matar.be, request: "POST /weather/sensorpurple3.php HTTP/1.1", upstream: "fastcgi://unix:///var/www/vhosts/system/matar.be/php-fpm.sock:", host: "www.matar.be"

Because I don't know php very well, have you an idea how to solve this?

Thank you
Seems that one of the seldom used fields is not uploaded anymore by the sensor, missing?
No idea since when, I have to check some other sensors.
PHP-8 does not like missing items and generated a message, in the past it was a null value.

Luckily your settings saved  the last posted message in a cache file, so that made debugging very easy.
Change line 133  in weather/sensorpurple3.php from
Code: [Select]
        $accuracy       = (float) $this_mes['accuracy'];to
Code: [Select]
        $accuracy       = -1;
Wim
« Last Edit: April 21, 2021, 04:44:31 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

Offline zmarfak

  • Contributor
  • ***
  • Posts: 108
    • Matar
Re: Support of "Leuven" Air Quality scripts
« Reply #68 on: April 21, 2021, 04:43:40 AM »
Wim,
thank you for your quick response.

Made the correction.
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline PeeGee

  • Member
  • *
  • Posts: 2
Re: Support of "Leuven" Air Quality scripts
« Reply #69 on: July 12, 2021, 03:49:41 AM »

Hi Wim,

Is it also possible to use the AQI script, of course after some adjustments, for the Davis Airlink sensor?

Greetings,
Peter.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1819
    • My PWS at Leuven Belgium Europe
Re: Support of "Leuven" Air Quality scripts
« Reply #70 on: July 19, 2021, 09:22:17 AM »

Hi Wim,

Is it also possible to use the AQI script, of course after some adjustments, for the Davis Airlink sensor?

Greetings,
Peter.

Sorry, no.
I stopped enhancing all "donation-ware" scripts.
But the Airlink sensor is supported in the free PWS_Dashboard scripts.

Wim
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com