*Updated 4/8/2014 - changed state tracking and manual control to MultiSwtich (removing vSwitches & Variable Containers)
There seems to be a lot of interest in Geofencing, and Occupancy tracking so I thought we should have a thread dedicated where everyone can discuss what they do, how it works, and ask questions.
I’ll start with my solution. It works well for me.
I’ve been testing several different methods over the past few months. I think I came to what works best, and seems efficient, given my goals and apps/equipment.
Goals:
Automatically change Home Security mode based on Occupancy and time of day.
Create multiple Security modes for different situations: Vacation, 2 different Guest modes, etc
Each user receives alerts when a home security and occupancy event occurs (someone leaves/returns, security mode changes, etc)
Track date/time of last use for all entrances, by user *not started yet
Solution currently uses…
Vera apps: Ping Sensor, Virtual Switch, MultiSwitch, Vera Alerts, PLEG
Android apps: Wifi, Vera Alerts, Tasker w/ Autohomation integration, NFC ReTag *NFC integration in progress
PLEG devices
Occupancy
watches for changes with Mobile phone Pings & MultiSwitch (mSwitch) … sets mSwitch buttons to track home/away for each person.
set to ‘Home’ immediately based on a manual mSwitch change and/or phone Ping.
set to ‘Away’ using a 3 minute delay for Ping (to overcome potential Wifi inconsistencies) or manual setting of mSwitch (or by Tasker using built-in Network Location, Wifi Near, etc)
both Ping and Tasker are used to ensure a failsafe of sorts.
Security Scenes
Conditions watch for changes with mSwitch which sets Actions in motion
… examples: turns on the security when all person’s ‘Away’; disable security (set to Stay mode) & unlock door (aka Returning mode) when someone returns to an unoccupied house or a locked home
The above does not include the other devices/PLEGs/Automation around in-home or phone-based alerts/sirens, etc.
Tasker + Authomation
Geofencing using ‘Network Location’ works best for me. Low battery use & often much quicker to detect changes vs ‘Near Wifi’ which has built-in delay. For more accuracy you can use GPS but it drains battery much faster.
Tasker Profiles send a trigger to set each person’s mSwitch button to On/Off (eg Home/Away)
VeraAlert
visual & audio phone/tablet notifications for which ever activities needed… I use thing like return/leave for each person, Home security mode changes, etc.
NFC ReTag FREE android app
best I found that is seamless with Tasker. ReTag triggers Tasker actions directly.
NFC stickers *partly complete
at each home entrance, in cars, etc. Triggers Tasker profiles to ensure redundancy in Occupancy & Security mode setting based on activities… leaving home, etc
Im an Android user ( although wife and kids are ios ) so not too much of a driver for me to look more into it, but i was thinking if ibeacons ( or a similar open-source “beacon” solution) was created which would update vera with a users device ( mobile phone/ipod touch ) location then we could have very simple Occupancy detection…
Or…since these BLE chips are low power then perhaps a small “beacon” in a user wristwatch/necklace/wallet and receivers/sensors in each room which then update Vera. Possibly built using the Arduino plugin http://forum.micasaverde.com/index.php/board,55.0.html
As written before in this forum, I really do recommend the Tasker Plugin “AutoLocation” (https://play.google.com/store/apps/details?id=com.joaomgcd.autolocation). I have Geofencing implemented using this in combination with a virtual switch since quite a while and the reliability and precision of this setup amazes (sometimes event frightens) me honestly…
Thanks for opening this Aaron - I know there are other spin off’s but an up to date thread is always of use.
I had previously set up a crude but working version using virtual switches and ping sensors. same idea as most. ping detection starts a time, and continues to restart it. start turned on a v-switch. an ‘on’ v-switch was a trigger for scenes as was an ‘off’ v-switch. the ‘off’ v-switch happened when timer completed. timer was of a duration long enough to support occasional drop outs.
I have since removed a lot of my plugins in an attempt to make my system more responsive through creating more space for ram by removing plugins. PLEG has been my saviour!
I now have a ping sensor and PLEG with a similar set up (so x2 not x4 plugins) to above in that it monitors last door trip, last ping, suitable times, etc. etc. to sort a logic that allows for things to do as we are hoping here. this is however not ideal overall and I like the idea of adding other variables to perhaps gain a wider commitment of location. e.g wifi and Bluetooth or similar other combination.
@Chixxie
thank you for sharing this I had not seen your other posts on this. I have read up on this and it looks really good - I will be trying it for sure. I too am interested to know what it is like on battery consumption? but to be fair my best action is to give it a try and see how I get on and I think I will do just that.
@Aaron
I like your idea of ‘Network Location’ in Tasker but @Chixxie’s solution seems a little more suited given its newer uses - I guess the proof is in the testing… I will be certain to give these a go. Out of interest I see you use vContainer and just wanted to ask if I am missing something as I haver only discovered this since you mention it. I understand that it would be used to capture variables so thus being able to perhaps eradicate v-switches for example - but as such could you then not remove your v-switch and just use vContainer or even remove both and use PLEG? just interested to see as I can see its benefit for sure but just interested in if you could group some of your ideas into less plugins and thus improve your system?
I have tried to implement some presence in my system. I would e.g. like our lamppost in the yard to automatically switch on when we are arriving home and the house to turn on the Away!"-mode (all lights off, door locked and appliances turned off) when both me and the wife is leaving.
I think occupancy tracking is one of the really cool things with a smart home! It makes the home seems “intelligent” and could really have an impact on daily comfort.
The iPhoneLocator app works somehow but I can not get it to update fast enough without draining the battery. I had some ideas about using my wall mounted Nexus 7 tablets together with Tasker and AutoVera. When our iPhones automatically connected or disconnected using bluetooth to the Nexus it sent a signal using Tasker to switch on a virtual switch on the Vera, triggering the scene.
I think I should be able to remove this clumsy setup using the Ping Sensor app. Wifi have better range compared to bluetooth and the ideal scenario would be to have the door locks and lights starting when walking towards the house.
Just a question, how do you guys think about using several inputs to decide presence?
I assume it would be optimal nopt having to rely on just on “sensor” (e.g. wifi connection) in case of reboots and technical malfunction. I can live wioth a lamp that is not switched on automatic, but I do not want the entire house to go in lock-down mode just because the bluetooth connection is lost or the phone runs out of battery! How could one make a PLEG with redundancy?
I have seen the AutoLocation plugin for Tasker before, but never used it. I installed it yesterday and will let you guys know what I find vs just using Tasker’s Network Location.
@LightsOn…
Using PLEG, eliminating vContainer
It is possible becomes makes things more complicated, less visible, and harder to track/troubleshoot.
vContainer holds ‘states’ and makes them available to multiple PLEGs, Scenes, etc. It also makes them always visible to you/others. I’m hoping Authomation supports widgets soon (Garrett, pretty please) and then that vContainer then becomes a ‘Status Panel’ on my android desktop. I want to use MultiSwitch instead since it functions like a physical ‘Control Panel’ and has more options - but first, Authomation would need to support the functionality and widget for it, it does not
Using PLEG, eliminating vSwitch and/or just using vContainer to hold states
The vSwitch makes it easy to manually set Occupancy and Security Mode (Away, Secure, Sleep, Vacation, Guests, etc). It is something of a fall back in case the automation scenes do not work for some reason… and again, all these vSwitches become a visual, and usable, control panel in Authomation.
… I played with different versions of the above and did try to eliminate vSwitches & vContainers… it just caused problems with too much PLEG complexity, timing issues in PLEG/Vera, etc. the ONE thing I really want is to move from vSwitches & vContainers to MultiSwitches - as it would combine the functionality of both - and add the bonus of having radio button functionality at the device level. BUT again, I rely on Authomation and it does not support MultiSwitch at all.
@n0ir
If you read my post, you’ll see I have two factor method of occupancy detection… Wifi Ping & Tasker Network Location - and a fall back to being able to set it manually with a single button push (Virtual Switch for each user’s Occupancy, and each house Security Mode)
[quote=“jimpapa”]The trick (for me anyways) is to use a schedule and the Ping sensor to MUTE the iPhone locator so you don’t kill your battery when you know that at a certain time of day your at work anyways… etc.
I’d like to see the Bluetooth beacons work with vera… so you can go room to room and have scene ran that way,[/quote]
Yeah, I tried this and it worked better but I still reach Googles limit on polls. :S
iBeacons would be really nice! I have been interested in trying NFC and RDIF but the BLE technology seems better in all regards.
This is no scientific statement, but I would say that the vContainer and the vSwitch basically do basically not need any resources. They both basically do nothing but holding a little information. So no logic running or anything at all. I also think the memory footprint is very small for these two plugins. However, I never did any measurements or comparisons to prove this.
The AutoLocation Plugin for Tasker is where I have landed after using all kind of possibilities in Tasker (like Wifi, Cell Networks, GPS…). I only have two geofences setup, work and home. At home it does noting more than just setting a vSwitch, the rest of the logic is done by PLEG. I also use the “Activity Monitor” to turn on bluetooth automatically when I am in my Audi. The way it is setup is that the Activity Monitor is only running when I am not within a Geofence (cause when I am at home I don’t need to monitor if I am in a car). While I am at work the geofence service is also turned of (precision goes down), once I leave work the monitor is turned on.
With this setup my Nexus 5 says AutoLocation is using 3% of my battery according to the Android built in battery monitor. And as already mentioned, I am very happy with this solution. It is not simple to setup (if you want to save battery), but it’s well worth giving it a try.
Let me know if you need further description of tasker profiles/scenes/tasks…
[quote=“RichardTSchaefer, post:11, topic:178980”]All controlling plugins (i.e. No parent) have a significant memory footprint … They each get two stacks and a LUA context.
This includes vContainer and vSwitch .[/quote]
One more reason for wanting to replace these two with a single one… MultiSwitch
But I need Authomation to support it before I can.
btw… when PLEG sets a MultiSwitch setting, does the MS still follow the embedded radio button rules the user sets?
I think its fair to say then however a solution is compiled the less instances of a plugin or reduced numbers of plugins as a whole is a good thing to ensure maximum system effectiveness. It not to say plugins should not be used - that would be crazy, but I think fair to say it is well worth while spending time working out how things can be improved upon to reduce system impact via smarter use of plugins. One thing I have certainly learned it that there is often many many ways to achieve the same outcome. all good stuff.
Regarding battery monitoring of the AutoLocation / Tasker app I have installed “GSam Battery Monitor” and helps me identify usage - so far with some initial playing with it the usage seems low.
@Chixxi
Thank you again for sharing the AutoLocation idea. My initial tests seem to work well. I set basic geolocations and then set a task to put my phone to silent when I entered them. my geofence was small so it was precise and I expected errors - but the opposite. It worked out of the box almost instantly… I was quietly quite impressed as I think you stated you have been. I can of course later change from a phone task to a vera task that is no bother. I was interested however to know what else you set up in the app? I literally only set a geofence, named it, created a task based on being in it or out of it. are you using ‘location’ and ‘activities’ also? do you have a wider geofence and then a smaller one inside so you have an increased / accurate (and thus more battery hungry) detection? [and then of course a less battery hungry and less accurate set up out side of those geofences?]
I shall play with this some more but all in all I can see why this can be considered at the top of the list as a solution thus far.
I installed AutoLocation and was surprised to find out not only does it require an upfront purchase, but also a monthly fee. We cannot even test it without paying the monthly fee. Yes, it is only $1/month but who’s to say that does not change. I’m not sure I need anything better than Tasker’s Network Location… it is accurate within about 300’ of my home. I have 2 phones that would possibly benefit from it but not sre I really need it - not that $24/year is a lot just not sure it is necessary
I am happy to be wrong but I understood you can use it free as per on the FAQ:
Why does the AutoLocation free 7 day trial put me in a subscription?
Unfortunately there?s no other official way of creating a free trial on Google Play. The only way I can unlock the app for free for a certain period of time is by creating a subscription with that free trial. Be sure to unsubscribe before the 7 days are up!
and then can purchase it for permanent use for ?0.87 - I just downloaded the app and bought a permanent unlock immediately and I see no expiration date or rolling agreement? happy to be wrong? am I? I expected I now have the app - always, with no further charges?
do you use authomation and tasker? if so could you share your profile setting for working with a vswitch as I have what I believe should work… but it isn’t lol.
If you use another method could you share the basics?
Just need the tasker stuff. I was working with Homebuddy but that only does scenes and seems silly to have 2 scenes and 1 switch when authomation apparently can switch the v switch with out the need for scenes.
I just purchases AutoLocation… it did not trigger. I set the radius of the fence to be 300 feet from my home. Any suggestions? regular Tasker Network Location worked approx 300-400’ away … this should work better, yes?