I bought a few of these keychain iBeacons, and one of these AprilBeacon iBeacon Wireless Receivers and configured it to connect to Mosquitto. The JSON data, as described in the wiki, has all of the UUIDs semicolon-separated in a single key named “raw_beacons_data”
The way I parsed the data was to create a sensor like this, and used the MAC address and UUID as a unique identifier.
platform: mqtt
state_topic: “/beacons”
name: “My iBeacon”
value_template: ‘{% if “987AF32E05765A4BCFCE174E4BACA814092E77F6B7E5” in value_json.raw_beacons_data %} home {% else %} not_home {% endif %}’
I could then add this in a group to see the state as “home” or “not_home” and act accordingly in automations.
sensor.my_ibeacon
So, my question is… is there better way of accomplishing the parsing of the JSON data to look for, and act upon a unique UUID? Is using a “sensor” appropriate? I would think that a MQTT Device Tracker would be more appropriate, but I couldn’t see a way to parse the data.
I’m just curious how anyone else has done this, or would go about doing it.
Thanks!