Author Topic: How are you implementing Geofencing into your home automation?  (Read 21597 times)

Offline bucko

  • Hero Member
  • *****
  • Posts: 655
  • Karma: +27/-9
Re: How are you implementing Geofencing into your home automation?
« Reply #15 on: March 19, 2014, 08:15:12 pm »
I wanted to give this app a try but it is only for IOS 7. Too bad there.
Vera 3, 40+ Fibaro relays & dimmers, IPUX cams, Elk M1 Gold, M1XEP, M1SP, XVOR, M1RB, Elk124, Monoprice HDMI matrix & 6 zone amp, Denon AVR, Panasonic A8000, BI DV,On Controls

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: How are you implementing Geofencing into your home automation?
« Reply #16 on: March 19, 2014, 09:17:29 pm »
I wanted to give this app a try but it is only for IOS 7. Too bad there.

Whats the reason for not being on iOS 7?  Not judging just curious if it is hardware limitations or if you are jail broken, etc..?  We had a running post going longer ago before it went live in the Apple store and there was no comments from anyone to support a release any earlier than iOS 7.0, so if you have a good reason I will be more than happy to re-evaluate that decision and make it backwards compatible.
I am the developer of iViri.  iViri is available in Apple Store.  Check out its Voice Control and Geofence integration, which causes less battery drain than the other options for locating an iphone.

Offline Ramiii

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Re: How are you implementing Geofencing into your home automation?
« Reply #17 on: March 20, 2014, 05:05:50 am »
I still didn't figure out how to use geofences , i made a HOME geofence , added the virtual switch ID but nothing changes in vera when flip the switch , how is this working ?

Offline shmixx

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: How are you implementing Geofencing into your home automation?
« Reply #18 on: March 20, 2014, 09:12:46 am »
@Ramiii

It's pretty easy, but if you're newer to Vera it probably isn't as obvious. What you need to do is create the Geofence (tap the button to use your current location on bottom), and set the ID of the Virtual Switch you want to control. Off = Away, On = Present. At current version, it only supports toggling the On/Off state of a single virtual switch. jpete is working on enabling further enhancement to launch scenes, combinations, multi-switches, etc. There are some intricacies around it so it's not just a snippet of code and we're up and running. And a note, you don't need to flip the switch in the app, just turn it on once and leave it on. It may take leaving your current geofence for the first time to kick in as well. Some have reported it setting the status pretty quickly after setting up, others have not seen it change until they leave/arrive in the location again.

Thats the basic config which it sounds like you have done. This setup alone doesn't really power anything to happen on your Vera by itself. If you would like to make things happen based of being present/away from the geofence, then you can use different mechanisms inside your Vera to do so. The built in and easiest would be the Automation scene functions. You can build a scene that has a trigger of the Virtual Switch identified in the geofence, to cause something to happen. For example, you can set a scene that turns your thermostat up, turns the porch light on, unlocks the door, and disarms the alarm when the Virtual Switch is set to On. This is the basic Vera scene capability being triggered by the Virtual Switch set in the Geofence.

Another option would be to get more advanced and use something like the PLEG plugin. RichardT has done a fine job of extending the capability of the Vera using the PLEG plugin for all of the Vera community. The plugin is now licensed, but has a free 30 day trial mechanism built in. You can try it without restriction first for the 30 days, and trust me by the end you should see the value in the minimal price he asks for a license. This will allow you to really customize what happens based on those virtual switches from the geofence capability. It's quite powerful. I leverage PLEG to fully automate the thermostats, night time light settings, vacation light settings (appear like we are home), alarm, etc. I've recently told someone I've reached a level of laziness when it comes to switches in my home since I've automated so much and switched over mostly to LED's, I almost don't care to leave a light on for 20 minutes while I go upstairs, and my bedtime scene kicks in on time to turn off the lights automatically.

Take a stab at creating some scenes or PLEG's based off the VS and you will quickly see the value of the geofence capability. It's quite powerful, and quite simple for even novice users to setup.

Offline Ramiii

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Re: How are you implementing Geofencing into your home automation?
« Reply #19 on: March 20, 2014, 09:20:39 am »
@shmixx

Thanks a lot for you reply

My problem here is that changing the status of the geofence switch in iViri doesn't change the virtual switch in vera , I'm using virtual switch in other scenarios in my Vera with PLEG too so i know how it operates , through scenes or PLEG but it's not my problem here .

I made 2 geofences and 2 virtual switches , one for home and one for work , It doesn't matter where am i or what i do the virtual switch stats doesn't change at all. iPhone locater is working fine though .


Offline shmixx

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: How are you implementing Geofencing into your home automation?
« Reply #20 on: March 20, 2014, 09:25:35 am »
@Ramiii

Ahh gotcha, ok, wasn't sure what the exact issue was, that helps.

So if you setup the VS in Vera, take that ID and put it into the Geofence, and turn that geofence On (slider will look green, button to the right) that should be it for configuring the Geofence. The only other piece that might not be so obvious, is you need to enable location services in the Settings section of iOS for iViri. Go to Settings > iViri > Enable locate services. Once you do this, you should then be able to open iViri again and iOS will likely prompt you to enable location services for the app. If you don't get this prompt and/or the location services switch is on in iViri Settings, you may have been prompted already before and selected not to allow location services for the app. In this case, you will need to simply open up Settings > Privacy > Location Service, find iViri in the list, and turn the switch on for location services for the app. This will re-enable the function and allow the Geofence to start working.

Offline Ramiii

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Re: How are you implementing Geofencing into your home automation?
« Reply #21 on: March 20, 2014, 09:32:15 am »
Thanks again

Did all that before , all location services are working , i'll try deleting iViri and reinstalling it again , Geofence used to work before without assigning it to a VS , i used to get the notification but not anymore

Offline shmixx

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: How are you implementing Geofencing into your home automation?
« Reply #22 on: March 20, 2014, 09:35:43 am »
@Ramiii

Have you verified that the Switch is not changing status when leaving/arriving in the locations? If you are missing the notifications, there is also a switch in iViri settings for Geofence notifications. If this is not turned on, you won't get a local notification that anything has happened. Just not sure if you are saying it's not working due to the lack of local notifications, or if the switches themselves are not actually changing.

Removing apps and then re-installing always tends to fix a lot of things. Just like most PC's, 99% of problems solved by restarting. :) If you happened to test this as a Beta tester, I would also note I had some funky things happen after I bought the official app too. Removing and re-installing made them disappear, so that would definitely be suggested if you were involved in the beta.

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: How are you implementing Geofencing into your home automation?
« Reply #23 on: March 20, 2014, 09:38:11 am »
@shmixx

Thanks a lot for you reply

My problem here is that changing the status of the geofence switch in iViri doesn't change the virtual switch in vera , I'm using virtual switch in other scenarios in my Vera with PLEG too so i know how it operates , through scenes or PLEG but it's not my problem here .

I made 2 geofences and 2 virtual switches , one for home and one for work , It doesn't matter where am i or what i do the virtual switch stats doesn't change at all. iPhone locater is working fine though .

My basic setup is Geofence name of "HOME", a radius of 250 meters, and my virtual switch device ID that I got from my vera.  Once you save that screen you will see a row on the Geofence view, that row is by default switched off (i.e. button does not equal green).  You need to switch that button on for the row in your geofence you wanted active.  The reason this is there is I figured people would like to be able to disable/arm different geofences depending on what they would be doing that day.  As soon as you switch that on you should be prompted to allow iViri to access your location services.  If you don't, follow what shmixx posted above to make sure iViri's settings are enabled to allow location services and make sure you are not blocking them on the privacy page of your iDevice.  One thing to note, after doing all of this the app must stay open in the background in order for the app to receive region changes.  iOS 7.1 was supposed to have a change that caused the app to be relaunched to detect this region change but as far as I have tested the app must remain open in the background at all times for geofences to work properly.  This means, don't double click the home key and swipe the app off the screen, instead leave it open.  After it is all set you should be able to leave your house and receive a notification that your switch was OK and then when you return home you will get a notification that your switch was OK again.  These messages just help me in knowing that everything was triggered fine, but you can turn them off if they do get too annoying by going into the iViri settings.
I am the developer of iViri.  iViri is available in Apple Store.  Check out its Voice Control and Geofence integration, which causes less battery drain than the other options for locating an iphone.

