Automators 39: Automating iBeacons

I think the Pushcut app is a bit underdeveloped in terms of beacon functionality at this point. I also saw this same issue mentioned in Reddit. But I think they will eventually work it out. They seem like smart people (or at least a lot smarter than me!)

The reason why you are getting alerts when you shouldn’t is because the app thinks the beacon is gone. So, what could cause that?

1. Misaligned broadcast/scan:
-The beacon broadcasts it’s little UUID message according to the beacon’s configured interval. Let’s say you set it at the default 1000ms. So that means that the beacon will send out it’s broadcast every 1000ms (i.e. 1 second). The broadcast only lasts 3 milliseconds. In order for this to be “seen” by the app, the app has to be scanning for beacons at that exact moment. If the app’s scan interval is set to 1000ms and the scan window is 100ms long, that leaves 900ms of time when the beacon broadcast could be missed by the app.

Solutions:
-The app maker could increase its scan window or decrease its scan interval. (I think there are some issues created by the iPhone iOS also, such that the scan interval and window time is different when the app is in the foreground or background). This would use more battery power on your smartphone.
-You could lower the broadcast interval of the beacon to 500ms or 300ms or even 100ms. This would use more beacon battery power.
-In addition, you could also try inputting a more optimal broadcast interval into the beacon. The smart people at Apple recommend that you set your advertising interval to one of these odd-looking numbers: 152.5 ms, 211.25 ms, 318.75 ms, 417.5 ms, 546.25 ms, 760 ms, 852.5 ms, 1022.5 ms, or 1285 ms. It is a bit complicated to explain this in detail (something something math), but suffice it to say, these weird intervals work better. The bad news is that most beacons’ configuration apps don’t allow you to input such precise numbers for interval.

2. Missed broadcast due to interference
-Bluetooth and BLE does experience interference sometimes, so broadcasts might be missed from time to time. In my experience, this is not a big issue, but it exists. Of course, it depends on the household and number of bluetooth devices in use. More devices means higher chance of interference.

3. Unreliability of RSSI signal strength figures
-I am not sure if Pushcut is using RSSI to detect distance. I think the answer is no (but they should). But if they are, they might be looking for a specific RSSI figure such as “higher than -80” (just an example) to indicate that a beacon is “within range”. This is probably a good idea for them to do. But if they are only looking for a “higher than -80” RSSI to happen ONCE, then there may be some issues. RSSI figures are not exactly rock solid stable. You can put a beacon two meters away from your phone and measure the RSSI, and you will see it jump around from -80 to -79 to -90 to -82 to -84 to -78, etc. So what the app maker should do is to add some smoothing of these figures. A simple way is to take a moving average of 3 readings. Then consider that “smoothed RSSI” to be more trustworthy. Or the app could smooth but also throw out (ignore) obviously false numbers. There are a couple different ways to do it that would help a lot.
-Plus, if they did start to use RSSI figures, that would allow them to easily add an option of “immediate” (i.e. really close by), “near”, or “far” to the beacon notification setup. That would make it a lot more useful/flexible for various real world uses.

1 Like