Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prmac implementation #187

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions TheengsGateway/ble_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,14 @@ def decode_advertisement(

if decoded_json:
decoded_json = json.loads(decoded_json)

if "prmac" in decoded_json:
address = decoded_json.get("id")
if address in self.configuration["identities"]:
decoded_json.pop("prmac", None)
else:
decoded_json["type"] = "RMAC"
koenvervloesem marked this conversation as resolved.
Show resolved Hide resolved

# Only process if the device is not a random mac address
if decoded_json["type"] != "RMAC":
# Only add manufacturer if device is compliant and no beacon
Expand Down
Loading