Veraplus Switching to Home Mode from Nightmode

Hi,

I am testing my new veraplus and have few devices set up. I have set up vera android app to trigger home mode using geofence and night mode needs to be set manually. When I come home geofence sets home mode and it works perfect. But sometime when I set the mode to night mode after a while it changes to home mode by itself. Looks like the geofence is setting the mode again. Anyone have same issues or care to explain the log below?

08 08/28/17 21:22:09.126 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: SetGeoFence <0x73c24520>
08 08/28/17 21:22:09.126 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1 <0x73c24520>
08 08/28/17 21:22:09.126 JobHandler_LuaUPnP::HandleActionRequest argument action=SetGeoFence <0x73c24520>
08 08/28/17 21:22:09.126 JobHandler_LuaUPnP::HandleActionRequest argument userId=2026311 <0x73c24520>
08 08/28/17 21:22:09.127 JobHandler_LuaUPnP::HandleActionRequest argument event=Enter <0x73c24520>
08 08/28/17 21:22:09.127 JobHandler_LuaUPnP::HandleActionRequest argument deviceId=50105422 <0x73c24520>
08 08/28/17 21:22:09.127 JobHandler_LuaUPnP::HandleActionRequest argument GeofenceId=2 <0x73c24520>
07 08/28/17 21:22:09.127 JobHandler_LuaUPnP::SetGeofence user: 2026311 isenter 1 id 2 device 50105422 ishome 1 <0x73c24520>
07 08/28/17 21:22:09.127 JobHandler_LuaUPnP::SetGeofence user: 2026311 at home <0x73c24520>
08 08/28/17 21:22:09.128 JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: SetHouseMode <0x73c24520>
08 08/28/17 21:22:09.128 JobHandler_LuaUPnP::HandleActionRequest argument Mode=1 <0x73c24520>

Check the accuracy of GPS in your phone. and try to increase the radius of your Home Zone.
Most GPS have tendency to “wander” around their physical locations - usually within few meters but if conditions are less than ideal (open sky, GPS antenna directed to south) there might be “jumps” of location by hundreds of meters. Even tourist GPSes can “jump” momentarily quite far in deep forest or valley.

I set home zone radius for 400m and still it happens from time to time that my phone GPS “wanders” out of this area. And I have plain meadow around, the only problem is the house roof.

I have had bad luck with geofencing so I am using iPhone Locator. I also use PLEG to set Night Mode at 9:30 pm and Home Mode at 5:30 am. If we are away, it delays Night Mode until one of us are home. Home, Away, and Night Modes are also ignored when in Vacation Mode.

Occasionally I have the same issue.
We are 2 users (Iphone and Android).
Sometimes the home mode is activated via Geofence during the night (while both of us are home).

Is there any way to see which of these devices is the problem (scene, script, etc)?
What will happen in the following scenario:

  1. Both users are within the Geofence while Activating Night mode
  2. One phone think it’s outside the geofence and then realize that it is back home again.

Will this trigger the problem with activating Home mode?
Otherwise, what will trigger Home mode during the night?

[quote=“paros, post:4, topic:197049”]What will happen in the following scenario:

  1. Both users are within the Geofence while Activating Night mode
  2. One phone think it’s outside the geofence and then realize that it is back home again.[/quote]

The geofence logic in Vera is simple, there are two rules:

  1. If at least one of the users enter home location, switch Home mode
  2. If all users leave home location, switch to Away mode.

The second rule doesn’t matter since according to the description at least one phone is still within the geofence range.
Now the question is: is Vera smart enough to check if, when one of the users enters the location, any other user is already there (and do nothing if that condition is true)?
I didn’t perform such check and can’t do it for at least couple of days.

For me this basic scenario is not enough anyway, so I consider setting some rules using scenes and House Mode plugin (it is possible from mobile app on the phone where geofences are set).
I would like, for example switch from Night to Home mode if one user leaves location in the morning and other one stays at home; or turn on specific devices if certain location is reached and certain house mode is set; etc.

I am considering what changes I will be making to my scenarios for home,away,night as well.

Currently, the geofence on my Andriod (Samsung GS5) and the Wife’s iOS (Newest iPhone thing) actually works very well. The geofence is set upwith about a 90 YD radius and offset where the house is not quite the center of it so that if we are on our road at all, we are in the circle. The house will switch from away to home if either of us enter the zone and will stay in home mode until both of us are out of it. We have had no noticed false positives or negatives. I have never had it switch from night on me due to geofence.

What I am looking at doing though is instead of telling it to automatically make the switch in mode due to geofence trip, is to flip virtual switches for each person as home or away and run things through PLEG (once I figure out PLEG). This will allow me to hook up a physical switch to trigger another virtual “at home” switch for when my parents are in town. putting the Vera app in their phones and setting up the configuration is a non-starter. It also means that I will only have to mess with the wife’s phone one more time to set up the switch on and off on geofence…instead of having to say “Hey, I’m changing how things act again, can I see your phone for a minute?”. Her phone and geofence will just act on that switch and I can program in Vera to respond to it any way I want. I already built the one for me and have set notifications on the virtual switch on/off to send me a notification and it has been working flawlessly.

As for coming out of night mode. Right now if Vera is in night mode and if the motion sensor in the hall sees movement, and it is between 0500 and 0900 it will turn on the living room side light to 25% and switch to home. If vera is in night mode and it sees motion in that hall at any other time it will leave the house in night mode and turn the same dimmer up to 5%. I am going to be finding a way to change some of this though because sometimes I have to get up and be out the door before 5, sometimes we get to sleep late, but I don’t want it to not respond properly. I am working on moving toward a combination of bed occupancy sensors, motion sensors, and door contacts. I will have to figure out PLEG or find a system other than Vera to do what I want to do at that point. It is just too many if/and things going on for me to keep writing tons of lua that really doesn’t make sense to me.

I can wire up relay logic to do all kinds of things, I am very good with the electrical side of that… Writing code doesn’t make sense to me. I have some very interesting lua that I have copied and pasted pieces from other people to combine into all kinds of cool stuff… but very little of it makes sense to me so I’d be hosed trying to do it on my own. I fear that PLEG seems the same way… I have tried to do a simple thing in PLEG but it tells me there are errors and I cant figure out why.

I use a virtual switch (VS) and a combination switch (CS). Each iPhone is assigned a VS, Person_Home. That VS is displayed in Veramate when true, or on. So at a glance I know if Vera knows if one or both of us are home. When a person is away, the VS is off and does not display in Veramate.

The CS looks at both VSes and when both are off, it turns on and I call it No_One_Home. That CS is also displayed on Veramate. It also triggers Away Mode, and arms Blue Iris. I also use a VS for Blue Iris being armed called Cameras_Armed.

So when both of us are gone, the Person_Home VSes are both off and do not display on Veramate, the CS No_One_Home is on and displayed in Veramate, and VS Cameras Armed is on and displayed in Veramate.

When either one is home, the CS No_One_Home is off, so it does not display, the VS Person_Home is on so it displays, and the cameras are disarmed so the VS Cameras_Armed is turned off and not displayed.

Plus we get notifications using Veraalerts of all that activity.

Eventually I plan on moving this to PLEG but it took me a while to figure this out a couple of years ago and I am not ready to dive into it yet.

I used a virtual switch to turn on when one user is at home and turn off when the user is away. This works in my case and only triggers the scenes only once. If use the vera inbuilt home mode it fires the home mode randomly when one of us is at home (The geofence only alerts me once when I enter the home, but keep on sets the home mode atleast twice in the night when I have already switched to night mode using schedule)