I checked, (I adjusted the query a bit since I am on mysql), but it 
confirmed there are 31 rows in the last 1 hour.

I ran :
select 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/select.html>
 count 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_count>
(*),avg 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_avg>
(pm2_5),max 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_max>
(pm2_5) from archive where dateTime 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/date-and-time-types.html>
>=(select 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/select.html>
 max 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_max>
(dateTime 
<http://diskstation/phpMyAdmin/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/date-and-time-types.html>
)-3600 from archive);

and got : 
count(*) avg(pm2_5) max(pm2_5)

31   1.0897849462365594  1.2





On Saturday, April 10, 2021 at 4:49:26 PM UTC+2 [email protected] wrote:

> Well, you can check what's in the database for the last hour.  Adjust the 
> path to the database as necessary.
>
> *sqlite3 /var/lib/weewx/weewx.sdb*
> sqlite> *select datetime(dateTime,'unixepoch','localtime'),pm2_5 from 
> archive where dateTime>=(select max(dateTime)-3600 from archive);*
>
>
>
> On Sat, Apr 10, 2021 at 5:50 AM [email protected] <[email protected]> 
> wrote:
>
>> Hi, 
>>
>> I am trying to improve my station sking with a proper AQI 
>> computation/display. however when using $hour.pm2_5.has_data it is always 
>> false.
>>
>> Data is stored in the pm2_5 column of weewx archive database. Gauges show 
>> the current values, and history plot show prior data.
>>
>> Is there a setting I need to add somewhere so that hourly average can be 
>> computed on this column as well?
>>
>> Regards,
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/6110a7ae-2012-47b9-9ffe-0cc7c8c67837n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/6110a7ae-2012-47b9-9ffe-0cc7c8c67837n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/28c7fca2-6552-4c19-9c51-8db602b9a416n%40googlegroups.com.

Reply via email to