How to sync access control events with Milestone ACM plugin?

Hi,

I referred the Demo Access Control Plugin for Milestone. In that plugin implementation, polling is used to fetch events from the Access control system. But I am looking to sync the events with the help of web sockets and API combination.

Diving deep in this, I want to verify if I am not syncing same events multiple times if I use API on the first call to sync historical events and later on use the web sockets for live events.

Is there any way in Milestone ACM plugin through which I can verify whether a specific event is already present in the Milestone database or not?

Thanks,

Tushar

Hi Tushar,

Good morning!

Firstly, there is no way to access events stored in the Milestone database and if you send the same event twice it will be recorded twice with different ids, so there’s no way to ensure that an event is sync or not. A workaround would be storing the last time your ACM system has sync and sync newer events from that moment.

Secondly, syncing old events may fail on a different level. Let’s say you have some rules created to open doors on certain event type. An event of this type is triggered at some moment and you sync this event 2 hours later. Door will open when the rule is executed and it will be 2 hours later than the original event was triggered. I would rather sync always on time, live events.

Hope you have a great day!

Kind regards,

Fer