GeoFence - the Beacon replacement plugin
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
GeoFence - the Beacon replacement plugin
Design goals:
NO port forwarding required - used Indigo reflector instead.
Indigo 2022.X (Python3) compatible.
Support multiple Geofence type apps. Right now, I am only able to test Locative. I can't seem to find the other apps the original plugin supported on the iOS app store.
NO port forwarding required - used Indigo reflector instead.
Indigo 2022.X (Python3) compatible.
Support multiple Geofence type apps. Right now, I am only able to test Locative. I can't seem to find the other apps the original plugin supported on the iOS app store.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Beacon replacement plugin
Great idea!
Thanks for taking this on - as It is in regular use by me. Using the reflector address is a great idea.
Geofency - seems to be the most common (or at least was)
https://www.geofency.com/
This sends a “webhook” command for each location with a enter/exit that previous Beecon plugin would create devices and then update location based on these enter/exit’s.
(The good thing about Geofency is appears to use wifi network range and GPS location - so moment wifi connected it sends update - in my usage is within seconds of arrival)
Glenn
Sent from my iPad using Tapatalk
Thanks for taking this on - as It is in regular use by me. Using the reflector address is a great idea.
Geofency - seems to be the most common (or at least was)
https://www.geofency.com/
This sends a “webhook” command for each location with a enter/exit that previous Beecon plugin would create devices and then update location based on these enter/exit’s.
(The good thing about Geofency is appears to use wifi network range and GPS location - so moment wifi connected it sends update - in my usage is within seconds of arrival)
Glenn
Sent from my iPad using Tapatalk
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
https://github.com/FlyingDiver/Indigo-B ... g/2022.0.3
Supports all beacon types from original plugin. Only Locative and Geofency have been tested,
Geofency supports both POST and POST (JSON), but not GET.
Supports all beacon types from original plugin. Only Locative and Geofency have been tested,
Geofency supports both POST and POST (JSON), but not GET.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
I'm hoping this is a drop-in replacement for the original plugin. The only required change should be to put a Reflector API key in the plugin config in place of the server Port. You will need to edit the URL on your geofence apps to the new reflector URL, which is printed to the Indigo log on plugin restart.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Beacon replacement plugin
So I'm sure I've got something setup wrong, but when trying a test with Locative, I get this error message:
Note that I've enable HTTP Basic Authentication in the Locative app, and have tried using both the login credentials for the Indigo Server, as well as my Indigo store login, but still get the same error message, or a slight variation of the 'from' part.
When I start up my Indigo Server, that page indicates that my Reflector is "active", I have checked the box concerning "Enable OAuth and API....", and can use the Reflector URL with the iOS Touch app to connect to the server.... So while I think I've got all that setup correctly, I'm still getting the above error message with Locative, so I must be missing something......
Code: Select all
Web Server Warning You are not authorized to access that resource "http://indigodomo.net:15940/" from indigo @ 127.0.0.1When I start up my Indigo Server, that page indicates that my Reflector is "active", I have checked the box concerning "Enable OAuth and API....", and can use the Reflector URL with the iOS Touch app to connect to the server.... So while I think I've got all that setup correctly, I'm still getting the above error message with Locative, so I must be missing something......
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
If you have the correct URL with the API Token, all other authentication should be disabled. There is no username/password. The API token handles that.jltnol wrote:So I'm sure I've got something setup wrong, but when trying a test with Locative, I get this error message:Note that I've enable HTTP Basic Authentication in the Locative app, and have tried using both the login credentials for the Indigo Server, as well as my Indigo store login, but still get the same error message, or a slight variation of the 'from' part.Code: Select all
Web Server Warning You are not authorized to access that resource "http://indigodomo.net:15940/" from indigo @ 127.0.0.1
When I start up my Indigo Server, that page indicates that my Reflector is "active", I have checked the box concerning "Enable OAuth and API....", and can use the Reflector URL with the iOS Touch app to connect to the server.... So while I think I've got all that setup correctly, I'm still getting the above error message with Locative, so I must be missing something......
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
The URL you use should look something like:
Code: Select all
https://XXXX.indigodomo.net/message/se.furtenbach.indigo.plugin.beacon/webhook?api_key=XXXX-XXX-XXX-XXX-XXX
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Beacon replacement plugin
Update:
Geofency working well for me:
One Error on setting up - clicked on link - created a GET and got below, but working fine since.
Further to below: Think that was an inadvertent click on the link I emailed to myself to copy and paste into iPhone.
Only minor issue is the URL is loooongg... hard to type into iPhone etc.
But can use tinyurl.com as free service to come up with shorter 8 character URL...
But then again, once setup, once and done - so far better than having to worry about port forwarding!
Thanks Joe!
Glenn
Geofency working well for me:
One Error on setting up - clicked on link - created a GET and got below, but working fine since.
Further to below: Think that was an inadvertent click on the link I emailed to myself to copy and paste into iPhone.
Code: Select all
incoming_request_method : GET (string)
Beacon Error Exception: 'key Content-Type not found in dict'
Traceback (most recent call last):
File "plugin.py", line 231, in process_message
ctype = action_props['headers']['Content-Type']
KeyError: 'key Content-Type not found in dict'
But can use tinyurl.com as free service to come up with shorter 8 character URL...
But then again, once setup, once and done - so far better than having to worry about port forwarding!
Thanks Joe!
Glenn
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
Email it to yourself or put it in a Note, then copy and paste...GlennNZ wrote: Only minor issue is the URL is loooongg... hard to type into iPhone etc.
But can use tinyurl.com as free service to come up with shorter 8 character URL...
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Beacon replacement plugin
Yep - that’s what I did.
But for other devices - not my account - slightly more difficult - but again SMS to them and copy and paste. Doable - and as said the removal of port forwarding a huge benefit, as that is far harder for some to setup!
All going well!
Sent from my iPad using Tapatalk
But for other devices - not my account - slightly more difficult - but again SMS to them and copy and paste. Doable - and as said the removal of port forwarding a huge benefit, as that is far harder for some to setup!
All going well!
Sent from my iPad using Tapatalk
Re: Beacon replacement plugin
Ok
So I still can't get this to work with either Locative or Geofency.
I'm 99.9% sure I've got the reflector set up correctly as I am able to access my Indigo Server with the Touch app thru the cell network when not at home.
I've checked "Enable OAuth and API Key authentication" in the server startup page.
I've installed the new plugin, and have re-started the Indigo Server, gone to the plugin configure page, have entered the API key and have enabled debugging. Obviously, both Enable Locative and Enable Geofency are checked.
In the Locative app, under settings, I have entered my reflector URL and clicked "Send Test-Request", but all I get is a "Note" in the app saying a Test Request has been sent, but nothing happens in the Indigo log.
In the Geofency app, in one of my locations, I've gone to the Webhook settings, entered the new Reflector URL and have clicked "Enter" and I get a long string of HTML code in the app in a popup window with this text at the top: "FAILED", and this text at the bottom: "You are not authorized to access that resource", but nothing in the Indigo Log.
So I'm sure I'm just doing something wrong, but can't figure out what it is.
I've gone as far as creating a new API key, tried using just HTTP without the "s". I've copied and pasted the Reflector URL as well, so no typing errors. Since the Touch app can access the server without any changes to my router, I'm assuming I don't need to do anything to get Beacon to work in that regard... but still can't get the apps on my phone to access the plugin on the server.
So I still can't get this to work with either Locative or Geofency.
I'm 99.9% sure I've got the reflector set up correctly as I am able to access my Indigo Server with the Touch app thru the cell network when not at home.
I've checked "Enable OAuth and API Key authentication" in the server startup page.
I've installed the new plugin, and have re-started the Indigo Server, gone to the plugin configure page, have entered the API key and have enabled debugging. Obviously, both Enable Locative and Enable Geofency are checked.
In the Locative app, under settings, I have entered my reflector URL and clicked "Send Test-Request", but all I get is a "Note" in the app saying a Test Request has been sent, but nothing happens in the Indigo log.
In the Geofency app, in one of my locations, I've gone to the Webhook settings, entered the new Reflector URL and have clicked "Enter" and I get a long string of HTML code in the app in a popup window with this text at the top: "FAILED", and this text at the bottom: "You are not authorized to access that resource", but nothing in the Indigo Log.
So I'm sure I'm just doing something wrong, but can't figure out what it is.
I've gone as far as creating a new API key, tried using just HTTP without the "s". I've copied and pasted the Reflector URL as well, so no typing errors. Since the Touch app can access the server without any changes to my router, I'm assuming I don't need to do anything to get Beacon to work in that regard... but still can't get the apps on my phone to access the plugin on the server.
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
PM me a screenshot from the Locative app showing the URL, and also the log when restarting the plugin with debug enabled.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Beacon replacement plugin
Can I add what happens if copy and paste in a Safari window on the Indigo Mac?
Re: Beacon replacement plugin
Can I add what happens if copy and paste the URL in a Safari window on the Indigo Mac?
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Beacon replacement plugin
Huh?GlennNZ wrote:Can I add what happens if copy and paste in a Safari window on the Indigo Mac?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177