What's Your Favorite Sensor Value Averager?

To average sensor values, I'm currently using:

averageTemp.groovy from HubitatPublic/example-apps at master · hubitat/HubitatPublic · GitHub

but I really dislike that it creates a separate entry under Apps for each instance, rather than one parent App with nested instances.

Anyone have a sensor value averager they love?

Probably not the most efficient but I just do it in RM. it only runs once every five mins when the sensor updates.

I take the previous averaged value and multiply it by 3, add the latest sensor value and then divide by 4.

I've been using AverageThis. Works great, single app and then creates child devices as needed.

Averaging Plus by @bptworld

Since his apps are no longer developed or maintained, you'll need to download and install the apps/driver/library manually. They still work rock-solidly. Only wished while the app was still maintained that I had requested the feature to ignore wildly incorrect, out-of-range values.

Download the two zips. Unzip. Read the install file to determine where to copy/paste the code - app, driver, or library.

Well worth the additional manual hassle. You'll thank me later. :wink:

1 Like

Hi - I have a related question - I'm looking for a way to combine readings from light /luminance sensors - not necessarily an average, but rather to trigger when a certain minimum number of sensors goes above or below a threshold. There are two "problems" - one is caused by Aqara sensors that are less reliable than my Philips Hue outdoor sensors - they go offline periodically. The other is caused by differences in lighting on different sides of the house.
See related thread: https://community.hubitat.com/t/managing-change-seasons-light-levels-occupancy-weather/92683

What I'd like is to be able to trigger when x out of y sensors meet a criterion. Is there any app that does this or a way in RM? I think there are apps that do this for motion, but I haven't found anything that does it for any arbitrary kind of sensor.

Thanks,
Michael

I can’t help you with your main question, but regarding the aqara sensor dropping off - I have put all my aqara stuff on a separate C5 hub on a different zigbee channel and I have had zero issues with them for a couple years now.

+1 to AverageThis by @csteele .

I modded this app to meet my needs but it was the basis for all my multi-sensor monitors. I'm doing Power, Illumination, temp and humidity. It is a rolling average so the slopes are less sharp but much more realistic.
Another benefit that wasn't intentional is that now with Alexa handling sensors - I can control what attribute is defaulted on the Alexa side - a problem I had run into recently.
Yet another benefit is I no longer needed OmniSensor - something that always gave me troubles ... I cleaned my HE a few months ago and really cut back on every driver and app I didn't need or could do away with. (Best thing I ever did to my HE)
Any tile below that is named ATV (AverageThis Virtual Tile it stands for in my implementation) is reliant:

1 Like

AverageThis appears to only support Omni sensors: