Author Topic: Geofence not activating virtual switch  (Read 2378 times)

Offline atronic

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Geofence not activating virtual switch
« on: April 13, 2014, 04:24:50 pm »
Hi,

I have been trying to use the geofence feature for just over a week now. I get a confirmation on leaving and exiting the set location ("Virtual Switch: OK") but it never toggles the virtual switch when this message is received. It only toggles the virtual switch when I am at home and open the app.

I am using it on an iPhone 5 with latest iOS. Is there anything I can do to diagnose this, or is there maybe something I have setup wrong; the user guide doesn't cover the virtual switch side of things but I think the setup is correct due to the virtual switch being set to on when I open the app.

Thanks,
Atronic

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: Geofence not activating virtual switch
« Reply #1 on: April 14, 2014, 10:26:38 am »
Hi,

I have been trying to use the geofence feature for just over a week now. I get a confirmation on leaving and exiting the set location ("Virtual Switch: OK") but it never toggles the virtual switch when this message is received. It only toggles the virtual switch when I am at home and open the app.

I am using it on an iPhone 5 with latest iOS. Is there anything I can do to diagnose this, or is there maybe something I have setup wrong; the user guide doesn't cover the virtual switch side of things but I think the setup is correct due to the virtual switch being set to on when I open the app.

Thanks,
Atronic

Can you verify you iOS version please?  Knowing the specific version really does matter.  Also in terms of toggling what happens is when you exit a specified geofence it sets the virtual switch to OFF or status of 0.  When you cross the region boundary of that geofence to enter it turns the switch on and leaves it that way until you exit that region again.  Just want to make sure we are on the same page in terms of expected behavior.
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 atronic

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Geofence not activating virtual switch
« Reply #2 on: April 14, 2014, 04:39:16 pm »
iOS version is 7.1.

I have observed the toggle behaviour a couple times,  when I leave the geofence it will sometimes toggle the virtual switch to off but when I re-enter I get a confirmation message but it will not change to the on position until I open the app on my phone...

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: Geofence not activating virtual switch
« Reply #3 on: April 14, 2014, 10:21:36 pm »
iOS version is 7.1.

I have observed the toggle behaviour a couple times,  when I leave the geofence it will sometimes toggle the virtual switch to off but when I re-enter I get a confirmation message but it will not change to the on position until I open the app on my phone...

v1.2 has had a lot of code changed and hardened around the geofence code specially.  It should be getting released in a couple of weeks, let see if you still have the issue after that release.  If you want to test it before the release send me an email at support@instruodev.com with your UDID and register your device on test flight.
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 waltzer11

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-3
Re: Geofence not activating virtual switch
« Reply #4 on: June 05, 2014, 01:13:26 pm »
VS #59 i assigned to my iphone in iviri geofence. after driving 250 meters, VS 59 turns off and all my window/door sensors armed and when i come back, VS59 turned on and all sensors go in "bypass" state.  I created another VS dev #138 and will install in my wife's iphone after i buy another iviri app for her. can someone help me how to incorporate the new VS switch #138 in the luup code below. i am not good in lua code. thanks.

autoscene = luup.variable_get("urn:upnp-org:serviceId:VSwitch1","Status",59)

if(autoscene=="0")then

return true
else
return false
end

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: Geofence not activating virtual switch
« Reply #5 on: June 05, 2014, 02:38:26 pm »
VS #59 i assigned to my iphone in iviri geofence. after driving 250 meters, VS 59 turns off and all my window/door sensors armed and when i come back, VS59 turned on and all sensors go in "bypass" state.  I created another VS dev #138 and will install in my wife's iphone after i buy another iviri app for her. can someone help me how to incorporate the new VS switch #138 in the luup code below. i am not good in lua code. thanks.

autoscene = luup.variable_get("urn:upnp-org:serviceId:VSwitch1","Status",59)

if(autoscene=="0")then

return true
else
return false
end


The easiest thing to use is PLEG.  Reach out on the plugin forum for the PLEG plugin, and use each virtual switch status as a trigger and then you can create conditions that will evaluate both switches and perform an action when the condition is true.
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.