[UPDATED] - Average All (Temperature, Humidity, Illuminance, Ambient Pressure & Motion)



Is this one of many things that the built-in Zone Motion Manager app is supposed to be able to do? I've tried setting it up like that, but all I know is my basement lights still go out on me when the "second" sensor is still active, and I haven't bothered to figure out why yet.

This should definitely take care of my use case (mostly me being too lazy to modify my app to support more than one motion sensor :slight_smile: ), so thanks!


Don’t thank me until you’ve tested it :slight_smile:
I’ve been playing with it for a few days for the three sensors in my kitchen and three more in my office upto now I haven’t been left in the dark :slight_smile:

Edit: I was using zone motion app but found, like you,that it would go inactive if one of the sensors went inactive, rather than waiting for all sensors to go inactive.
The way I’ve coded this is to query all the sensors when each one goes inactive.
Only when they are all reporting inactive do I start the timer.
When the timer expires it sends the inactive state to the average all device



Robert, Did you try this?
Did it work ok for you?



I did! I had a small problem where the lights stayed on one time because the "average" sensor never went inactive, but I'm not sure if it's something odd I did (was I rebooting my hub?). They have definitely never turned off on me unexpectedly, however. I'll keep trying and let you know. :slight_smile:


But do they turn off when they should? :slight_smile:


I was a bit vague because I wasn't sure. :slight_smile: The answer to the specific instance I mentioned is "no," since the "average" sensor is the one I'm using in my lighting automation, with them dimming and turning off after it reports inactivity.

Some testing I just did and looking at the history of the "average" device suggests to me that it changes to "active" but actually never changes to "inactive." It's likely this has just never worked for me and I didn't notice. I can try something else out if you want me to test--all I have are two real (Iris and HomeSeer) motion sensors tied to this average-all device, both of which report inactivity fine to the hub from what I can see.



If you open the logs page on your hub and activate the motion, then wait for the motion on both sensors to stop, you should see some logging from the app
Can you let me know if the logs show anything?
They should show that the virtual device goes active and then inactive (after a timeout)



It’s strange because I use this for my kitchen lighting and office lighting and have not had any problems.


A quick test to confiirm that the average all device is reporting to your app correctly is to open the device and type either active or inactive in the box below the ‘set motion’ button then click the button.



@bertabcd1234 @halfrican.ak

for some reason an old bug got into the code I uploaded :slight_smile:
Fixed now, so the latest version should switch off as desired (Motion)

Child Version: V1.4.1



I actually hadn't started "using" the motion average feature, I do have one setup but was just monitoring it to see if it would work for me.

On a side note, lux seems to be working well (of course this statement will cause it to fail) hopefully it's good to go now!

And I called it, lux stopped updating the virtual level again. Sorry...


The update fixed it for me. Glad I wasn't totally crazy! :slight_smile: Working as expected now. Thanks for your work on this! (I'm again sure that Zone Motion Controller is supposed to be able to do this, but either there's also a bug there or I just can't figure it out...)


When the timer expires, do you query the sensors to make sure one or more didn't go active again?


I don't seem to be getting any updates from app to your virtual device. Set virtual device as average all and have 2 x smartthings motion sensors for temp updates but no updates are coming in.

latest versions off git i was using it on old version to push updates to a virtual thermostat and that seem to work but i will not let me select it in latest version.


Hang on it maybe because i have not had big enough change in temp so i will wait and see.

Anyone know what rule structure i can use to take virtual average all device temp then send it as settemperature on a virtual thermostat?


Not quite...
Every event forces a query of all sensors status
So. Even the last inactive forces a check on the others.
If a new event is triggered (e.g. a sensor goes active) then the timer should be reset until all sensors report inactive again.



@Cobra - I've just installed your Average All app to average out some house temperature reading and so far so good.
Thx for all your hard work, I'll be getting a donation on its way for you :slight_smile:


@Cobra would it be possible to add back the ability to use a different virtual device other than your one please. Then I can use virtual thermostat for settemperature from your app.


That will be back in when I release a new version today



So after a few days away, I come back refreshed and think I have spotted the issue with Illuminance failing to update after a few days...
We shall see :slight_smile:
I've also re-enabled the ability to use different virtual sensors (so you can use a virtual thermostat for temp if you wish)

New child version 1.5.0