Hi together,
I would like to implement a alarm system via plugin integration.
Compared to an access control you have different types of elements with multiple different states.
What is the best way to achieve that?
The preferred result would be something like your DemoAccessControlPlugin.
Best regards
Before Milestone developed the Access Control Module framework the Sensor Monitor sample actually had the title “Access Control”, the sample has since been renamed to make it clear that it can be used for a very diverse range of scenarios. From what you write I have an idea that there is a good fit and my best advise would be for you to explore the Sensor Monitor sample.
https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/sensormonitor/readme.html&tree=tree_1.html
https://github.com/milestonesys
Thank you for the hint. I’ve played around with the plugin a bit and designed a suitable structure.
The following questions have arisen in the process:
-
Where can the reception of data (e.g. via TCP Listener) be implemented? I would have guessed the BackgroundPlugin, but according to the description, it is only active as long as the application (Management Client? Smart Client?) is running.
-
How can potentially received data be linked with the respective components?
Best regards
BackGround plugin runs in the Event Server, controlled by “public override List<VideoOS.Platform.EnvironmentType> TargetEnvironments”, and that means it runs always. I guess this is also where you would implement and get external communication and control the components.
Thank you. Data can now be transmitted. How do I get the existing sensors and controllers with their current states? And how to set those states?
Sorry for asking that much, but I cannot find any documentation.
With the sample running in the Event Server, you can see GetItem, it uses GetItemConfiguration. Also in the sample you have the dictionary- public static Dictionary<Guid, bool> SensorActiveState
You can see how this static dictionary governs how the MapIconKey sets a different icon
The sample is rather large and is documented by the inline comments and summaries, I hope you can find your way around it.
This might also prove helpful. https://developer.milestonesys.com/s/article/debugging-techniques-for-Event-Server-plugins