Automators 38: Simon Leeb and Pushcut

3 Likes

I host a couple podcasts. The time that the episodes post is not at the exact same time every week, but I use Pushcut within in a shortcut, to schedule follow l-up posts throughout the next few days. . This means whenever I first sent out my initial promotional tweet for that episode I have affectively scheduled to follow ups but I still have to confirm them. That means if for some reason I donā€™t want them to run they donā€™tļæ¼. Being able to schedule Pushcut notifications from within Shortcuts was the deal maker that really got me to look at this app.

I do have a few others I run on scheduled. I know Shortcuts can do this but it annoys me in Shortcuts proper the notification doesnā€™t have anyway to tell me what itā€™s going to do. So say I have three different ones, how do I know which Iā€™m going to run? Pushcut solves this.

Iā€™m still mulling over ideas for for how to use Webhooks and the API, but I do have working Shortcuts I can use to refer to for setting those up in the future when that time comes (so I donā€™t have to figure it out again).

And, as someone on the beta, I love how responsive the developer is to either bugs or suggestions.

4 Likes

Iā€™m still not sure what iBeacons are or what to look for. Searching on Amazon I get a bunch of things that look like Tiles or computer parts. Some of those Tile-looking things mention a SDK and some others have an iOS app that looks ancient. Searching on Google is showing me a bunch of pages targeted to corporate audiences.

Do I want an SDK? Will they work with Shortcuts/Pushcuts if they come with their own app?

1 Like

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: