Beacons+iOS+SmartThings (UK) presence (2020)

Hi All,

Im looking for some advise for Beacons+iOS+SmartThings (UK) for presence?

I’m an apple or iOS user. I’m looking to add iBeacon for micro location and presence. However, I’m looking at the best and easiest place to start. I’m not a coder or developer. So looking for the simplest solution to integrate an iBeacon to ST.

My no1 scenario would be, ability to detect both me and the wife as we arrive home from work. To set location mode in ST (which is already setup and working in Webcore- currently with key fob sensors yuk).

The second, would be ability to detect we are in the house or inside the outside office. I think the distance here would be a friend with iBeacon technology.

Any advise would be so helpful. Thanks all

1 Like

The simplest way is to find a Beacon receiving app which can send a “webhook“ (HTTP post) and use that as the “if“ in an IFTTT applet. Then you can use smartthings as the “that“ for the Ifttt applet and you’re all set. :sunglasses: most typically you would turn on a virtual presence sensor using this method, but you can also control devices directly if you prefer.

Once you have that, it works like any other presence in smartthings.

None of this will require programming, but the onetime setup can be a little tedious.

IFTTT WEBHOOKS

So let’s start with the end goal: using the free Ifttt webhooks service.

It’s going to look crazy technical at first, but it’s a lot simpler than it seems. :wink:

You’re going to give each “if” that you want to use its own name. Ifttt calls this an “event.“For example, “mike_arrived”. This needs to be all lowercase, no special characters, and no spaces.

IFTTT Will also give you your own unique “key“ which you will use for this. It will be long and weird looking, something like “AFd36GMIwwSD3LK57x” only even longer. You can always look that up by going to the webhooks page at Ifttt and clicking on “documentation.”

(Note that the “ webhooks service” at Ifttt was originally called the “maker channel“ so if you look for examples and tutorials you may see it referred to as that.)

In order to use the key, you’re going to have some other application link to Ifttt using your key and the event name of the if that you want to trigger. This is called a “webhook” using the HTTP “post” process.

Again, if you go to that documentation page, it will show you the format of that link, but it’s going to look like this,

https://maker.ifttt.com/trigger/{event}/with/key/{your key}

So in our example it would look like

https://maker.ifttt.com/trigger/mike_arrives/with/key/AFd36GMIwwSD3LK57x

Using the webhook

OK, now we know exactly what we want to do. When an Ibeacon is detected, we want an app that will use that specific webhook so that IFTTT Will run our applet.

Sounds simple, right? And if you write your own mobile app code, it is. But if you don’t, you have to find one that will let you do that.

The problem is that that’s not how most people use IBeacons. Most of the people using Ibeacons are using them for commercial purposes and they want the ibeacon to trigger their own app. Not just pass it along as a webhook. So there just hasn’t been a lot of demand for this use case. And it seems like every couple of years some one individual creates one for themselves, then offers it for sale through the App Store, but doesn’t bother to keep it up-to-date and so after another couple of iterations of iOS it doesn’t work anymore. (RIP Beecon+ and BeaconThings. :disappointed_relieved:)

I’m now going to list a couple of the apps that I use that are working as of February 2020 in the US. I don’t know whether they are available in the UK or not. Or if there are other UK alternatives, but that’s what you were looking for. An app that can detect an Ibeacon and then do an HTTP post webhook.

Also, check carefully as there are two very useful ibeacon features that many apps ignore. (Again, I miss beecon+ , which was perfect for home automation, but no longer runs.)

First, An iOS Ibeacon has three identifying codes:

UUID
Major
Minor

These were intended to delineate zones. So you might have all the IB can set your house have the same UUID, then use the Major to indicate a room and the Minor to indicate a specific Ibeacon.

Which sounds great, but unfortunately many apps only use the UUID. Which won’t be enough to cover an entire house. It’s just something to be aware of in your planning.

Second, the iBeacon spec allows for I beacons to transmit at three different strength levels, which they call “immediate“ (detectable within a couple of centimeters), “near“ (detectable up to around 3 m) and “far“ which is the maximum transmission strength and will be detectable up to around 30 m, although it may be less depending on architectural barriers.

