Make a Motion Sensor act like an Occupancy Sensor ?

I admit the subject line of this post may sound a little confusing, but hopefully there is logic to my madness. :slight_smile:

Im curious if there is interest out there in being able to update a motion sensors so that it acts in a similar way to a dimmer - and by that I mean it reports the level of motion being captured, rather than just on and off. - That way the device could work much more like an occupancy type sensor.

So, when I say level I mean - when the Sensor trips and the icon goes red first, but rather than allow itself to return to green instantly if motion is no longer seen, it instead goes to an interim status of orange which tells you motion was seen very recently, e.g not within X seconds from the tripped time, after that it then goes yellow after Y seconds of no motion, and finally it would go green after a predefined amount of time.

(At any point in the proces if motion is seen again, the process resets, starting from red again and in certain situation, you would be ale to work out the route someone took.)

Here is an example of the timing you could set got each level of the occupancy sensor.

00-15 seconds = Red (running) icon
16-30 seconds = Orange (running) icon
31-45 seconds = Yellow (standing) icon
46+ seconds = Green (standing) icon

Would this be a feature that others would find useful too ?

The dimmer reference comes from the fact that the device has 4 status icons associated against it (within its JSON)

"state_icons":[ "Dimmable_Light_0.png", "Dimmable_Light_25.png", "Dimmable_Light_50.png", "Dimmable_Light_100.png"

This is pretty interesting. I can see your icons are on UI5 though.
I may have use for this and can see how this could be coded using the lasttripped variable and adding some code to the startup lua.

Many thanks for responding @radale77 - glad you like it.

Currently all my motion sensors are on my V3 running Ui5 - so I didn?t have anything to screengrab on my VP running UI7

For me, something like this could be a cool enhancement; especially for those of us that spend a lot of time in the UI of our Vera?s - such an instant and simple visual reference showing you how recent motion occurred within a particular zone - would be a nice touch. (The addition of a human readable last Tripped date/time to the device UI, which @akbooer created for me years ago - has been hugely beneficial)

Like you, Ive been thinking how you would do it.

A particular user variable I had in mind would be to have the ability to set the thresholds from red to green, which Vera would then divide into four to work through the countdown colours.

How would you see the code / process flow and do you know how the device icons can be changed - if the underlying device json is not touched ?