Mobile beacon automation suggestions

I have been experimenting with the tracking of mobile beacons (for things such as keys), using a custom solution which pushes the current phone location via MQTT when the beacon is in range (OwnTracks doesn’t support mobile beacons on Android and beacon support is apparently due to be removed completely from the Android app). This appears to be working fine and I can see the state of the beacon change.
I am now trying to create an automation which will be triggered if the state of the beacon is not the same as the state of the phone. Ideally I don’t want to tie it to specific states (e.g. phone away while keys are home) and I want to trigger it for any case where the two devices are in different places.
What would the best trigger be for this?

Hello Steven! Few month ago I’ve tried ‘BeaconMQTT’ Android App from Gjermund Bjaanes. It looks suitable for your (and my) requirement. Unfortanutely it isn’t updated for a long time. It wouldn’t work on Android 8+ as expected.

Right now I’m in prgress with my own app. It also based on AltBeacon and Paho MQTT libraries. It has ugly UI but works perfectly with MQTT device tracker module of my HA. I place several screenshorts bellow.


Most activity done in background. I done templating subsystem for MQTT topic and payload. %mac% - is my WiFi mac. %beacon_id% - is the name of beacon in known beacon’s database. These key words will be changed by actual values before sending. Lots of parameters such us server parameters and beacon database are static now.

If anybody interested in such solution, please let me know and I can share it with you.

1 Like

@Turbo: I am interested in testing your app. I am also searching for a reliable solution to use beacons on android and my home assistant setup to trigger automations. If you want to share it with me I will provide interesting use cases in my enviroment.

Hi @rafuz! Would link to my github with source be suitable? Could you make apk from sources?

I have to ask you because I don’t have google play account yet. Google requires $25 fee. Unfortunately I don’t have free $25 for that.

@Turbo I would also be keen to test your application now that OwnTracks no longer supports iBeacons. Are you planning to release this on GitHub as an APK?

It make sense, yea. I have to finish the database for known beacons. I’ll try it in this weekend. But can take couple of weeks.

Looking forward to hearing how you get on. MQTT username and password security of course will be very important as I, like many others, want to use this as part of securely entering our property.
I am using Bytereal Beacons

Bytereal iBeacons

Hello everyone!

Thanks for waiting. Today I am ready to introduce my first public release:

How are you getting these to work? I can see them with light blue but a can’t get any other beacon app to see them…

Nvm, I figured it out

Hi David, did you mean LightBlue® Explorer app?

Yeah. I got past my issue.

I have my three beacons being read by MQTT Beacon. They are passing messages thru to my broker.
However two of the three beacons are only about 6 meters part. One is in my garage and one is in my study.
I want to have my automations open my garage door (between certain hours) if my garage beacon sees me arrive.
Any examples of this? I have use “location/simon” as the topic, since it is my mobile phone that sees the beacon and sends an MQTT message. I have used %beacon% as the entry payload so I get payloads of “garage”, “study” and “lounge” when I enter these zones
You suggest “not_home” as the exit payload, but in fact I am at home, I assume I should just have “exit_%beacon” as the payload so my messages would be “exit_lounge” etc

Hi Simon!

If you don’t mind let’s move to my thread. Any general questions can be useful for other users too.