Beecon+ let you sit different rules for these different ranges, which was really nice. But most of the other apps just use the maximum, you either detect the I beacon or you don’t. You may be able to use the device manufacturer’s app to lower the transmission strength of an individual IBeacon so you won’t detect it until you’re much closer to it, but that’s not as flexible.

Anyway, just be aware of that as you work with any one app. Even if it lets you enter the major and minor, it may not use them.

Also, license fees can be relatively high for these apps because again, they are usually end at businesses, not individuals. Some of them have fees as high as 25 € a year. Some have a one time license fee of around €30. There’s just a lot of variation In The pricing models.

Pushcut

Pushcut was only released in 2019 and is the work of one person. It will detect ibeacons and do webhooks.

It’s really designed to do fancy notifications, the kind where the notification pops up but you get to choose from several selections before an action takes place. But you can also create a “local” Event which will do the webhook without requiring you to tap a notification. It ignores the major and minor and only uses the maximum range. And it will make you type in the whole UUID and the whole webhook, which is tedious.

I actually use it more for the notification feature, but it does work with IBeacons.

My biggest concern with this is that I fear it may be like BeaconThings and the developer may just move onto other things in the future and stop supporting it. Which means the app would continue to run until there was some required iOS update and then it might just not work anymore.

It has a nice watch app and some HomeKit integration options if you are on one of the paid tiers. I paid for the annual subscription, but, like I said, I don’t have high confidence that this will still be around in two years, although you never know.

https://www.pushcut.io/

Geofency

This app is used for by businesses to keep track of employees and shipments. It’s an automatic time clock using IBeacons. It will discover nearby Ibeacons so you don’t have to type in the UUID, it already fills it in for you. And it can do a webhook when you enter or leave the range of an ibeacon.

The license fee is very reasonable.

I’m pretty sure this is also a one person operation, but it’s been going for about five years, it gets updated regularly, and I have a little more confidence that it will be around for a while, although you never know.

I like this and use it for my IBeacons. There are also quite a few people who are using it with home assistant and openhab and homeseer in the same manner.

The author is German and I’ve heard the app featured on both UK and German podcasts so I believe it is available in the UK App Store.

image

Thanks @JDRoberts - this is the perfect guide to get started!

I am planning on buying some estimote beacons, as they look cool. Did you have any experience using these?

https://order.estimote.com/buy/proximity-devkit-2018

I plan to also look at Geofency, as the longevity of support is reassuring.

The piece that confuses me is how you translate the major/minor etc from the beacons to a specific device or user. I.e. Neil has arrived home. From what your saying that is what the webhook does. Is there a way to then apply this logic into webcore for modes and scene changes!?

I use Estimote beacons for most of my Beacons. I like them a lot. :sunglasses: your link is the same model that I have.

As far as distinguishing between two people, you have two different ways of doing it. But you don’t use the major,minor.

The simplest for many people is just to have a copy of Geofency on each of your phones, but set up with a different webhook that triggers a different Ifttt event. So Mike’s phone has a webhook for the event “mike_arrives” and Susan‘s phone has a web hook for the event “susan_arrives”. That’s exactly how businesses use it for employee time cards. And of course then you have two separate virtual presence sensors in smartthings if you want to use that method.

So when Mike arrives, the Geofency app on his phone will trigger the Ifttt applet that turns on the virtual presence sensor for Mike. When Susan arrives, the Geofency app on her phone will trigger the Ifttt outlet that turns on the virtual presence sensor for season.

Two phones, one Ibeacon.

The other way to do it is to give each person an Ibeacon to carry and leave a tablet at home powered on at all times running the app. That might work better for kids or dog walkers or other people who don’t want to install an app to make it work. So two Ibeacons, one tablet. When Mike’s beacon gets within range, the tablet triggers its webhook. when Susan’s beacon gets within range, the tablet triggers that web hook. that’s how businesses track shipments.

Either method can work, and if everyone has a smart phone that can run the Geofency app method one probably makes the most sense. But it does require installing the geofency app on each person’s phone.

1 Like

