Automators 38: Simon Leeb and Pushcut

I hear you, that is what David was talking about on the show about them not being as “consumer friendly” as they could be.

iBeacon is a Bluetooth LE-based signal standard that lets Apple devices know if they are near an emitter. In common language, the devices themselves are referred to as “iBeacon”.

As long as the device supports the iBeacon standard it will work with iOS and Pushcut. Whether you go for a USB dongle, a powered beacon station, or a battery-powered tile or dot will depend mainly on the where you want to place them.

You will not need “SDKs”, and the custom apps you get with the beacons are usually only needed to initially set them up for use. (ie: copy the beacon’s UUID and adjust its signal strength).

There were some recommendations in this thread:

1 Like

and while we are at it, since @Martin_Packer mentioned it on twitter:

I found that iOS does not like it when you turn the beacon on and off repeatedly for testing - it will stop responding to it. once the iPhone is huffy, only a restart will fix it (or possibly waiting a long time)

if you actually leave and return to a turned on beacon I have found it to work every time though. arriving is pretty instant, however, sometimes the leaving event can be a bit late (some 30 sec or so after actually leaving the room), but there is nothing we can do about that…

3 Likes

Thanks for the mention @sliemeobn. It arose because - after this fun podcast episode - I dug out an iBeacon and plugged it in.

(Actually figuring out which USB thing in the drawer was the iBeacon and which were Logitech Bluetooth keyboard/mouse receivers involved going back to my Amazon purchases and looking hard at the picture.) :slight_smile:

What I discovered was that the range of the iBeacon is too long. My potential use case is “I’ve wandered into my home office and want to kick off some automation”.

It turns out the iBeacon has huge range and it’s detected anywhere in the house. No good for my purpose.

So I experimented with putting tin foil over the iBeacon. This didn’t really attenuate the range.

This is a cheap iBeacon and it doesn’t allow you to program its range. If anyone knows of a reasonably-priced iBeacon that can set its range to no more than 2 metres (or 5 - 7 feet) I’d love to hear about it.

I experimented some more:

  • I dug out Launch Center Pro and set up an iBeacon-based automation that just (literally) speaks “Hello”.
  • I found a Mac Store App “Beacon TX” which acts as an iBeacon simulator. This one is buggy.
  • I played with the iBeacon and eBeacon apps on iOS.
  • I stuck my iBeacon in a USB hub where each port is switchable on and off.

So I have some Observations:

  • As Simon mentioned, apps are very finicky when it comes to detection of entering or leaving the range - and I wish they could respond to when the signal reaches a certain level, rather than being binary. This might be restriction in iOS or the hardware.
  • Switching an iBeacon on and off - as a workaround - confuses things.
  • iBeacon and eBeacon don’t let you copy the UUID etc. So it’s a lot of typing - and I’m not accurate at that, particularly on iOS.

But it’s been fun experimenting.

I have a second Raspberry Pi coming and I wonder if I can turn one of these into a short range iBeacon (or some other kind of “Now I’m Here” + beacon).

+ Cultural reference. :slight_smile:

1 Like

Apps can be developed to determine ranges, but attenuation can occur due to a variety of external factors, so accuracy can vary. But this is precisely how in store advertising iBeacons are intended to function; as shoppers pass by close to particular areas in the store.

Details of the key ranges and how this all works are available from Apple.

I was aware of this.

But in any static location it ought to be possible to tune the range heuristically.

Please link me to this! I’ve been fiddling with mine for ages because at its largest range I frequently “leave” and then “arrive”. Waking up in the morning to a few dozen notifications that I got home is something to make you wonder if you’re going insane :wink:

1 Like

In order to carry out heuristic analysis and tuning, you would still need access to tune, and that comes back to my point around it being made available in an app.

The standard ranging discussed in the documentation I referenced I think gets derived from the details shared in this StackOverflow thread. Note the points in one of the responses about not only the interaction of human bodies causing attenuation, but also reflections from metallic surfaces, and interference from other field generators. I experienced issues around these sorts of interactions when I was responsible for office networking in a previous role; it is sometimes surprising what can impact a seemingly static environment as elements in and around the environment (including outside the building on a couple of occasions with vehicles and equipment parked nearby) can impact what is happening in a particular room. i.e. the location may be static, but what is in and around it perhaps is not.

Fundamentally, if you can configure the iBeacon for a particular power level, this will affect how far the transmission signal will reach, barring any surrounding object interactions (attenuation, interference, reflection). The software on i*OS then ideally needs calibration for a particular iBeacon to determine what RSSI (received signal strength indicator) is suitable for triggering; which is also where any heuristic determination would come into effect, as that analysis would help you determine the triggering figure.