Offline NewfD90

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: How are you implementing Geofencing into your home automation?
« Reply #24 on: March 20, 2014, 09:39:53 am »
jpete is working on enabling further enhancement to launch scenes, combinations, multi-switches, etc.

Maybe this is what I need.  I've got two geofences - work and home.  I'm using combination switches to trigger scenes based upon night/day and the geofence virtual switch.  What I really need is for the combination switches to be rising edge triggered because what'll happen is if I come home and it's daylight, the "arrive home during daylight" scene triggers (i.e. not much happens).  But after I've been home awhile and it becomes dark, the "arrive home when it's dark" scene will fire even though I've been home for hours.  Hopefully that makes sense.  I suspect PLEG will make this possible, but I haven't looked at it yet (I've just had the Vera unit for a few days).

Offline shmixx

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: How are you implementing Geofencing into your home automation?
« Reply #25 on: March 20, 2014, 09:43:05 am »
@NewfD90

I would absolutely look at PLEG. This is the better answer for programming how these things happen. PLEG can take in a multitude of variables that you specify. It's easy to create 2 different "conditions" (PLEG term) that will evaluate when you come home at night, or come home during the day. It can also have intelligence to only fire Night if Day has not been triggered, etc. It's definitely an uphill learning curve when you first jump in, but posting in the PLEG section the good folks on here will help you build out the correct Condition statements. Then it's simply a matter of programming the actions to take affect when the condition is met.

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: How are you implementing Geofencing into your home automation?
« Reply #26 on: March 20, 2014, 09:46:27 am »
jpete is working on enabling further enhancement to launch scenes, combinations, multi-switches, etc.

Maybe this is what I need.  I've got two geofences - work and home.  I'm using combination switches to trigger scenes based upon night/day and the geofence virtual switch.  What I really need is for the combination switches to be rising edge triggered because what'll happen is if I come home and it's daylight, the "arrive home during daylight" scene triggers (i.e. not much happens).  But after I've been home awhile and it becomes dark, the "arrive home when it's dark" scene will fire even though I've been home for hours.  Hopefully that makes sense.  I suspect PLEG will make this possible, but I haven't looked at it yet (I've just had the Vera unit for a few days).

Right now for the v1.2 release I am looking at supporting the Multi-Switch plugin in conjunction with the Virtual Switch, would it benefit anyone if it supported disabling or enabling a PLEG device?  The way you are using your stuff is exactly how I am using it and with PLEG I don't have any of the issues that you are having with the day/night happening, if you want to PM me I could send you my PLEG for this.
I am the developer of iViri.  iViri is available in Apple Store.  Check out its Voice Control and Geofence integration, which causes less battery drain than the other options for locating an iphone.

Offline Ramiii

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-0
Re: How are you implementing Geofencing into your home automation?
« Reply #27 on: March 20, 2014, 09:48:37 am »
@shmixx @jpete7683

I deleted the app and reinstalled it and now i'm back again to the crashing problem . Apps doesn't even run .

I'm on iPhone 5S , 7.1 iOS . i have no idea what's wrong here



Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: How are you implementing Geofencing into your home automation?
« Reply #28 on: March 20, 2014, 09:49:18 am »
@shmixx @jpete7683

I deleted the app and reinstalled it and now i'm back again to the crashing problem . Apps doesn't even run .

I'm on iPhone 5S , 7.1 iOS . i have no idea what's wrong here

Are you on your home network?
I am the developer of iViri.  iViri is available in Apple Store.  Check out its Voice Control and Geofence integration, which causes less battery drain than the other options for locating an iphone.

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: How are you implementing Geofencing into your home automation?
« Reply #29 on: March 20, 2014, 09:52:46 am »
@shmixx @jpete7683

I deleted the app and reinstalled it and now i'm back again to the crashing problem . Apps doesn't even run .

I'm on iPhone 5S , 7.1 iOS . i have no idea what's wrong here

Actually, I am guessing what has happened here, is when you deleted the app and went and reinstalled the app it pull from iCloud, which probably had version 1.0 saved up.  Can you kill off the iViri app and and re-open your app store and go to updates to see if you can refresh that and get v1.1 downloaded to update?
I am the developer of iViri.  iViri is available in Apple Store.  Check out its Voice Control and Geofence integration, which causes less battery drain than the other options for locating an iphone.