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

Update websocket events #93

Open
imhotep opened this issue Jan 29, 2025 · 3 comments
Open

Update websocket events #93

imhotep opened this issue Jan 29, 2025 · 3 comments
Assignees

Comments

@imhotep
Copy link
Owner

imhotep commented Jan 29, 2025

There is an interesting new websocket event that could potentially replace "access.data.device.update". Simplify the code a lot, add support for more hubs like the new UA-Hub-Door-Mini

{
  "event": "access.data.v2.location.update",
  "receiver_id": "",
  "event_object_id": "f8e851da-372f-494d-bcee-9204981d3da8",
  "save_to_history": false,
  "data": {
    "id": "e38c3f8a-bb95-4bd7-9699-613b85ca8e26",
    "location_type": "door",
    "name": "Front Gate",
    "up_id": "d447d472-d5e5-4aa7-9f5f-7634f658a74b",
    "extras": null,
    "device_ids": [
      "70a74120c937",
      "784558bd9f7b",
      "f4e2c6c21d37",
      "65c7a6ac02925f03e40250f7",
      "66085eed03c5e203e414cb2e"
    ],
    "guard": [
      {
        "id": "16dea135-2eb7-4bb4-ad66-296db292aa3f",
        "name": "Anis Kadri",
        "alias": "",
        "first_name": "Anis",
        "last_name": "Kadri",
        "avatar": "https://192.168.6.176/proxy/users/public/avatar/201216e3-2efd-406d-8f27-a82eb05ba3e9"
      }
    ],
    "state": {
      "lock": "locked",
      "dps": "close",
      "emergency": {
        "software": "none",
        "hardware": "none"
      }
    },
    "thumbnail": {
      "type": "thumbnail",
      "url": "/preview/reader_f4e2c6c21d37_e38c3f8a-bb95-4bd7-9699-613b85ca8e26_1738127039.jpg",
      "door_thumbnail_last_update": 1738127039
    },
    "last_activity": 1738129299
  },
  "meta": {
    "object_type": "location",
    "target_field": null,
    "all_field": true,
    "id": "e38c3f8a-bb95-4bd7-9699-613b85ca8e26",
    "source": ""
  }
}

@slyglif can you confirm that you're also getting this event on your UGT, UAH-Ent, UA-Ultra ? Does it look like this for all of your gates/ doors? I am hoping that every door/gate gets an event like the one above and we can just rely on this instead of weird configs/relays.

The other interesting thing too is that the event has a "thumbnail" field that shows an image of the person who unlocked the door/gate. I tried getting through the API and it worked. We can create an extra image entity to show who unlocked a door last.

@imhotep imhotep self-assigned this Jan 29, 2025
@slyglif
Copy link
Contributor

slyglif commented Jan 29, 2025 via email

@rhdny
Copy link

rhdny commented Feb 2, 2025

I have the UAH-Ent and can help. Just give me some guidance...

@imhotep
Copy link
Owner Author

imhotep commented Feb 2, 2025

@rhdny awesome! Can you follow these steps and attach the log file to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants