Home Mode state change unexplained

Vera Plus with firmware 1.7.4970
IphoneLocator - 2.52
Lobo - 19260
Story set up:
I have a reactor (Home Away Reactor) that shuts down part of my home power when MyMode change from Home to any (I only use Home and Away) and powers back up whenever home mode changes from any to Home. Has been working well for 8 or 9 months.
Nothing should be changing the state of MyHome Mode except me manually pushing the UI or mobile app buttons from home to away and back again. Neither my phone nor my wifes is using the Vera geofence on the mobile app.
I have a reactor that opens the garage door when plugin Lobo detects that my phone enters the 500m fence OR if plugin IPhoneLocator detects my phone enters the 500m fence. I am testing both Lobo and IPhoneLocator together to see how they behave in relationship to each other.
Yesterday (7/19/2020) my phone had not left my home for about 36 hours. And neither Lobo nor IPhoneLocator should modify MyHome modes
The scenario:
23:04:30 both IPhoneLocator and Lobo independently detected that my phone entered the 500m fence. I was in bed asleep. Odd that they both detected at the exact same second since they are usually minutes apart.
23:04:31 Home Away Reactor noted that MyMode changed from any to Home.
23:05:08 Home Away Reactor noted that MyMode changed from Home to any.
So after this, I wake up in the middle of the night to power off in parts of the house, the garage door open, and lights on in the house(because I have another reactor that turns lights on if the garage door is open after dark).
This has happened the prior two nights. I can’t identify anything that has changedin the past few days.
I believe that the reactors, Lobo and IPhoneLocator are all working as expected. What I am asking is for help to debug what is the underlying event that started this sequence.

  1. At some point just prior to 23:04:30 something in the system registered my phone as being not in the fence so that when both Lobo and IPhoneLocator polled at 23:04:30 they both tripped and stated the phone entered the fence. How do I figure out why the phone was thought to be not in the fence just prior to this? It has been in the fence for at least 36 hours prior.
  2. Why is MyModes changing at all. I do not believe that Lobo or IphoneLocator are changing the modes( I can confirm in Lobo that the check box is unchecked) but how do I validate this theory.
    And prior to 23:04:30 why was the MyModes set to something other than Home( I have not changed the state in weeks)? And then why at 23:05:08 did it change again to something other than Home?

Tagging @rigpapa and @amg0 for their expertise on the various plugins. Thanks for everyone’s help in advance.
Tim

When it happens, pull the Logic Summary (Tools tab Troubleshooting section) for your ReactorSensor. That will tell you which device triggered the ReactorSensor.

Lobo will manipulate the house mode if you have its “Have Lobo set the house mode according to the “My Modes” geofencing settings (see Vera UI Dashboard)” checkbox checked. Make sure it is unchecked.

And you need to check the “Set house mode to HOME when at least one user is at home” setting in “My Modes”, because even if Lobo’s checkbox is off, the My Modes box being on may make Vera do mysterious things even though you are not using Vera’s geofence.

There are times, usually weather dependent, where the iCloud location sent to iPhone Locator (latitude and longitude) is not accurate. Sometimes mine or my wife’s iPhone will wander to the next subdivision to the east, triggering the device to be away. With iPhone Locator pinging the phones every 5 minutes, the phone will “return” within 5 minutes. It seems to be one phone at a time, but sometimes both will wander, setting the Away functions.

Similarly, mine and my wife’s phone while we are at work (we work about 1.5 to 2 miles miles from the house), will sometimes “arrive” at home, only to be away again in 5 minutes. I usually get a text from my wife “hey, did you just go home?”.

No real pattern that I can see, except when there is a pop up thunderstorm that may interfere with the satellite signal for the GPS. They can be fine for weeks, and then in an afternoon, my or my wife’s phone would go home, away, home, away, home, and away within about 30 minutes - but not normally both at the same time.

Very strange - but not typically Vera related.

1 Like

To @phillid2, thanks for the observation. How did you solve this problem? We have had clear nights during these occurrences so I am hoping this is not it. I would not have thought of that behavior. I live in Colorado where summer evening storms are the rule so I pray this is not the problem.

For @rigpapa, thanks. I checked the Logic Summary. It showed the House Mode change from any to Home and then Home to any at the times listed above. I still can’t answer the questions - "why was the house mode in some other state than Home originally, then what caused to flip for 37 second. The reactor, I am happy to say did exactly what it was supposed to. I can post or email you the Logic Summary if you think it will help.

In the Lobo Configuration page the check box for having Lobo adjust the House modes has always been unchecked. I am testing Lobo general stability before allowing to change the Home Mode which I ultimately want it to do.
In the Vera UI under the MyModes section at the bottom the page are two check boxes for geofencing. Although I do not have any geofences set up on my wife’s or my phone, I have now unchecked(I think you meant to tell me to uncheck them) those boxes just to remove any mysterious effects of Vera.

For the general community, I own a home automation business and am looking for reliable solutions( why I am testing Lobo and IPhoneLocator together). My typical customer is being sold on “worriless” technology and time savings technology. Neither of which is true if the phone can’t be located accurately all the time. I have spent more time on this “hiccup” than a whole years worth of switching on the front porch lights manually. I can’t have a customer exposed to this.

Tim

Absolutely. Maybe I can spot something helpful in there. You can either post here, or email to the address shown in the Tools tab’s Troubleshooting section.

