Beacon: a Geohopper/Beecon plugin

Plugins that users have built. NOTE: plugins that were developed for Indigo versions older than 2022.1 will have to be updated to work with Indigo 2022.1 (Python 3 - see this blog post for details). If the plugin listed here is not in the Plugin Store (which will show updated plugins) then you will need to ask on the appropriate thread below if it has been updated and where you get get the update.
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Beacon: a Geohopper/Beecon plugin

Post by ckeyes888 »

Bump...anyone know how to test the webserver without using Geohopper?

Thanks,

Carl
flic
Posts: 128
Joined: Thu Nov 30, 2006 1:35 pm
Location: Lidingö, Sweden

Re: Beacon: a Geohopper/Beecon plugin

Post by flic »

howartp wrote:Yes, I've had problems with Beacon recently. Disabling and re-enabling the plugin sorts it out, but it goes wrong again at some point.


Sent from my iPhone using Tapatalk
Yeah, there's something wrong with my use of Python's BaseHTTPRequestHandler, seems like it stops listening after some time. I can't find anything wrong with it, but I'm looking into it.
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Beacon: a Geohopper/Beecon plugin

Post by howartp »

Cool, good to know you're aware of it.

As I hadn't had time to test what was happening and whether it was my system, I didn't report it (yet).


Sent from my iPhone using Tapatalk
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Beacon: a Geohopper/Beecon plugin

Post by ckeyes888 »

Inexplicably, it started working again today. +1000 on native Touch location tracking.

Carl
rycardo
Posts: 53
Joined: Fri Jul 10, 2015 6:22 pm

Re: Beacon: a Geohopper/Beecon plugin

Post by rycardo »

Regarding the plug-in not working after a certain period of time, until reloaded. The Google SMS plug-in has the same issue. The work around is to reload the plug-in every few hours. I have mine set to reload every 3 hours; maybe that would help with this plug-in?

Create a repeating scheduled event that has it's action as the below embedded python code.

Be aware, you will need to replace the reverse domain text with the one for this plug-in .
com.chrisandlynette.indigoplugin.googleVoiceSMS
The python code to reload the Google SMS is:

Code: Select all

plugin = indigo.server.getPlugin("com.chrisandlynette.indigoplugin.googleVoiceSMS")
if plugin.isEnabled():
    plugin.restart()
I'v tried using this plug-in with a couple of the apps, and could not get it to work. However, I have had really good luck using Apple's Find Friends app, espeically with the improvements they added last year. I have it send notification emails to Indigo every time I arrive and depart home. I was able to improve the email triggers over the weekend using the Better Email plug-in.
mcwill
Posts: 1
Joined: Mon Nov 10, 2014 2:07 pm

Re: Beacon: a Geohopper/Beecon plugin

Post by mcwill »

flic wrote: Yeah, there's something wrong with my use of Python's BaseHTTPRequestHandler, seems like it stops listening after some time. I can't find anything wrong with it, but I'm looking into it.
If you run the following command in a terminal window once the plugin stops responding you will notice that the port is in a CLOSE_WAIT state and stays like that until restarted.

Code: Select all

netstat -atp tcp
I assume it occurs because the iPhone is dropping in and out which interrupts the tcp handshake. On average the plugin runs for approx. 48hours before locking up for us but the phone signal at the geo-fence boundary is pretty flakey.

Iain
flic
Posts: 128
Joined: Thu Nov 30, 2006 1:35 pm
Location: Lidingö, Sweden

Re: Beacon: a Geohopper/Beecon plugin

Post by flic »

I'm testing a new version of the plugin that uses a threaded HTTP listener instead of the old single-thread version. Looks good so far!

Try it: https://github.com/flic/Beacon
rycardo
Posts: 53
Joined: Fri Jul 10, 2015 6:22 pm

Re: Beacon: a Geohopper/Beecon plugin

Post by rycardo »

Hey flic,

I installed the latest build from GitHub, I'll let you know if I experience anything unusual.

For some reason as I travelled yesterday my phone did not notify Indigo of my exiting then entering my Home (region). Apple's Find Friends app did not send the notification emails, nor did the geo-fencing app I'm testing make the http calls. I added some local notifications (push messages) to the geofencing app, so I know what it is doing, without having to make it active.

Rycardo
philipbasile
Posts: 126
Joined: Thu Jan 08, 2015 8:59 pm
Location: NJ

Re: Beacon: a Geohopper/Beecon plugin

Post by philipbasile »

Hi Flic,

Awesome plugin !
I'm running with geohopper since the indigo apple script bug started and crippled my geohopper apple script.

I love that your plugin auto creates the devices when it gets an event from a new location !