As far as using it, just have the Ifttt applet turn on a virtual presence sensor. At that point it works like any other presence event for SmartThings. :sunglasses:

1 Like

I have 4 beacons now. All showing up inside the estimote app. However they don’t seem to show up in the geofancy time tracking app? Do you need to search them?

Go into your general settings and make sure that Geofency is set up to “always“ be able to use location.

Now You have to add each Ibeacon as a “place“ (location)

  1. choose the + to add the location

  1. choose “Ibeacon”

  1. you will get a screen showing all nearby Ibeacons. (By the way, you can change the UUID for any one beacon in the Estimote app) Click on the three dots on the far right of the one that you want to create a Webhook for.

  1. you can add the major and minor if you want to

  1. tap on the three dots on the far right of the name of the ibeacon that you want to work with. This will give you a list of options. Now choose webhook.

  1. enter the URL settings for the webhook. If you want to trigger Ifttt, you will get the webhook information from the Ifttt documentation page as described in previous posts. You can set one for entry and one for exit into the zone defined by the Ibeacon.

If you are using some other integration method like MQTT You will need to have the URL and any parameters needed for the web hook before starting the Geofency app.

  1. choose post as the webhook method. You can also test the webhook from this page, that is, Trigger it without regard to crossing the Geofence. That’s just to let you confirm that you typed it in correctly. .

And that’s it. You have to do this for each iBeacon that has a unique UUID. And you have to do this on each person‘s phone.

After that, when the phone enters or leaves the region defined by beacon, the appropriate webhook should be triggered

1 Like

Thanks dude. I don’t seem to see a list?

I have an add option like this?

That’s it. Click done on that screen, go back to the previous screen, then click the three dots to the right of the one that you want to add a webhook for.

Also, if you mean you are only seeing one Ibeacon instead of four, do they all have the same UUID in the Estimote app? If so, that’s the issue if you want them to each define their own region rather than all be part of one region.

They all have different uuid. But doesn’t seem to find any?

The screenshot you posted in #10 is showing the identifier, not the UUID.

The UUID is on the next page and you have to wait a couple of seconds for it to come up because it’s based on what the iBeacon is transmitting.

Every Ibeacon has a whole bunch of different identifiers. It has one for Bluetooth, it has one for Eddystone if it supports that, and it has UUID for apple’s iBeacon protocol.

The UUID has dashes in it. That’s what Geofency uses.

The screenshot you posted above in post 8 shows that Geofency found one which is using the default Estimote UUID.

Most people change this in the Estimote app, because otherwise you might trigger based on somebody else’s Ibeacon who hasn’t changed the default either. :scream:

Yep of course you are right. Haha

I’m getting somewhere now. I have the UUID programmed. The geofency location setup and actions logging.

I have now created a virtual presence device on smartthing, is that correct?

I have also created a IFFT account and attempted a rule.

Is my process correct?

As long as your virtual presence device is also a switch so you can turn it on and off from Ifttt, it sounds like you’re almost there. :sunglasses:

Can you just make up the key in the url?

And this is not a switch.

I think I have made some more progress…

Im now seeing this

curl -X POST https://maker.ifttt.com/trigger/neil_arrived/with/key/dykENs3aLWCGFsxaUExKwxStatusactive

{“errors”:[{“message”:“You sent an invalid key.”}]}

Im sure the link is setup right now If this (webhook) then that (smartthings turn on switch)

Go back up to the top of this thread and re-read post 2. You can’t just make up your own key, Ifttt will give you a key associated to your Ifttt account.

IFTTT Will also give you your own unique “key“ which you will use for this. It will be long and weird looking, something like “AFd36GMIwwSD3LK57x” only even longer. You can always look that up by going to the webhooks page at Ifttt and clicking on “documentation.”

Thanks. This has installed! :slight_smile:

I still see the error

Is there a troubleshooting method. What does invailde key mean? I didnt generate the key, the site did.

First of all, delete any posts that show your actual key and generate a new one. That’s the password to your account. Don’t show it to anybody.

Second, unfortunately you are going to have to find somebody else to help you. Since I rely on text to speech I really can’t get into the details of that kind of error.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.