Plugin Request: Geofence

Posted on
Sun Aug 13, 2023 6:23 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Plugin Request: Geofence

Cool, I'll start adding error handling and validation rules

Posted on
Tue Aug 22, 2023 8:26 pm
whmoorejr offline
User avatar
Posts: 763
Joined: Jan 15, 2013
Location: Houston, TX

Re: Plugin Request: Geofence

I've noticed what I can only describe as a state flicker.

The two states that I have noticed are "member_within_geofence" and "member_closest_address"

While setting up triggers, I tried using "member_closest_address" and found that the reported address will sometimes flash "geocode error" This example isn't too bad because I was able to work around it by using conditions in the trigger: member_closest_address" does contain "geocode" and now that trigger works fine.

With the geofences, I've had some fun figuring out the differences between indigo-geofences and places-geofences. I set a trigger to watch a member device (me) and trigger if "member_within_geofence" becomes not equal to "Home-Wide" <- an indigo-geofence larger radius around my places-geofence for "Home". This one truly flickers. My trigger repeatedly fires. I changed the trigger to "has any change" and added a pushover message to give me the string when it fires. All it says (in the pushover message) is "Home-Wide". It's like the state changes off-on-off-on so quickly that by the time the pushover message goes, it's back to on? Debug didn't provide me any clues.
Code: Select all
Life360 Debug                   Updating device: William
   Trigger                         L360 - Bill Arrives Home-Wide
   Trigger                         L360 - Bill Arrives Home-Wide
   Trigger                         L360 - Bill Arrives Home-Wide
   Trigger                         L360 - Bill Arrives Home-Wide
   Life360 Debug                   Updating device: Harper


I'm still testing a lot, ran into several hardware issues and possibly a software issue. The life360 app didn't update 2 of the phones.... they were home from school for about a half hour before they updated. Then they updated immediately for both phones once I opened the app on one of the two phones.

Bill
My Plugin: My People

Posted on
Wed Aug 23, 2023 7:43 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Plugin Request: Geofence

The "flicker" is probably me being a novice plugin developer. My plugin truly overwrites all states every time it runs. I was under the impression (wrongly probably) that Indigo handled determination if the value actually changed or not.

So, assuming it's on me, I may need some help determining where to compare old value vs new value and determining whether not to update the states on the server if they didn't change.

Posted on
Wed Aug 23, 2023 9:52 am
whmoorejr offline
User avatar
Posts: 763
Joined: Jan 15, 2013
Location: Houston, TX

Re: Plugin Request: Geofence

Indigo aside, with just the phone App, I can figure out where my kids are which is/was my main concern. The plugin also does all that and addresses my main concerns. Further automating with location data is fun and cool, but not the top of my priority list. Also, I'm not relying on any location based automation for safety / security, etc. It's supplemental. My point is... the plugin is great and I'm in no rush for any of the quirks to get figured out. I don't want to distract you from the Samsung plugin you're working on. (I'm a Roku TV guy myself, so no testing help for you there)

Bill
My Plugin: My People

Posted on
Wed Aug 23, 2023 10:59 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Plugin Request: Geofence

ok. I do want to improve the Life360 app tho. If I'm updating device_state incorrectly I'd love to do it right.

Posted on
Wed Nov 08, 2023 9:09 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Plugin Request: Geofence

Trying to get the Geofence plugin setup but get an error when I test the webhook in Geofency entering or leaving.
Code: Select all
   GeoFence Error                  Exception: 'key body_params not found in dict'
Traceback (most recent call last):
  File "plugin.py", line 247, in process_message
    self.parseResult(p["device"], p["name"], p["entry"], action_props['body_params'])
KeyError: 'key body_params not found in dict'

In the Geofence app it says the webhook test is successful.

Any idea how to fix it?

Thanks,

Carl

Posted on
Wed Nov 08, 2023 9:16 pm
GlennNZ offline
User avatar
Posts: 1573
Joined: Dec 07, 2014
Location: Central Coast, Australia

Plugin Request: Geofence

Quick guess reply
Look at what is sent in the json in the Geofency app

Send method is
Post

Not Post (JSON)

Which works in Geofency for me

Glenn


Sent from my iPhone using Tapatalk
Last edited by GlennNZ on Wed Nov 08, 2023 9:40 pm, edited 1 time in total.

Posted on
Wed Nov 08, 2023 9:33 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Plugin Request: Geofence

Changed it from Post(json) to Post and got it working.

Thanks,

Carl
Last edited by ckeyes888 on Wed Nov 08, 2023 9:53 pm, edited 1 time in total.

Posted on
Wed Nov 08, 2023 9:39 pm
GlennNZ offline
User avatar
Posts: 1573
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Plugin Request: Geofence

Sorry should be

POST

Alone - not Post(JSON) which gives the same error as you


Sent from my iPhone using Tapatalk

Posted on
Sun Feb 18, 2024 4:53 pm
cmwaffle offline
Posts: 8
Joined: Apr 27, 2019

Re: Plugin Request: Geofence

Sorry to bother but I'm butt naked new to Geofence Plugin. I'm trying to get the GeoFency Plugin to respond to Geofence on my iPhone. I've put in all the the authorization code and URL that I can and I still get a failed test from the GeoFency web hook test. Can somebody help this poor beginner? Thanks.

Posted on
Sun Feb 18, 2024 5:37 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Plugin Request: Geofence


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

Posted on
Thu Mar 14, 2024 5:28 pm
cmwaffle offline
Posts: 8
Joined: Apr 27, 2019

Re: Plugin Request: Geofence

Yes, I've read the README. I make the needed changes in a Note. I then copy and paste it into the URL Settings in the Webhook Settings of the Geofency app. I use the same login and password for my Indigo account to fill in the Account information. I use Post for the HTTP Method.

I'm clearly not doing something right.

Posted on
Thu Mar 14, 2024 5:54 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Plugin Request: Geofence

I'm not the expert on actually using the plugin. I just took an old one and updated it. Hopefully an actual user can help you.

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

Posted on
Thu Mar 14, 2024 5:55 pm
GlennNZ offline
User avatar
Posts: 1573
Joined: Dec 07, 2014
Location: Central Coast, Australia

Plugin Request: Geofence

Working fine for me and Geofency.

You will need to post the screen shots of your setup to troubleshoot

Although from your description already see an issue.

Need to post the URL with api_key (which is indigo api key) and I believe plugin gives this information.
HTTP Method: POST
Account: Blank (as isn’t used) api_key is what gives access back to Indigo.

Sent from my iPad using Tapatalk

Posted on
Tue Mar 26, 2024 9:51 pm
cmwaffle offline
Posts: 8
Joined: Apr 27, 2019

Re: Plugin Request: Geofence

I got Geofency and the Geofence Plugin to work for my home location. Does anyone know how to have Indigo activate different triggers when different locations are entered or left?

Thanks.

Who is online

Users browsing this forum: No registered users and 8 guests

cron