mKeRix / room-assistant

Presence tracking and more for automation on the room-level
https://www.room-assistant.io
MIT License
1.27k stars 122 forks source link

UUID is incorrectly read; always set as the mac for BLE scanner #28

Closed gruijter closed 4 years ago

gruijter commented 6 years ago

I have a raspberry pi zero W with the following in local.json:

  "ble": {
    "enabled": true,
    "channel": "room_presence",
    "max_distance": 30,
    "whitelist": [],
    "use_mac": false,
    "system_noise": 0.01,
    "measurement_noise": 3,
    "update_frequency": 0
  }
}

But I always get the mac as ID, and never the UUID:

{"id":"f69e2d86fe4a","name":"MI Band 2","rssi":-74,"distance":13.58329930223587}

I really need to get the UUID and not the (ever changing) MAC. What am I doing wrong?

mKeRix commented 6 years ago

The config looks right to me. It might be related to how the band handles its advertisements (specifically if it tries to prevent tracking). Since Google didn't give me any meaningful results, it would probably make sense to look at the raw data that is received. I will try to get that in as an option asap so we can debug this further.

EDIT: Just read your other reply, we need a way to publish the correct UUID for the BLE component. I'll take a look!