But, when iBeacons are used for in-shop marketing purposes, it is typically the interpretation of the ‘near’ distance identification without any individual device to individual iBeacon calibration that gives the level of accuracy. Assuming no object interactions to impact the signal, this comes back around to the power of the transmission.

If for the iBeacon you are using, you can’t get the power level down low enough to localise the beacon better, then you might simply need to find a different iBeacon that does allow you to get lower, or perhaps some software that allows you to turn down the level further than the software you have used permits. Sometimes command line utilities let you do more than GUI utilities for example.

The part at 6:56 about the Hue hub being too close to the router solves my problems! I hadn’t even thought of this. I just switched it so I don’t know for sure if it worked, but I have a good feeling about it. So glad I listened to this :slight_smile:

3 Likes

So I guess the “notify me when I enter the room” use case isn’t viable. That’s actually more useful to me than “when I come home” as I’m working at home most of the time.

about zigbee/hue vs. wifi: here is a nice article with a pretty picture of the overlapping channels:
https://www.metageek.com/training/resources/zigbee-wifi-coexistence.html

1 Like

Thanks this makes much more sense now. I had no idea that an iBeacon was just a passive(?) Bluetooth signal transmitter so thinking about it like my Apple Watch or AirPods just clicked. I did some searching and saw that I can turn my laptops and raspberry pi into one so I’ll give those a shot.

1 Like

It would be huge if Simon could add this to a future version of Pushcut. If one of the parameters of an iBeacon trigger could be a minimum RSSI (signal strength) value, then we could more finely calibrate in Pushcut, and not the finicky ibeacon apps. (It would also mean different triggers could operate off the same iBeacon at different ranges.

Maybe this is insanely hard to implement, but just thought I’d throw it out there, if anyone reading this knows Simon, haha!

1 Like

Good news, @sliemeobn is the developer and is reading this thread! That doesn’t mean he will or can implement it of course, but he will almost certainly see your comment :wink:

1 Like

so, as I understand it, the APIs in iOS do offer receiving updates of the signal strength while “ranging” for beacons - but iOS will only allow this ranging process in the background for a very limited time.

in contrast to the “region entered/exited” events, which are delegated to iOS completely and wake up the app up in the background reliably. however, these have no “signal-strengh config” or anything like that.

so, one COULD build a logic that is woken up in the background by the “entered” event, but then start “ranging” in the background to see if you are actually close enough. the problem of course: eventually iOS will say “no more execution time, you have ranged enough” and the app could potentially never be informed of actually getting close enough to trigger an “arrived” event.

so, long story short, to my best knowledge: you cannot reliably implement a signal-strength-based trigger for something in iOS (unless your app is running in the foreground while doing so).

to any developer out there: let me know if I got this wrong.

3 Likes

Simon - that’s very helpful context, and totally makes sense. Thanks for the detailed reply. Very helpful. Just starting to use your app now, and really liking it!

1 Like

Are there any Insteon automators out there? I was able to use my ISY, along with IFTTT and Pushcut to automate my Insteon devices to control the lights, etc. I’m happy to share this info if there are others using this technology.

1 Like

Even if there aren’t any today, once you post the information, that can then be found and can bring such users to the forum :wink:

I tried to explain this from a high-level in the Pushcut area.

1 Like

thanks @magicbrian for writing this up! (link below)

I know this is an old thread, but just to add a couple suggestions/points:

  1. There are some iBeacons available that allow the TX to be set as low as -40. That should make the scannable range around 1-2 meters.
    -If you want it even shorter, you can try putting the beacon underneath a thick piece of furniture like a table.
    -You can also try changing the orientation of the beacon. Different beacons behave differently because their internal antennas are designed differently, so you need to figure out how orientation effects your particular beacon.
    -For testing, use an app like nRF Connect or LightBlue (these are the two “pro” apps) that will display the RSSI strength figure “live”, so as you move the beacon around, you should see the RSSI getting stronger (closer to zero) and weaker (more negative). Then you can fiddle around with the furniture/orientation ideas to see what changes weaken the RSSI, i.e. make the signal weaker/shorter.

  2. Re typing the UUID: Yes, definitely not fun if you can’t copy the UUID. One idea: if you are able to configure your beacon and change the UUID, just make the UUID all letter A’s (or 1’s or whatever). So even if you have to type it, it’s not so painful. Just need to keep count of the digits.

  3. Another quick reminder: Some apps want the UUID with dashes, and some apps want it without the dashes. So if you have some problems inputting a UUID, try adding or removing the dashes.
    -Pushcut wants the UUID with dashes. One little quirk of Pushcut is that you can enter the optional major/minor, but it displays it as a number with a comma, e.g. “2,500” instead of “2500”. So be sure you enter a major/minor as a number with no comma even though it displays with a comma after you save it.

1 Like