Even though you have the Any Device State Change for the trigger it looks like I still need to know which of the location devices I'm going to work with for the next step, either a condition or to set a variable to the current location
.
Would it be possible to have a non-location specific device that has a state of something like CurrentLocation. When you enter a location it gets set to the location name and when you leave that location it gets set to Unknown and another state LastLocation that gets set to the location you last exited.

This way I would need only one device and then a single trigger can assess the locations and actions.

Let me know.

Thanks

Philip
flic
Posts: 128
Joined: Thu Nov 30, 2006 1:35 pm
Location: Lidingö, Sweden

Re: Beacon: a Geohopper/Beecon plugin

Post by flic »

philipbasile wrote: Would it be possible to have a non-location specific device that has a state of something like CurrentLocation. When you enter a location it gets set to the location name and when you leave that location it gets set to Unknown and another state LastLocation that gets set to the location you last exited.

This way I would need only one device and then a single trigger can assess the locations and actions.
Thanks Philip.

Interesting idea, let me think about that!
DrLove
Posts: 260
Joined: Fri Dec 12, 2014 7:28 am
Location: Sweden
Contact:

Re: Beacon: a Geohopper/Beecon plugin

Post by DrLove »

Hi!

Everything is working great BUT from time to time my GeoFency app decides to change the ID and I get new devices in Indigo w/ the new ID and the old one stops working. Is this just me or what? It happens on both my iPhone and my wife's iPhone. I think it may depend on GeoFency app updates but I have seen it other times to.

I guess it's a GeoFency bug and not a Beacon bugg but I would like to hear if some one else is experiencing this!

Best regards, L
Love Kull (yes it's my name)
Blog (in Swedish)
Sweden
tenallero
Posts: 94
Joined: Mon Oct 31, 2011 10:51 am
Location: Barcelona

Re: Beacon: a Geohopper/Beecon plugin

Post by tenallero »

Hi DrLove,

Yes, I suffer about the same problem deviceID changing on some GeoFency app upgrades.
I have sent an email to [email protected]. But, still no answer from the developer.
I am sure is not Beacon a plugin bug.
philipbasile
Posts: 126
Joined: Thu Jan 08, 2015 8:59 pm
Location: NJ

Re: Beacon: a Geohopper/Beecon plugin

Post by philipbasile »

Flic,

Have you thought about my idea to have a non-location specific device? it would be user specific, just not location specific. it would really make a big difference in the way I could track individuals locations and Infer destinations like "it looks like I'm on my way home". It would also streamline and reduce the number of devices and triggers.

It looks like you already have all the pieces in place to implement it.

Thanks,

Philip
flic
Posts: 128
Joined: Thu Nov 30, 2006 1:35 pm
Location: Lidingö, Sweden

Re: Beacon: a Geohopper/Beecon plugin

Post by flic »

philipbasile wrote:Have you thought about my idea to have a non-location specific device? it would be user specific, just not location specific. it would really make a big difference in the way I could track individuals locations and Infer destinations like "it looks like I'm on my way home". It would also streamline and reduce the number of devices and triggers.
I have. I'm a little bit short on time, but I'm working on som changes re devices and device types so this fits right in. I haven't really decided on how to handle it yet though. We all tend to set up things very differently so I'm trying to come up with a way that's as generic as possible. For example, your idea of a user-specific device wouldn't really work for me as I tend to be in multiple places at once. I might be on my bike, in the garage for example.

One solution to solve your specific case is to use the generic triggers, Beacon event -> Device state change (any), and then do some scripting, but I don't know how comfortable you are with doing that?

Anyway, I'm thinking about it! ;)
flic
Posts: 128
Joined: Thu Nov 30, 2006 1:35 pm
Location: Lidingö, Sweden

Re: Beacon: a Geohopper/Beecon plugin

Post by flic »

New version 1.4.0.

Firstly, I've changed the device type from the old custom device to a standard On/Off sensor device type. This enables the use of Indigo Virtual Devices. For example, you can now create a virtual device group for all family member's home location, enabling you to easily trigger jobs when the house is empty. The downside, all old devices needs to be re-created! Sorry about that.

I've done some work on the triggers, it's now possible to create a trigger (enter/exit/any) and filter on the device address or parts of the device address. For instance, if you want a trigger for all check-ins from user fredrik on any location you can filter for "fredrik*". Or, if you want to filter for all check-ins at location home you enter "*@@home". The filter is case-insensitive.

There's also a new option to create three new variables, "Beacon_deviceID", "Beacon_name" and "Beacon_location". (Needs to be enabled in config.) These variables gets updated at check-in and can be used in conjunction with the generic trigger above. It's not exactly what Philip asked for, but it might be a start.

https://github.com/flic/Beacon/
Post Reply

Return to “User Plugins”