GeoFence - the Beacon replacement plugin

Posted on
Sat Jul 30, 2022 8:21 pm
GlennNZ offline
Posts: 1084
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Beacon replacement plugin

Sorry - I meant for the above user error - would bypass Geofency/App issues and check that reflector API/settings are working. (Likewise could conceivably do a test button?)

Posted on
Sat Jul 30, 2022 8:21 pm
FlyingDiver offline
User avatar
Posts: 6265
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Beacon replacement plugin

You'll get an error because it's not a POST and doesn't have the right parameters.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jul 30, 2022 8:22 pm
FlyingDiver offline
User avatar
Posts: 6265
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Beacon replacement plugin

Oh, it's fixed. He was using just the reflector host name and not the complete URL.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 01, 2022 1:34 am
mclass offline
Posts: 292
Joined: May 13, 2015
Location: Melbourne, Australia

Re: Beacon replacement plugin

Thanks,Joe for another great contribution!

Got it set up & working with Locative, but the next challenge is that I have two sites, each with its own Indigo server and each having it’s own reflector.

It seems to me after a bit of investigation that Locative will only serve a single reflector URL with one webhook message for entry and another for exit from a geolocation.

I realise that you’re not a Locative support resource, but wondered if you had any suggestions on how I can support the two separate locations and servers.

One option I considered was to have two different iPhone apps (eg Locative and Geofency) with each serving one of the two different locations. Interested if there’s any other bright suggestions!

TIA
mclass


Sent from my iPad using Tapatalk

Posted on
Mon Aug 01, 2022 7:26 pm
FlyingDiver offline
User avatar
Posts: 6265
Joined: Jun 07, 2014
Location: Southwest Florida, USA

GeoFence Plugin

I renamed the plugin to GeoFence. It uses the same plugin ID as the old Beacon plugin, so you should be able to just download the new plugin and double-click and it'll all work.

https://github.com/FlyingDiver/Indigo-G ... g/2022.1.0

This SHOULD do everything the old one did. The ONLY change that should be needed is make sure your reflector is working and to put an API key in the plugin config.

I'll be traveling for a couple days. Please test and comment. Open GitHub issues for actual bugs.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 01, 2022 7:29 pm
FlyingDiver offline
User avatar
Posts: 6265
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Beacon replacement plugin

mclass wrote:
Thanks,Joe for another great contribution!

Got it set up & working with Locative, but the next challenge is that I have two sites, each with its own Indigo server and each having it’s own reflector.

It seems to me after a bit of investigation that Locative will only serve a single reflector URL with one webhook message for entry and another for exit from a geolocation.

I realise that you’re not a Locative support resource, but wondered if you had any suggestions on how I can support the two separate locations and servers.

One option I considered was to have two different iPhone apps (eg Locative and Geofency) with each serving one of the two different locations. Interested if there’s any other bright suggestions!


Only thing that comes to mind immediately is to designate one site as the "controller" and have all apps report to it. Then from there set up an action that forwards the notifications to the other site. Maybe use MQTT to send a message that fires an action group?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 01, 2022 7:32 pm
FlyingDiver offline
User avatar
Posts: 6265
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: GeoFence - the Beacon replacement plugin

How useful would it be to have all the parameters sent from the mobile app available as custom states in the GeoFence devices? For Locative, that's this data:

Code: Select all
          device : FECE6A6E-8B0E-4108-884B-4B36CE34D68C (string)
          device_model : iPhone14,2 (string)
          device_type : iPhone (string)
          id : test (string)
          latitude : 123.0 (string)
          longitude : 123.0 (string)
          timestamp : 1659401290.0 (string)
          trigger : enter (string)


For Geofency we get:

Code: Select all
    body_params : (dict)
          address : XXXXX  (string)
          category : Monitored (string)
          date : 2022-08-02T01:31:14Z (string)
          device : A7AA5CED-29B9-4747-8BEC-D5777D3DF47F (string)
          entry : 0 (string)
          id : 83B9D38B-3B2F-4C74-A95F-CCFF20A44A28 (string)
          latitude : XX (string)
          longitude : YY (string)
          name : 5SOMETHING (string)
          radius : 100 (string)
          wifiBSSID : 7e:8a:20:5e:2:e3 (string)
          wifiSSID : WIFI (string)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 01, 2022 7:43 pm
