SmartThings Community

Mobile Presence and iBeacon (discussion beginning 2015)


(Brice; SmartRulesApp.com) #77

BeaconThings is going to need to go through the same update and approval process that SmartRules has gone through to work in other regions outside of the US. This is on the todo list, but for now, I would not recommend UK users to purchase it from the US app store.


#78

Thanks for the update, shout if you need beta tester


(ocpd+adhd+alz+md+hfa+fms+lol=me :)) #79

I may have skimmed too quickly, but does anyone have any ideas about whether or not it’s possible and/or how to use Android devices as Bluetooth beacons?

I’m not talking about using an app on Android to interact with iBeacons.

I want to actually use the Android devices that I already have mounted on walls all over my house as the beacons. Since I already have Bluetooth devices all over the place, it would be really cool to be able to use them like this.


#80

A special thank you to @JDRoberts, a tremendous contributor to our community, who inspired this iBeacon application, and @DavGlass for his SmartApp that made it possible. Here is a link to a blog posting on Proxidyne’s website (the company behind the Geohopper referenced by JD) that describes the installation of an iBeacon with an external antenna to allow a sliding entrance gate to be triggered via SmartThings when the iBeacon is detected by an iPhone running Beecon+:

http://www.proxidyne.com/2016/08/18/bleu-station-installation-with-external-antenna/


#81

Very nice! :sunglasses:


#82

@sosaudio1 asked for the details of using IFTTT with IBeacons in another thread, so here they are. :sunglasses:

Beacons don’t run any commands. All the beacon device does every few seconds is send out its own ID. So basically it’s just saying “I am here. I am here. I am here.”

Now you have to have a receiving station app on a phone/tablet that will receive that message. Once it gets the message, it’s up to the receiving station app to decide what to do next, based on the ID of the Beacon sending the message.

The usual metaphor for this is a lighthouse. The beacon is the lighthouse, sending out its light. It has no idea if there any ships nearby or not. It just keeps sending the same light over and over. It is up to each ship to decide what to do when it sees the light. The ship is the receiving station app, which runs on a phone or a tablet.

OK, so the receiving station app knows that beacon 12345 is nearby. It also has some idea of how near it is, based solely on the signal strength of the message received.

So how do we integrate that with IFTTT?

The usual way is to use the IFTTT maker channel/service. In this case, the receiving station app receives the Beacon message from Beacon 12345. It has a rule which says that when it receives a message from that particular Beacon, it should do a HTTP post to the IFTTT maker channel. That becomes the “if” in the IFTTT applet.

OK, so now we are reaching IFTTT when the Beecon is detected. What should we use for the “that” in the applet?

Well, you can do anything you can do in the smartthings IFTTT service/channel. You could turn on a specific light. You could unlock a door. You could turn on A switch which then initiates a routine. You could flip the switch on a virtual presence sensor which also has switch capability.

This last is useful because it basically lets you turn detecting a Beacon into a SmartThings arrival sensor. And from then on you treat it like any other presence in SmartThings. You can turn it on when you come within range of the beacon and turn it off when you leave the range again.

But if you would rather just have Beacon detection trigger a specific SmartThings event, you could do that instead. Whatever works best for your use case.

And if you want to have multiple things happen at once, either use a routine or use Core ( ask in the core peer Assistance thread if you want to explore that option) or set up one IFTTT applet for each event, all triggered by the same maker service “if.”

So…

  1. set up a beacon Device using the transmission strength you want

  2. choose a receiving station app which can do webhooks (an HTTP post)

  3. create a rule in the receiving station app to send the HTTP post to your IFTTT accounts maker service/channel (see the IFTTT documentation on using the maker channel for more details)

  1. if you want, create a virtual presence sensor with switch capability
  1. create an IFTTT applet where the maker service receiving the post from your IBeacon receiving station app is the “if” and smartthings is the “that.”

So that’s the IFTTT method.

There are other alternatives. If you have android, you should be able to use a combination of Tasker and SharpTools. Or you can post directly to an end point in your smart things account if you know how to write Web services smart apps. Start at the top of this thread for more discussion. :sunglasses:


BeaconThings - Beacons and SmartThings
(Rich Best) #83

Awesome!!! Thank you


#84

And just to be clear, that method requires that the Beacon receiving station app be able to send an HTTP post. Not all of them can. So that’s the feature that you’re looking for or, of course, if the app description says it can work with IFTTT. :sunglasses:


(Rich Best) #85

Makes sense… There are a bunch in the play store like the one I referenced. I’m pretty sure some of them do


(dennis) #86

Using IFTTT normaly gives me too much lag, does anyone have this working on android without lag?


(Rich Best) #87

How much lag is too much?


(dennis) #88

4+ seconds :slight_smile:


(Rich Best) #89

But we aren’t talking minutes here. The Arrival sensor has a delay on it of 2 minutes…so…every 2 minutes it searches to see if I am home. This means waiting in the driveway until ST sees the device and triggers to open the door. 4+ seconds isn’t bad


(dennis) #90

but if you want to use it to trigger stuff in house, 4 seconds can be too long in my opinion :slight_smile:


(Rich Best) #91

Maybe… Or maybe you could set it to switch on a group of things at once and then off and another group on… For example, not knowing your layout, let’s say you get to the door. Now this is a man speculating based on research on the web… First beacon we will call entry and fence it to eight steps away from the front door. Takes about 1/2 sec roughly in stride so 8 steps 4 secs roughly. So, that fence beacon then runs the door lock and hall light. The other fence is located in the living room and it pics up that you are in the hall. Once you enter the space of the living room you leave the space of the hall, that beacon is no longer picked up, turns that light off locks the door. And so on. So planning the groups of lights as you move through the house might help fix the 4 second problem. Remember that you can adjust the effective power of each beacon and that affects your fencing. So you could fire beacons in different sequences based on your location to other beacons.


(Paul Eastabrook) #92

Thanks for the info @JDRoberts. Do you or anyone else here have a favourite iOS receiving station app doesHTTP Posts?

Cheers


#93

My personal favorite is Beecon+ from BeaconSandwich. Very nice app, lots of Home automation features, stellar support. Costs around $10, and I’ve been very happy with the purchase. :sunglasses:

It’s iOS-only, though.


(Paul Eastabrook) #94

I’ve started following your guide @JDRoberts, thank you for the info, it has been a great help! I also went with Beecon+, very good app for this sort of thing. Now I just need to wire it up to the maker channel :slight_smile: Thanks again!


(Rich Best) #95

OK soooooo…I am confused at the implementation of the webhook in the maker channel recipe.

I want to trigger an event correct?

What do I need to put into {event} of the URL? Or am I going about this wrong?

Do I put the url of the beacon into the event…or…do I put my maker channel url into the beacon? Again this begs the question what goes into the event?

Thanks for the help
Rich


#96

Most commonly, the receiving station app that you use for your ibeacons will have a means of sending a Web request. The exact options will vary depending on which app you were using.

You can think of the event name in this scenario as just a tag that the receiving station app is sending to IFTTT. In most cases, it can be whatever you want. For example, I send one from the beecon+ app that says “ramp” which means the I beacon on the front door wheelchair ramp has been detected by the receiving station app on my phone.

This becomes the “if” in an IFTTT recipe/applet.

Then I can use whatever I want to as the “that,” including something in the SmartThings IFTTT service/channel.

So the “event” is just the identifying name you are using when you send a POST to the maker channel so IFTTT will know which applet to trigger.