I’m planning to set up a beacon-based presence system. I understand that either I can make a phone the beacon, or make the phone scan for beacons. What option is the best for battery life?
My intuitive sense would be that tracking a beacon on the phone would take less energy, and all the AIs I asked agreed (no ban pls). But I came across android - BLE Transmitting vs Receiving Energy Consumption - Stack Overflow which says it would be more efficient to transmit the beacon.
How about using small BLE beacons on the key chain of each person you want to track for presence? They usually can be passively scanned - which uses the leat amount of energy - and rumour has it that there are still some poeple who leave the house without their phone these days every now and then, while keys are usually taken along
Also with being able to set the broadcast interval of some of such beacons the battery life can be extended with a larger interval even further.
Such a beacon lasts around 2-3 years on a single CR2032 cell.
That would work… except I’m not trying to do housewide presence. I should’ve been specific about that. I want to trigger pending announcements when a specific family member walks down the stairs.
Ok, I understand, so more location tracking than presence tracking, with the phones being carried around.
Then yes, the phones would have to act as beacons, either with a specific beacon app, which would then have to be running all the time, but could still also pose issues with background broadcasting on some phone OSs.
And it will require beacon receivers located in different location to be able to triangulate the position/distance to a specific receiver to trigger the announcement.
Well what I was planning to do was to have 1 plugged in device, and have the phone running the HA app. I would use the RSSI to trigger the announcement.
The HA app has the ability to both become a beacon or scan for beacons, and my question is which one of these is better for battery life.
Then broadcasting a beacon would be more battery efficient than scanning for beacons, also for the fact that scanning would likely also pick up other devices in your home all the time and needing to constantly filter (processor intensive) if your specified beacon is amongst them or not.
So the scanning task should be delegated to the plugged in device.
My general understanding of these processes, so not scientifically proven with battery drainage results
No doubt that scanning takes a lot more phone battery power than broadcasting.
But you should also consider reliability of results. Phone scanners are terrible at “seeing” beacons because the phones are not scanning all the time. Plus you can not control how much time they spend scanning versus how much time they are just resting (i.e. saving battery power. Battery life is THE most important issue/complaint of smartphone users, so smartphone makers put a huge emphasis on it).
So if you choose to use the phone as the virtual beacon, you should get better results (assuming your hardware scanner can be controlled and forced to scan almost all the time).
With both options, you will still not be able to avoid the issue mentioned by DigiH: Smartphones decide on their own when to push your app into the background and give it less computing/scanning resources. They can also decide at any time to shut down your app completely. So no matter which role the phone plays, don’t be surprised if it works well at the start then performance degrades or it stops working completely for no apparent reason. In those cases, the first thing to do for troubleshooting is to restart the app (hard shut it down and reopen) and/or restart the phone. Sometimes turning the phone’s bluetooth off and back on again helps too.
I’m still waiting for a company, hint hint @BlueCharmBeacons , which releases a BLE beacon, easily attached to oneself/clothes, in the Start Trek communicator style, which would allow nice and pretty precise location tracking with well placed BLE scanners when at home. Touching it could trigger any location dependant action …
Ok, geek mode off again.
Interested in an already working solution?
Makes the most sense, when you use the HA companion app on the phones you want to track. And works great!
I am well aware of it, and am/have been using it with very small nrf51822 beacons in 3D printed wearable cases. But it is the cases side plus integrating a capacitive touch button which could be greatly improved by a professional company.
With phone tracking I gave up a long time ago, for the above reliability reason. Only so many times of entering a room and always thinking - do the light go on or not this time, and how fast or slow. Also I do not carry my phone around with me the whole time when at home, a 4g beacon is not noticeable at all
We are working on a Star Trek transporter first, so we can beam people around the globe.
But seriously, we don’t have any plans to make anything like that are this time, but I will keep it in mind. Our current BC021 would do a pretty good job in such a role, but you are right that it is not obvious how to attach it to the outside of clothing. I will keep thinking about this though.
For me, the big issue is still the scanning side. I’m pretty pessimistic about using smartphones as scanners for the reasons I mentioned above. So I am focusing a lot of time now developing a new hardware scanner that is optimized for use with beacons. Stay tuned!
Update: I used the HA app to broadcast the beacon, and receive it with ESPHome. The app doesn’t seem to be getting killed.