Email with Logic Summary attachment sent to the address in the instructions.

Unfortunately it looks like a recent Luup reload caused anything interesting the event log to be lost. The best time to get a logic summary as soon as possible after you notice a problem. If it happens again, jump in quick!

In the meanwhile, I’ll share what I’ve learned about geofencing using phones: it’s not going to work reliably, ever. There are many reasons for this. I’ve explained these in other posts here, so I won’t rehash. It basically comes down to this:

  1. Phones don’t just use GPS for location, and in some cases try not to (for power saving) so the location data is inherently not reliable/has poor accuracy and sudden drifts of thousands of meters are not unheard of. This applies to both Apple and Android.
  2. Increasing privacy concerns and the laws implemented by non-technical law-makers are causing phone manufacturers to make continuous location services increasingly difficult to achieve; for some, it’s impossible now. This applies to both Apple and Android.
  3. Android device manufacturers can customize the OS, and do. Generally, their customization is to maximize battery life, and that immediately and directly impacts location services and background applications. It requires tedious configuration and attention to detail to get it work, and on some devices, like some recent Huawei phones, there’s just no way to do it.

My feeling is that presence detection has to be done through a series of multi-factor tests, and machine learning is applicable here. But it is a leap in problem complexity to get from “anyone is home” to “this particular person is home”. Most of this implies infrastructure support locally (e.g. BLE, sensors, etc.) so without reliable location services, it becomes a galactic leap to determine “this person is at [arbitrary user-configurable location]” (where sensors may not be available).

In other words, at least for current Vera, what you’re getting is about as good as it gets.

Also, please keep in mind that Lobo is an experiment, and currently that experiment does not justify its own existence: it costs me about $100/month to keep the service up and running, and nobody is paying me for it. There is a chance it will become a business, but I’ve not made that choice yet, and so I would caution you that there is an equal chance I will just shut it down and move on to other problems I can do a better job with.

Have you considered a simple ping me at home using your LAN as a reference point. I point blank refuse to use a cloud based locator to track my device. If it’s just your presence in the home or not for automation purposes this would seem to be a solution.

To @rigpapa, yes my Luup engine reloads constantly(roughly every 5 minutes). I have asked Vera support to look at it but no resolution yet. So what I will have to do is capture the Logic Summary in the middle of the night when it happens and pray I am quick enough.
Your discussion on using iphone for location helps with item 2 below and is unfortunate. One of the best features of home automation is “lighting” up the home as residents approach - lights, temperature, garage door, etc. All of those things need fairly granular resolution to detect at the proper time but certainly can’t happen “spontaneously” in the middle of the night.

I think trying to detect if someone/anyone is at home is a different (but equally important) problem than trying to determine if no one is at home but someone is approaching. I have a whole different reactor working to validate the “wasp in a box” problem that eventually may include AI. The “is someone at home” problem could benefit from the LAN ping approach suggested by @peterxbmc but I don’t think it will help the “is someone approaching” problem.

I am testing Lobo for you and owe you some of my early findings which I will send you privately.

I don’t want to loose track of my original problem which is four fold -

  1. My Home Mode was NOT Home which should not have been the case for weeks since nothing should be impacting it other than my manually changing it. Then it decides to flip for 37 seconds in the middle of the night. Again, Vera, why did it change if nothing can change it but me.
  2. Why did my phone suddenly appear inside my fence when it had been there for 36 hours.
  3. Both I and 2 seem unrelated except that they happened within a second of each other. If they do relate, then how.
  4. All of these things happened two nights in a row. Why?

Tim

The “is someone approaching” could well be covered with the LAN approach depending on the broadcast range of your router. I’m assuming we are talking about the “someones” being family, friends etc who would be part of your WiFi network.

From what you say it looks like a possible outage on the GPS transponder followed by resumption of service giving outside the fence then inside the fence without any physical movement.

The level of reliability you are looking for, 100% I imagine could only come from military grade GPS. Personally I wouldn’t entrust any mission critical tasks to a setup like that.

You could have a second flag, say a virtual sensor that would provide validation along with the GPS signal to confirm movement to or from the property which would eliminate false positives.

Again I’m just thinking out loud here.

1 Like

I thought of the GPS transponder outage or even my phone blinking for a few seconds - it is an older iphone. If that is the case I can combine the GPS knowledge with other sensor logic to help stabilize that.
I have fencing set up with both IPhoneLocator and Lobo set at 500m and that is about perfect. As I make the last turn onto my street I see the garage door open. I am sure my router does not have a greater than 500m range (at least I hope it doesn’t.)
All that said, none of this explains why my Home Mode is not always Home, why it changed and how that relates to the phone location.

I have not resolved it, just live with it. Only happens about once a month most of the time. When it does happen it is a few times that one day, then it settles down.

It seemed to be more prevalent when we both had iPhone 6’s. She got an XR in December and me one in April. It seems better with the new phones. Even streaming the radio or music through the wi-fi as I leave the house, and then switching to 5G is seamless compared to the 6.

And the newer OS with an updated Carplay allows GPS, calendar, and radio/music to all three be seen on the car screen - a vast improvement over 1 thing at a time.

I have wondered how much our(wife and I) 6s iphones are related to things like this. Although our phones should have nothing to do with the Home/Away house mode. That should all be disconnected. My phone uses Lobo and IPhoneLocator for location detection only.