If you bind your service to loop rather than record then
weewx will build an archive record at the archive interval, with the value 
being the average value for the period

if you specify use loop for hilo in weewx.conf then weewx will populate the 
max and min from the loop data and the archive record will contain the 
average value for the archive period

if you do not specify to use loop hilo then min and max will be the highest 
archived value for the day or the lowest archived value for the day

does this answer your question though??

oh yes, the min and max times will always be on archive boundaries unless 
use loop for hilow is specified since the source of the data is of course 
the archive record.

so the way to specify the times of the max and min is for the data to be in 
loop packets rather than rec packets



On Wednesday, 5 September 2018 07:30:35 UTC+3, Thomas Carlin wrote:
>
> Good evening!
>
> I have extended my weewx instance with several sensors build on the 
> ESP8266 platform with help from many in this community.  I have built a 
> driver based on the custom service documentation provided by TK and crew.  
> This has been working wonderfully, and I am really enjoying the extra 
> temperature sensors, as well as things like electricity monitors, 
> irrigation system monitors etc.  The only issue that I have with this 
> system is that I am only adding a single piece of data into the archive 
> each time the archive interval is reached.  I would like to know if there 
> is a way to as part of the additional service, add into the records the 
> minimum and maximum values recorded by the sensors, and the dates and 
> times.  Obviously, the sensors will have to record and transmit this data 
> on the archive interval, and the driver will need to interpret this data.  
> I just need to know how to insert the min and max data into the database.  
> Is this possible with the current architecture?
>
> For Example, the contents of the an archive for outTemp and one of my 
> custom sensors.  Notice the precision of the time of the outTemp, and the 
> general time of the l2_volt, all on the 5 minute archive interval of my 
> system.  
>
> sqlite> select * from archive_day_outTemp order by dateTime desc limit 1;
> dateTime  |min             |mintime   |max |maxtime   |sum             
> |count|wsum            |sumtime
> 1536040800|55.1999999999999|1536065400|87.5|1536097806|18741.1237726958|263  
> |5622337.13180874|78900
>
>
> sqlite> select * from archive_day_l2_volt order by dateTime desc limit 10;
> dateTime  |min   |mintime   |max   |maxtime   |sum     |count|wsum     
> |sumtime
> 1536040800|115.15|1536117900|125.74|1536079200|32513.28|263  |9753984.0|78900
>
>
> Hopefully this request makes sense, and thank you for your help!
>
>
> http://carlincomputing.duckdns.org/weewx/index.html
>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to