Hi, I am looking for help on how to process a JSON I receive via MQTT from the BLE iBeacon hub (Minew BLE G1, a BLE 5.0 Wifi Gateway). The JSON contains multiple beacons under one MQTT Topic, the MAC address shoudl identify the beacon. I need to record battery state, temperature and humidity in HomeAssistant for logging and for use in other automations (turn on/off ventilation/heating/airco/etc).
Below an example of a single message received via MQTT on the topic beacon from the hub.
I was looking at this project but my problem is that I have multiple sensors within one single topic. How do I use the MAC address to distinguish them?
Message 0 received on beacon at 8:08 AM:
[
{
"timestamp": "2020-10-15T06:08:33.793Z",
"type": "S1",
"mac": "AC233FA29263",
"bleName": "",
"rssi": -38,
"battery": 100,
"temperature": 21.43,
"humidity": 37.91
},
{
"timestamp": "2020-10-15T06:08:36.777Z",
"type": "S1",
"mac": "AC233FA293DC",
"bleName": "",
"rssi": -29,
"battery": 100,
"temperature": 20.47,
"humidity": 40.97
}
]