Problems with Geofencing setup in Blueiris 5

jbahlman

n3wb
Joined
Jan 14, 2019
Messages
11
Reaction score
1
Location
United States
I am hoping someone can help me figure out my issues gettting geofencing setup. Sometime around the 1st of the year i upgraded to Blueiris 5, and i have had some issues with the program crashing, so i really didn't try and get the geocaching to work at that time. I had geofencing working in V4 but it didn't work when i upgraded. I tried to follow the steps i found online, but i never got it working correctly.

Let me explain my setup and hopefully i am missing something that is easy to fix.

I currently have 4 cameras and what i am trying to do is 2 record all the time and the other 2 only record when i am away from home. I have 2 profiles that i am using, "In House" and "Out of House"

My phone is setup for geofencing and it shows the location as Inside under Mobile devices.
When it enters Geofence, i have it set to "set profile" to "Run" the "In House" Profile.

When it exits Geofence, i have it set to "set profile" to "Run" the Out of House" Profile.

I am confused what i should do for Schedule, since 90% of the time i want it set to In House. I have tried enabling the schedule and filling it in with in House, but it will never switch to out of house. So currently i have enable schedule unchecked. Once i did that, it switches to Active as the profile.

I reset the geofencing stuff in the APP (i am using android) and when i set it, i get the notification that i am inside, but the profile stays on 1 Active.

I have read the help file and i believe i have followed the steps to set it up correctly.

Any help is appreciated.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Based on this <link>, this is a summary of what I think is going on...
1. Android‘s LocationMonitor tracks geofence objects for all geofence-using apps.
2. When a geofence change is triggered, Android
a) issues a notification AND
b) issues an intent to the appropriate app.
3. The app responds to the intent.

I‘ve not confirmed this with BI support, but believe that at #3 the BI app sends the new geofence status to the server using the JSON commands discussed in this thread...

My experience is that while 2a almost always happens, 3 happens very inconsistently, especially if the BI app is not currently in focus. This is in spite of requesting Android not to put the BI app to sleep... (BTW, I’ve found I can improve the consistency by having the BI app open on my device while moving across the geofence boundary).

I’ve given up and now issue the JSON geofence commands myself using Tasker, triggering off of home WiFi near status and car bluetooth connects/disconnects.
 
Last edited:

jbahlman

n3wb
Joined
Jan 14, 2019
Messages
11
Reaction score
1
Location
United States
Based on this <link>, this is a summary of what I think is going on...
1. Android‘s LocationMonitor tracks geofence objects for all geofence-using apps.
2. When a geofence change is triggered, Android
a) issues a notification AND
b) issues an intent to the appropriate app.
3. The app responds to the intent.

I‘ve not confirmed this with BI support, but believe that at #3 the BI app sends the new geofence status to the server using the JSON commands discussed in the this thread...

My experience is that while 2a almost always happens, 3 happens very inconsistently, especially if the BI app is not currently in focus. This is in spite of requesting Android not to put the BI app to sleep... (BTW, I’ve found I can improve the consistency by having the BI app open on my device while moving across the geofence boundary).