ryanbuckner offline
Posts: 745
Joined: Oct 08, 2011

Re: GeoFence - the Beacon replacement plugin

FlyingDiver wrote:
How useful would it be to have all the parameters sent from the mobile app available as custom states in the GeoFence devices? For Locative, that's this data:

Code: Select all
          device : FECE6A6E-8B0E-4108-884B-4B36CE34D68C (string)
          device_model : iPhone14,2 (string)
          device_type : iPhone (string)
          id : test (string)
          latitude : 123.0 (string)
          longitude : 123.0 (string)
          timestamp : 1659401290.0 (string)
          trigger : enter (string)


For Geofency we get:

Code: Select all
    body_params : (dict)
          address : XXXXX  (string)
          category : Monitored (string)
          date : 2022-08-02T01:31:14Z (string)
          device : A7AA5CED-29B9-4747-8BEC-D5777D3DF47F (string)
          entry : 0 (string)
          id : 83B9D38B-3B2F-4C74-A95F-CCFF20A44A28 (string)
          latitude : XX (string)
          longitude : YY (string)
          name : 5SOMETHING (string)
          radius : 100 (string)
          wifiBSSID : 7e:8a:20:5e:2:e3 (string)
          wifiSSID : WIFI (string)


Extremely useful

Posted on
Wed Aug 03, 2022 1:04 pm
howartp offline
Posts: 4500
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: GeoFence - the Beacon replacement plugin

Great, looking forward to updating to this.

Currently use Geofency.


Sent from my iPad using Tapatalk Pro

Posted on
Sat Aug 06, 2022 12:07 pm
FlyingDiver offline
User avatar
Posts: 6265
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: GeoFence - the Beacon replacement plugin


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Sep 22, 2022 4:08 pm
jltnol offline
Posts: 861
Joined: Oct 15, 2013

Re: GeoFence - the Beacon replacement plugin

Hey folks

I'm running into a bunch of issues with iOS16 and the 2 location apps I have on my phone. Both apps are triggering without crossing boundaries. In today's example, I left the house and crossed both the Loc1 and Loc2 fence, which are concentric circles around my house with Loc1 being the closest. I came home about 16:30, and the "arrive" triggers didn't happen because both thought I was already there. I have 2 apps on my phone and this log is from the Locative app. While the other app has more "crossings" in the log, both show multiple crossings that simply didn't happen. I'm guessing this is an iOS 16 issue, and not an issue with the apps, and certainly not an issue with the plugin..

But I am curious if anyone else has seen this kind of behavior.

Thu Sep 22 12:54:02 2022
09-22 12:55:17.798000 Loc-1 False
09-22 12:56:49.118000 Loc-2 False
09-22 12:59:29.119000 Loc-2 True
09-22 12:59:29.200000 Loc-1 True
09-22 12:59:36.937000 Loc-2 False
09-22 12:59:37.109000 Loc-1 False
Thu Sep 22 12:59:37 2022
Thu Sep 22 13:00:58 2022
09-22 13:01:33.886000 Loc-2 True
09-22 13:01:33.887000 Loc-1 True
09-22 13:04:23.091000 Loc-1 False
09-22 13:04:23.099000 Loc-2 False
09-22 13:51:20.915000 Loc-2 True
09-22 13:51:21.080000 Loc-1 True
09-22 13:51:27.062000 Loc-2 False
09-22 13:51:27.230000 Loc-1 False
09-22 13:53:16.785000 Loc-2 True
09-22 13:53:16.976000 Loc-1 True


note in this list, the most worrisome entries are the ones around 13:51, as I had left a restaurant, but was no where NEAR the Loc1 or Loc2 fence



************************************

So the latest version of iOS seems to have fixed this issue for me.

Who is online

Users browsing this forum: No registered users and 1 guest