Not so long ago Home Assistant introduced iBeacon support and I decided to buy one iBeacon from AliExpress to test it out for you, so you don’t have to do the same.
But what actually are the iBeacons and for what can be used? How to add one in Home Assistant and what to do after that?
Let’s find out together.
Table of Contents
Not Sponsored Article (as usual)
Just to be clear this article is not sponsored by anyone (as usual) and as usual, everything you are about to read is my own opinion and experience.
What is iBeacon?
iBeacon is a protocol developed by Apple back in 2013. For good or for bad this technology is not as widely adopted as the AirPlay for example, but since then, different vendors mainly Chinese ones, have made iBeacon-compatible hardware transmitters – usually called beacons or iBeacons.
Which are the use cases of the iBeacons?
The iBeacons are Bluetooth Low Energy (or BLE for short) devices that broadcast their identifier to nearby smartphones, tablets and other portable electronic devices. The electronic devices on the other hand can be set to perform different actions when in proximity to an iBeacon.
That was one of the use cases of the iBeacons. The other one that I will demonstrate you in a minute Is using the iBeacon as kind of an indoor positioning system. That means, I will attach the iBeacon to an item like keys or cat and I will track that item (or poor animal) with the help of Home Assistant.
What if you don’t have Home Assistant yet?
If you still don’t have Home Assistant yet, what are you doing with your life? Go get one. It is free and fun. On top, I have a Webinar where I’m talking about the four official & supported ways to get Home Assistant + 1 secret, but stupid easy way to start Home Assistant in under 5 minutes on your PC.
My webinar is completely free and the registration is open right now on my other website – https://automatelike.pro/webinar
What compatible with Home Assistant iBeacon I bought?
Anyways, before we continue to the Home Assistant part let’s quickly talk about the iBeacon device that I bought from AliExpress. The exact model is Feasycom FSC-BP108 and it is it in the list of known working devices with Home Assistant.
The working range of my iBeacon is up to 400m in an open area. It it can last up to 6 years and after that I just have to put a new CR3032 battery which is very cheap. The iBeacon is IP67 waterproofed, it supports Bluetooth 5.1 which is great. And it cost me around $20 US dollars. If you want to buy the same, you can use the following affiliate link.
Feasycom FSC-BP108 iBeacon (HA compatible) – https://s.click.aliexpress.com/e/_DDhOZoP
This Feasycom iBeacon can also work with iOS and Android, but who cares about that when we have Home Assistant in place.
Requirements to add iBeacon in Home Assistant?
Before we go the action part of this article, there are some requirements that needs to met, so that the Home Assistant iBeacon integration to be possible. The first two requirements are implied:
- You have to have working Home Assistant 2022.10 or greater
- You need an iBeacon device.
- The next important requirement is to have Bluetooth support on the device where Home Assistant is installed.
To enable Bluetooth support on your Home Assistant, there are 3 recommended ways:
- The Bluetooth support can work out of the box if you have a device like Raspberry Pi 4 and Home Assistant is running on it.
- The other possible option is to buy and add a Home Assistant Compatible Bluetooth Dongle. This is a good, not very expensive and known working device: Asus USB-BT400 – https://amzn.to/3ENWcLO
- The last, but not least possible option is to use a Bluetooth proxy on an ESP32 device running ESPHome.
This last option from above (3rd one), may sound complicated, but quite the opposite – it is not. If you want to know more about this Bluetooth Proxy option I can recommend to read my article where I’m explaining everything in details – How to turn an ESP32 board into a Bluetooth proxy for Home Assistant | ESPHome Bluetooth Proxies
How to add iBeacon in Home Assistant?
Now without further ado I will add my iBeacon in Home Assistant and I’ll attach the iBeacon device to my keys, so I can track them.
- While I’m in Home Assistant I will press the “c” button to invoke the command search bar. Inside, I will type integrations and I will select Navigate Integrations option.
- If a compatible iBeacon device is within the Home Assistant Bluetooth range, then most likely this device will be auto detected. In such a case, just clicking on the Configure button will be pretty much enough to add the iBeacon device in Home Assistant.
- If an iBeacon is not auto discovered, then manually adding the Bluetooth integration may help. To add the Bluetooth integration, click on Add Integration button and type: Bluetooth. Finally click on the result.
- One way or another, when I added my Feasycom iBeacon in Home Assistant, I waited about 1-2 minutes and then I got 2 devices and several entities.
- The strange thing to me is that the second device is exactly the same as the first one, but its Estimated Distance sensor is always showing 400m. If you happen to know why is that – let us know in the comments under this article.
- While the same sensor, but inside the first device of the same iBeacon integration seems to work just fine and it is actually showing the distance of the iBeacon from the HA in meters.
How to create iBeacon Home Assistant Automation
The Home Assistant iBeacon integration was a breeze, now let’s make a Home Assistant iBeacon automation that will be activated when the iBeacon change its estimated distance.
In this concrete example, the triggers of the automation will be two:
- If the device becomes unavailable for some reason (become out of reach, more than 400m away)
- If the device become more than 2m away from Home Assistant (Bluetooth transmitter)
I will have no conditions of this automation and as action (if the triggers are fired) I will have a persistent notification in Home Assistant saying some text.
You can use the YAML code below to create similar Automation, of course you should modify it a bit to work for you. Basically, you have to change the device_tracker & entity_id names with yours.
If you want to see the full tutorial of this automation creation, then check my video (the link is available on the top of this page)
Anyways, here is the YAML code of the automation:
alias: iBeacon 2m away
description: ""
trigger:
- platform: state
entity_id:
- device_tracker.fsc_bp108_2de3
to: unavailable
- platform: numeric_state
entity_id: sensor.fsc_bp108_2de3_estimated_distance
above: 2
condition: []
action:
- service: persistent_notification.create
data:
message: "Your iBeacon goes above 2m away from here "
mode: single
To test the above automation I just have to move the iBeacon device several steps away from my Home Assistant and I’ll get the persistent notification.
Smart Home Glossary?
If some of the words or acronyms that I’m using during this article are not so clear for you, feel free to download my Smart Home Glossary where you can find simple, but useful explanations of the most common Smart Home words.
The Glossary is absolutely free and you can get it right now from my website – https://automatelike.pro/glossary.
Thank you for reading. I’m Kiril & I’m done writing for now. Bye!
Hi Kiril, there are two devices because the Feasycom iBeacon is broadcasting two iBeacons + one URL(?), You can check it out via Feasycom app on your phone (iOs) in the Settings menu (default pin 000000). The reason why each of those shows a different distance is that you can set signal strength for 1m and the one with 400m value is set by default to -3dBm so I guess 400m is the max range. The main point here is that that way you can adjust the distance measurement accuracy.
Also, having several Shelly devices with Bluetooth enabled and proxy in HA configured, I have noticed that they randomly overtake the tracker role and transmit the data to HA. Mostly the device that is closest takes it over but not always. The distance then vary based on the proximity to the Bluetooth device. You can check the currently connected device in HA when you display the distance or signal strength entity history and expand the attributes underneath the chart. It shows the MAC address of the connected device (Source).
just posted two comments, one explaining why there are two devices and how to adjust distance measurement accuracy, but I now can only see one. Hope it did not get lost…