I am currently using a custom averaging app that takes 2 or more Temp readings and forwards them to a Virtual Thermostat. This works well, but there is no truncation on the average decimals, so sometimes I end up with a very long temperature "reading". I have no Groovy knowledge so don't know how to change it. In addition to this the current app has multiple non-nested instances, which doesn´t look super nice.
I was hoping that I could use your Averaging Plus app for this, but it seems I need to create a new virtual device or use an existing one but with a specific driver. I suppose I could create a new device and copy the temp to the thermostat, but that just adds more devices, which is something I was trying to avoid.
Any idea if I could do this differently with Averaging Plus ?
I only just started using this app. I've created 2 virtual temperature sensors using it. Tonight at midnight, I got the following errors in the log, 1 for each.
[dev:422](http://192.168.1.134/logs#dev422)2020-08-14 12:00:00.402 am [error](http://192.168.1.134/device/edit/422)java.lang.ArrayIndexOutOfBoundsException: 1 on line 86 (virtualAverage)
[dev:225](http://192.168.1.134/logs#dev225)2020-08-14 12:00:00.321 am [error](http://192.168.1.134/device/edit/225)java.lang.ArrayIndexOutOfBoundsException: 1 on line 86 (virtualAverage)
I don't know if this would make the virtual devices to bulky, but it would be sweet if the log, or a variable state included all the incoming variables being tabulated. Also, is there any math/logic/option to toss out obvious bad data? Like when one sensor fails, or batteries die, etc. Perhaps a mode that throws out sensors that haven't updated in the last hour, and the option to also achieved a "trimmed mean," which in the statistics world means you toss out the top and bottom 10%. When I'm doing 10-15 temperature sensors and one of them is reporting something bogus, it would be nice to have that feature. Then the virtual device could report the instantaneous high/low as well. That could be useful if you not only want to work with the average, but also extremes.
Hi @bptworld - I just started using this - I'm not sure if it's just coincidence but it looks like when averaging temperatures it seems to round up or down to the nearest whole temp. However it would be really useful to have at least one decimal place so that the hysteresis of my thermostats can work properly with this. thanks!
As I was adding a new child today, I thought of a potentially useful feature for this app. Right now the app has a time setting to decide when to re-average the devices. It could be nice to have an option to re-average whenever one of the devices updates the attribute that's being averaged.
For example, I'm mainly using it for temperatures, if I set it to average every 5 minutes and then a temperature change comes in 2 seconds after that completes, I now have to wait 4 minutes and 58 seconds for the average to reflect these changes. If I set it at the quickest possible refresh (1 minute), it'll more quickly reflect changes, but during the majority of the day, when the house isn't rapidly changing temperature, I just end up recalculating average needlessly.
This is exactly why the timer is in there. Recalculating every time a value changes by .01 would be very hub intensive. So to compromise, I have the different times.
That’s fair, my temperature sensing devices really only report at a change of around .5 of a degree, so I generally only see reports at most every couple of minutes. So hadn’t considered devices out there that report that level of change granularity. Didn’t think there were devices out there report that little of a change! Seems like a great way to overwhelm a mesh.
Thanks for this great app! I noticed something about the rounding - it looks like the average for temperature is given with one decimal place, but the input gets cut off. For example, I'd expect this:
70.8, 70.9, 71.7, ave - 71.1
but what it appears to be doing is just lopping off the decimal for the input like this:
70, 70, 71, ave - 70.3
In my opinion, the inputs should never be rounded/changed before any averaging takes place. Is this something that can be looked at/considered? Thanks!
@bptworld , I tried to average 2 x lux censors. I noticed if one of the sensors shows zero then the average will be the same as the value of the other higher sensor. i.e sensor 1 = 0, sensor 2 = 10 , average = 10 ?
Do I need any extra setting to get this right?
Thanks
Please can I ask if it is possible to have an option to select to not have any decimal places on an averaged result. I am using your app to average 2 lux readings and I had an issue in one of the rules, @bobbyD said that lux should not have a decimal point. If this is possible already then I apologies, if you could let me know what I need to do. If not then maybe a change