min/max/average plugin DOWNLOAD

User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

Code: Select all

changes in V 2022.15.23  @ 2023-02-06
==================  

1. added 
		measurement "consumption" = end value of period - start value of period
		UpTime = % of time the value in the time window was not 0
		Simple Average
2. added other time bins 
		day time,  night time , last 12 hours, previuos 12 hours

3. fixed calculation of std deviation, the simplified formula does not work for LARGE numbers, back to general formula : sqrt(sum((xi-av)**2))/N

3. added simple average to measures
- before it was ONLY time weighted average as some of the data is not in regular time intervals and some values are longer valid that others. ie when a state is not upated on a fixed time slot basis
  eg a lamp is off for 11, on for 1, off for 12 hours
  simple average would give (0+1+0)/3 = 1/3
  time weighted average would be  (0*11 + 1*1 * 0*12 )/24 = 1/24 instead of 1/3
  now you have both.

4. some print out improvements, shows definitions of time windows and measures
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

Code: Select all

changes in V 2022.15.25  @ 2023-02-07
==================  

1. removed debug logging 
2. some grammar fixes
3. added std deviation simple besides std deviation time weighted 
this should be it for some time

Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

changes in V 2022.16.26 @ 2023-02-08
==================

1. optimized code, reduced cpu by ~ 90%
most of the cpu was used by the sql query (80%)
now only once an hour, in between subscription to dev / variable changes

2. some grammar fixes
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

changes in V 2022.16.27 @ 2023-02-11
==================

1. fix error when data is a mix of number and strings, convert all strings to numbers
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

changes in V 2022.17.27 @ 2025-04-21
==================
1. added measurement:
"Trend": "change% = (end value - start value) / (end value + start value) *200; trend = ^^^^^^^, ... ,^,=,v,...,vvvvvvv: if change% > +64x,32x,16x,8x,4x,2x,x, = , < x,2x,4x,8x,16x,32x,64x, x = 1%)"
eg temperature changes in 1 hour
from 20.0 to 20.4% = +2% --> Trend_thisHour = "^^";
20.0 to 18.0 = -10% --> Trend_thisHour = "vvvv",
stays within +-0.2 --> Trend_thisHour = "="

this can be used to show a change in eg temperature or pressure or humidity over the last hour or day in symbols "^^^^" = up > 8% , or "v" = down 1%


prerelease posted at : https://github.com/kw123/minMax/releases/tag/2022.17.27
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

changes in V 2022.18.28 @ 2025-09-15
==================
1. trend values: added option to change variable values fro vvvvvvv ... ^^^^^^^^ to vvv4vvv vv4vvv ... v ..= .. ^ .. ^^^4^^^
trend settings can now be done for each dev/state individually
2. several menu fixes



changes in V 2022.17.28 @ 2025-09-15
==================
1. fixed version number determination, did not work for beta version (0b1 is not an integer)
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: min/max/average plugin DOWNLOAD

Post by kw123 »

changes in V 2022.18.29 @ 2026-07-07
==================
bug fix release (code audit):
1. fixed NameError in doSQL error handler (evId -> devId) and in getTrendSymbol error handler
2. fixed bad format string in calculate() bad-data log that aborted the whole calculation
3. fixed checkbox id typo lastDay18-6StdStdDevSimple -> lastDay18-6StdDevSimple in MenuItems.xml
4. calculate(): virtual-point shift no longer leaks into the other time windows (wrong averages/dates)
5. refreshRate preference is now used by the main loop and can be set in the plugin config (was hardcoded 30 secs)
6. main loop no longer swallows errors silently; plugin does not restart itself on normal shutdown
7. variable create/update errors no longer abort the whole fill cycle; bad variable names are logged
8. variableUpdated/deviceUpdated protected against malformed tracking entries
9. saveDevList: forced save on shutdown/config change (20 sec throttle could drop last changes)
10. doSQL: error output after 3 retries is discarded instead of parsed as data; sqlite query now ORDERed by ts
11. readPopen returns empty strings instead of None on error
12. remove-from-tracking dialog: variables are now correctly identified as variables
13. postgres password no longer printed in clear text in config printout
14. empty time windows now report 0 for Min/Max/Start/End instead of +-987654321000 sentinels
15. removed unused imports and dead code
Post Reply

Return to “Min / Max / Average Plugin”