I’ve given up and now issue the JSON geofence commands myself using Tasker, triggering off of home WiFi near status and car bluetooth connects/disconnects.
I understand the part about whether or not the app does its part, and i have to work through that (I didn't have any problems with v4 of Blue Iris). But my problem is that Blue Iris says my phone is switching from Outside to Inside, but the profile isn't changing.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
If the app is communicating the change, maybe it is your event configuration.
Can you provide a screenshot of these dialogs?

1597166203962.png 1597166235583.png
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Ok. These look fine.

Before inquiring about your schedule settings, let’s check these 2 things...

1. Make sure there are no profile- or schedule-related ‘OnChange‘ actions executing when profiles change.
1597191800400.jpeg

2. Check the log for expected profile changes (or the lack of) after a geofence event, e.g.,
1597189732999.jpeg

The log will show a profile event only if there is a change.
If some other actions (like #1) are also changing/toggling the profile, you may see multiple entries.
 
Last edited:

jbahlman

n3wb
Joined
Jan 14, 2019
Messages
11
Reaction score
1
Location
United States
ok, so i did uncheck like #1, but there was nothing changing the profile, just a notification.
Here is a copy of the log. I just went outside, but the profile didn't change. I got the notification on my phone and under mobile devices it says out of house.
 

Attachments

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Two more checks...

1. Do the profiles change if you manually trigger the ‘Exit geofence’ & ‘Enter geofence’ Action Sets?
Use the lightning bolt icon.
1597244230646.jpeg

2. Are the “ALL devices’ options unchecked?
1597244534722.jpeg
 

jbahlman

n3wb
Joined
Jan 14, 2019
Messages
11
Reaction score
1
Location
United States
So i think i might have found the problem, but i am sure i tried this before. In the Enter Exit geofence settings, i changed it from Run to Hold.
Then when i used the lightning bolt icon, it switched profiles.

The all Devices options are unchecked.

I will have to test some more. Hopefully this fixed my issue. I will update later.

Thanks
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Good. ‘Run’ executes the profile defined in the active global Schedule (if enabled).

Now that you have this figured out, you might want to work on your schedules, rather than toggling profiles using “hold”. Most of us toggle schedules (from ‘Home’ to ‘Away’, and visa versa) when the geofence state changes.

I can provide screenshots of my schedules (for ideas) if it would help.
 

jbahlman

n3wb
Joined
Jan 14, 2019
Messages
11
Reaction score
1
Location
United States
Sure i would love to see examples. The problem i have right now is my wife and i have schedules that change, I have some indoor cameras that i only want recording when we are away, so the only way i could figure to do it was to do it with geofencing.
Maybe i misunderstood the help files, but i thought it made more sense to change the profile instead of the schedule. I could make a schedule for home and away but it would just be 2 schedules with one color on each, just like the profiles. But if that is the better way, i can switch.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
When the geofence works, it’s great. You want to use schedules because the profiles they control may be tuned for each camera AND each camera can override the global schedule AND each camera has its own Event schedule. Using schedules make the the options for automation practically unlimited.

EXAMPLES FOR IDEAS
Here are my global ‘Home’ and ‘Away‘ schedules...
(These are actually used by only my indoor cameras, as my outdoor cameras override them.)
(I should also note that our indoor cameras are only downstairs; we are upstairs at night.)
  • The ’Daytime‘ & ‘Evening’ profiles do not record or detect motion.
  • The ‘Nighttime’ and ‘Away’ profiles record continuously and detect & alert motion.
  • The ‘Away’ profile also uses Sentry.
1597250130246.jpeg 1597250150973.jpeg

All my outdoor cameras (except one) override the above global schedule.
  • The ‘Continuous profile’ records continuously and detects & alerts motion using Sentry.
1597250210679.jpeg

My backyard camera overrides the global schedule and is the exception for my outdoor cams.
  • The ‘ContNoSentry’ profile records continuously and detects motion and alerts without Sentry.
1597257126902.jpeg

(BTW, if you ever need to override a specific camera’s scheduled profile, you can do this using the camera’s gear icon In the BI app)
 

jbahlman

n3wb
Joined
Jan 14, 2019
Messages
11
Reaction score
1
Location
United States
Thanks for the examples, i will take your advice and make some changes and see what happens. i think i understand about the schedules and profiles a little better now.
 

JackBauer

Young grasshopper
Joined
Dec 14, 2014
Messages
88
Reaction score
3
When the geofence works, it’s great. You want to use schedules because the profiles they control may be tuned for each camera AND each camera can override the global schedule AND each camera has its own Event schedule. Using schedules make the the options for automation practically unlimited.
Could you elaborate further? I have a pretty simple setup. I have two profiles - only because on one, I want an alert sent (SMS) if one camera detects motion if I'm out of the geofence.

I have no schedules running.

So I'm confused as to why I must use hold in the geofence routine... It does work... But run, well the profile seems to switch back like immediately... I just can't figure out why.

BI status logs show my phone coming inside the geofence, but never originally leaving - even though my BI IOS app does notify me that I've left the geofence, and the profile just switch appropriately (using hold).

I can leave it as-is and it works, but I'd like to understand what is going on in case I want to use more advanced switching in the future.

Thanks!
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
Your observations sure seem to be consistent with a schedule being active. Perhaps this is a bug?

I'd suggest creating a 'Home' schedule and an 'Away' and schedule. In the former specify the profile you are using when at home. In the latter specify the profile you are using when you are away. Example:
1637516416788.png

Then have your IOS device's 'Enter geofence' and 'Exit geofence' action sets do a 'Change schedule/profile' action. Check the 'Set schedule' option and uncheck the 'Set profile' option. Example:
1637516569442.png
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
BI status logs show my phone coming inside the geofence, but never originally leaving - even though my BI IOS app does notify me that I've left the geofence
This sounds like a bug.

I've also had my Android app fail to communicate geofence events back to the BI server.
It's been so inconsistent that I now user Tasker to send a JSON 'geofence' command to the server (triggered by intercepting the BI App geofence notification).

Perhaps you can do something similar using IOS shortcuts - I've never investigated this.
 

PeteDD

n3wb
Joined
Jun 18, 2023
Messages
9
Reaction score
4
Location
Panama
This sounds like a bug.

I've also had my Android app fail to communicate geofence events back to the BI server.
It's been so inconsistent that I now user Tasker to send a JSON 'geofence' command to the server (triggered by intercepting the BI App geofence notification).

Perhaps you can do something similar using IOS shortcuts - I've never investigated this.

jaydell, regarding " Tasker to send a JSON 'geofence' command to the server (triggered by intercepting the BI App geofence notification). " could you provide more information about that approach? I too am having trouble with the BI App on my Android phone consistently trigging outside and inside the geofence.

Thanks!
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,126
Reaction score
1,237
Location
SF Bay Area
jaydell, regarding " Tasker to send a JSON 'geofence' command to the server (triggered by intercepting the BI App geofence notification). " could you provide more information about that approach? I too am having trouble with the BI App on my Android phone consistently trigging outside and inside the geofence.

Thanks!
I intercept the Blue Iris notifications using Tasker. I've previously shared the methodology in this old post.

Following are the JSON interface commands for getting/setting individual device geofence states.
(excerpted from the Help PDF, chapter 'Administration', section 'JSON Interface')

Getting the current geofence state: (all mobile devices)

1692653945668.png

Setting the geofence state: (single mobile device)

1692653333182.png

KEY POINT: Note that this command does not take a mobile device ID as an argument.
Rather, before issuing the above command, the JSON 'login' command must be issued with the device's 'uuid'.

The 'uuid' is the 'DeviceID' shown in the 'Mobile devices' tab in Settings

1692654370009.png
 
Last edited:
Top