Luftdaten Update time

Hi there
is there a way in the PWS dashboard (I’m sure there is) a way to change the refresh time for the file luftdaten from 2 minutes to 5 or 10 minutes?
Reason is as its set to 2 mins it never updates in PWS dashboard until at least 7 - 8 mins, so therefore lately there is always a red exclamation mark. I tried deleting the status.arr file but it makes no difference. ( have looked at all the load files etc with no luck).
WIM will know im sure…
Thanks

Around line 51 of PWS_settings.php, I think:

$luftRefresh    = 120;

I think you need to delete status.arr again after making the change. . .

1 Like

Right that’s the only file i didn’t look at, didn’t think it was in there. Well Done BOS.

Just changed the refresh, so wait and see now

Hi all
question about this one again.
I changed the settings as BOS said to 10 mins, deleted the file, and now the update time has changed from 2 mins to 3 mins 20 seconds?, is there anywhere else that needs to be changed,
Ideas on a a postcard please…

Around line 90 of PWS_blocks.php I have

$rfrsh_AQ       = 300;

which is the block refresh time, not the data refresh time. . .?

EDIT: I think the cron brings the data refresh time down: around line 33 in PWS_load_files.php we have

if (isset ($cron) && $cron == true) {$times  = 0.8;} else {$times  = 1;}

and around line 340

$allowed_age    = $luftRefresh*$times;

In the cron job, 80% of the set time is used → 480 seconds == 8 mintues
PWS_load_files.php (470) AQ-Luftdaten__: File not old enough (147/480 seconds) https://data.sensor.community/airrohr/v1/sensor/64838/

If the dashboard is used, for every on-line user, the PWS_load_files is run (jQuery) every 120 seconds but the allowed age for the file is 600 seconds == 10 minutes

PWS_load_files.php (470) AQ-Luftdaten__: File not old enough (454/600 seconds) https://data.sensor.community/airrohr/v1/sensor/64838/ P

In the status popup, only updated by the cron job, it shows when I check,
./jsondata/luftdaten.txt aq-luftdaten Ok 4 mins 28 seconds https://data.sensor.community/ . . .

So where is the age of 3 min 20 seconds displayed?
Then i can check.

Wim

Hi Wim
seems to be ok now that i have changed some settings as BOS said.
It showed up in the status popup page saying max time 3 mins 20 secs