Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

BLE Gateway (BLE Beacons) and MQTT JSON files

$
0
0

@daggy72 wrote:

I am trying to get some BLE Beacons/Sensors to work in HomeAssistant but I am having some troubles with the MQTT JSON file the Gateway broadcasts. It’s not one topic per sensor but one JSON file containing an array including all the various sensors and beacons.

hardware:

Objective: I would like to create sensors for each parameter of each device. The only way to distinguish the devices is via their MAC addresses. I know for example that the MAC address “AC233FA29263” is the device in my living room. I would like to log/record the Temperature and Humidity as well as the rssi and battery levels (to create automations that will alert me when the devices are offline or the battery level drops below a certain level)

MQTT JSON output:

[
    {
        "timestamp": "2020-03-29T16:58:11.341Z",
        "type": "Gateway",
        "mac": "AC233FC064F3",
        "gatewayFree": 87,
        "gatewayLoad": 1.17
    },
    {
        "timestamp": "2020-03-29T16:58:11.341Z",
        "type": "iBeacon",
        "mac": "AC233FA29261",
        "bleName": "",
        "ibeaconUuid": "E2C56DB5DFFB48D2B060D0F5A71096E0",
        "ibeaconMajor": 0,
        "ibeaconMinor": 0,
        "rssi": -51,
        "ibeaconTxPower": -59,
        "battery": 0
    },
    {
        "timestamp": "2020-03-29T16:58:11.525Z",
        "type": "S1",
        "mac": "AC233FA29261",
        "bleName": "",
        "rssi": -64,
        "battery": 100,
        "temperature": 20.24,
        "humidity": 57.34
    },
    {
        "timestamp": "2020-03-29T16:58:11.530Z",
        "type": "iBeacon",
        "mac": "AC233FA29263",
        "bleName": "",
        "ibeaconUuid": "E2C56DB5DFFB48D2B060D0F5A71096E0",
        "ibeaconMajor": 0,
        "ibeaconMinor": 0,
        "rssi": -71,
        "ibeaconTxPower": -59,
        "battery": 0
    },
    {
        "timestamp": "2020-03-29T16:58:11.550Z",
        "type": "S1",
        "mac": "AC233FA293DC",
        "bleName": "",
        "rssi": -66,
        "battery": 100,
        "temperature": 17.93,
        "humidity": 51.44
    },
    {
        "timestamp": "2020-03-29T16:58:11.830Z",
        "type": "S1",
        "mac": "AC233FA29262",
        "bleName": "",
        "rssi": -68,
        "battery": 100,
        "temperature": 18.44,
        "humidity": 52.76
    },

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>