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 ), so thanks!
Hey!
Don’t thank me until you’ve tested it
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
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
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.
I was a bit vague because I wasn't sure. 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)
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.
The update fixed it for me. Glad I wasn't totally crazy! 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...)
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.
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
@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.
OK.
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
I've also re-enabled the ability to use different virtual sensors (so you can use a virtual thermostat for temp if you wish)