Author Topic: iViri not updating Vera when I leave the iBeacon area  (Read 1623 times)

Offline CraigO

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
iViri not updating Vera when I leave the iBeacon area
« on: June 06, 2014, 02:24:27 pm »
I just got my Estimote iBeacons today and am working on getting them setup. I successfully used their app to get the UUID/Major/Minor versions and put those in iViri. I have iViri linked to a multiswitch in Vera and it will successfully turn on the switches when I'm in range of the iBeacons. (Thanks for the quick how-to in a different thread Jarod.)

However; when I move out of range of the iBeacons the switch doesn't get turned off. I've looked in the LuaUPnP.log file and I see the command coming in to turn the switch on. It actually shows the ON command coming in three times in about 0.6 seconds. But it doesn't show anything for when I leave the area.

Any ideas on how to troubleshoot this?

Thanks,
Craig


Offline CraigO

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
Re: iViri not updating Vera when I leave the iBeacon area
« Reply #1 on: June 06, 2014, 06:51:07 pm »
So after wrapping up my day job I got a chance to troubleshoot this issue more. It turns out the Vera is receiving the Elvis has left the building notification it just takes a long time. It can take anywhere from 3-6 minutes so far.

It also seems to take longer than expected to notice that Elvis is IN the building but that is usually quicker. Vera normally turns on the virtual switch within 30-60 seconds of when I enter the expected range.

I'm guessing that these timing issues are probably more on the Apple/iOS side than iViri or MCV but are there any settings I can tweak to help?

Thanks,
Craig

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: iViri not updating Vera when I leave the iBeacon area
« Reply #2 on: June 08, 2014, 11:41:30 am »
So after wrapping up my day job I got a chance to troubleshoot this issue more. It turns out the Vera is receiving the Elvis has left the building notification it just takes a long time. It can take anywhere from 3-6 minutes so far.

It also seems to take longer than expected to notice that Elvis is IN the building but that is usually quicker. Vera normally turns on the virtual switch within 30-60 seconds of when I enter the expected range.

I'm guessing that these timing issues are probably more on the Apple/iOS side than iViri or MCV but are there any settings I can tweak to help?

Thanks,
Craig

So a couple of things you can look at.  First make sure you don't have your ibeacons broadcasting at a large range.  The most I ever set mine to is 12ft.  Secondly there is a difference between entering and exiting in apple iOS call backs.  When you enter it should be relatively immediate (give or take a couple of seconds especially if the app is open or the phone is awake, if it is asleep it can take longer but that is apples design).  When you exit a region and if you are still connected to the wifi apple waits a minimum of 20 seconds before it triggers the call back that it has exited.  This was their way to get rid of false exits and readings.  So for troubleshooting, use the ibeacon app to measure how far you have to walk away before you are no longer in contact, make sure you still have a wifi or 3g/4g connection at that spot and adjust it through their app if needed.  I also use 50ms so that it is sending signals often.  Once you have that setup you should see it work good.  The other thing you could do is not care about the exit's and have PLEG switch off your old switch as soon as you come into contact with another beacon.  This would work great with a smaller are where you are moving from place to place!
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 CraigO

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
Re: iViri not updating Vera when I leave the iBeacon area
« Reply #3 on: June 08, 2014, 06:55:52 pm »
Thanks for the tips. I definitely need to play with the signal strength. Have you noticed different detection ranges with different phones? In limited testing my phone seems to be more sensitive than the wifes. They are both iPhone 4S's.

Now I have a new issue. On both phones the iViri app stopped working. Closing all other apps and even rebooting the phone doesn't help. On my phone I removed it and re-downloaded it and it started working again. But only for a few hours. Both of them show the splash screen of the house with the lock in it, pause for ~30 seconds then back to the phone screen.

And not sure if it's related but the Vera Mobile app is now doing the same thing. We've both been using that for a few months with no issues so it seems probable that they're linked.

I have no idea how iPhone apps work as I'm a Windows guy. But are there such things as shared DLLs that might be conflicting between the two? Or some conflict where they are both trying to contact my Vera device at the same time?

My iPhone is running 7.0.6, iViri 1.3.1 and Vera Mobile 1.3.

Just now as I was checking the version I noticed in the main Settings app on the phone you can change the page iViri is trying to open. I changed mine from Room to Dashboard and now iViri opens. This worked on the wife's phone too. Changed it back to Room just to test and it still opens. Still no luck with Vera Mobile though.

Thanks,
Craig

Offline jpete7683

  • Moderator
  • Sr. Member
  • *****
  • Posts: 363
  • Karma: +10/-9
Re: iViri not updating Vera when I leave the iBeacon area
« Reply #4 on: June 08, 2014, 10:42:22 pm »
Thanks for the tips. I definitely need to play with the signal strength. Have you noticed different detection ranges with different phones? In limited testing my phone seems to be more sensitive than the wifes. They are both iPhone 4S's.

Now I have a new issue. On both phones the iViri app stopped working. Closing all other apps and even rebooting the phone doesn't help. On my phone I removed it and re-downloaded it and it started working again. But only for a few hours. Both of them show the splash screen of the house with the lock in it, pause for ~30 seconds then back to the phone screen.

And not sure if it's related but the Vera Mobile app is now doing the same thing. We've both been using that for a few months with no issues so it seems probable that they're linked.

I have no idea how iPhone apps work as I'm a Windows guy. But are there such things as shared DLLs that might be conflicting between the two? Or some conflict where they are both trying to contact my Vera device at the same time?

My iPhone is running 7.0.6, iViri 1.3.1 and Vera Mobile 1.3.

Just now as I was checking the version I noticed in the main Settings app on the phone you can change the page iViri is trying to open. I changed mine from Room to Dashboard and now iViri opens. This worked on the wife's phone too. Changed it back to Room just to test and it still opens. Still no luck with Vera Mobile though.

Thanks,
Craig

Sounds like there is some issues with the iViri code when it comes to dashboard.  I am guessing that something has changed in terms of one of the devices on the dashboard that iViri isn't getting a response back and isn't removing it correctly.  I am rebuilding the data model and how iViri uses it so I would recommend waiting until the next release.  As for issues your seeing with consistency, I would recommend going to iOS 7.1 or greater for your iOS version because apple introduced functionality around geofencing and for that matter beacons when iOS 7.0 came out from how it behaved in iOS 6.  Long story short some angry developers wrote letters to the CEO of Apple and they put the functionality back into iOS 7.1.  It will be more reliable as you won't need to keep iViri running in the background for beacons or geofences to fire as you do with iOS 7.0.
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.