Plugin Request: Geofence
-
- Posts: 1107
- Joined: Sat Oct 08, 2011 12:33 pm
- Location: Northern Virginia
- Contact:
Re: Plugin Request: Geofence
Cool, I'll start adding error handling and validation rules
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.
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.
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
Bill
My Plugin: My People
My Plugin: My People
-
- Posts: 1107
- Joined: Sat Oct 08, 2011 12:33 pm
- Location: Northern Virginia
- Contact:
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.
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.
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
My Plugin: My People
-
- Posts: 1107
- Joined: Sat Oct 08, 2011 12:33 pm
- Location: Northern Virginia
- Contact:
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.
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.
In the Geofence app it says the webhook test is successful.
Any idea how to fix it?
Thanks,
Carl
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'
Any idea how to fix it?
Thanks,
Carl
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
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.
Re: Plugin Request: Geofence
Changed it from Post(json) to Post and got it working.
Thanks,
Carl
Thanks,
Carl
Last edited by ckeyes888 on Wed Nov 08, 2023 9:53 pm, edited 1 time in total.
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
POST
Alone - not Post(JSON) which gives the same error as you
Sent from my iPhone using Tapatalk
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.
- FlyingDiver
- Posts: 7313
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Plugin Request: Geofence
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
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.
I'm clearly not doing something right.
- FlyingDiver
- Posts: 7313
- Joined: Sat Jun 07, 2014 10:36 am
- 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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
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
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
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.
Thanks.