Occupancy Tracking - Motion & Entrance ... any easy way?

I’m slowly developing my Occupancy & Security. I’ve been tracking enter/exit location based on door sensors and using one PLEG Action per tripped sensor… writing the ‘current location’ value to ‘prior location’ (using Variable Container), then the new value to ‘current location’.

This is of course, tedious and had to be setup for each sensor.

I’d really like to do this for both motion sensors and door sensors but I have 20 total and hoping there is an easier way than what I’ve been doing?

thanks for the help

Not sure whether the ‘Wasp in a Box’ algorithm http://forum.micasaverde.com/index.php/topic,13920.msg105059.html#msg105059 helps in the context of a PLEG implementation. Sure is easy enough to do with triggers and scenes.

I suspect you’re building something more sophisticated, though…?

What I have today is pretty basic entry/exit but thinking I may expand that.

My goals:

  1. automatically enable/disable home security modes
  2. track date/time of last use for all entrances

Currently I do a little of each using a combination of a few things:

Vera app ‘Ping Sensor’ + Tasker + NFC

NFC ReTag FREE app - best I found which works seamlessly with Tasker
Tasker - ‘Network Location’ works best. Low battery use & often much quicker to detect changes vs ‘Near Wifi’ which has built-in delay

NFC stickers at each entrance & in each car. Will trigger Tasker profile to send Home/Away to trigger Vera ‘Virtual Switch’ for each person.

Tasker + VeraAlert to pop-up notifications for each user letting the other know someone is arriving/leaving home or Home security mode changes.

2 PLEGs

  • Occupancy : detects vSwitch changes and sets Vera ‘Variable Container’ text to track people & modes.
  • Security Scenes : watches Occupancy and automatically triggers Events; locks up the home, and turns on the security when both users are ‘Away’ - working pretty well so far.
    … I used to have this all in one PLEG but there were problems with some things not getting triggered. Thus, I separated all Actions between one that only set text in a variable, and then used those variable changes to trigger real actions/scenes (changes in the system)

I will add more soon. Would love to get your input if there is anything you see could be easier.