Repository navigation
platform sdk enrolling an access control unit
Enroll an access control unit, such as a Synergis Cloud Link or an HID controller, in an AccessManagerRole. After successful enrollment, the unit appears as a Unit entity owned by the Access Manager role and is ready to receive interface modules.
- The target access manager role must be running.
- You must know the unit's IP address, the access control extension type the unit runs (for example,
CloudLink,SMC,VertX), the port, and login credentials. - Only one access control unit enrollment can be in progress at a time.
EnrollAccessControlUnitthrowsSdkExceptionwhen called while another enrollment is still pending.
-
Subscribe to the three enrollment events on
IAccessControlUnitManagerbefore sending the request. The progress event enables the integration to drive a UI; the success/fail events report the terminal outcome.engine.AccessControlUnitManager.UnitEnrollmentUpdated += (sender, e) => Console.WriteLine($"State: {e.State}, progress: {e.ProgressPercent}%"); engine.AccessControlUnitManager.UnitEnrollmentSucceeded += (sender, e) => Console.WriteLine($"Enrolled: {e.UnitEndPoint}"); engine.AccessControlUnitManager.UnitEnrollmentFailed += (sender, e) => Console.WriteLine($"Failed: {e.UnitEndPoint}, {e.ActionDetails}");
-
Build an
AddAccessControlUnitInfowith the unit's address, extension type, port, and credentials, then callEnrollAccessControlUnitwith the unit info and the access manager role guid. The example usesNetworkCredential.SecurePasswordto convert a plaintext password into aSecureString. The return value reports whether the request was sent, not whether enrollment succeeded.var unitInfo = new AddAccessControlUnitInfo( address: IPAddress.Parse("192.168.1.100"), extensionType: AccessControlExtensionType.CloudLink, port: 443, username: "admin", password: new NetworkCredential("", "admin-password").SecurePassword); bool requestSent = engine.AccessControlUnitManager .EnrollAccessControlUnit(unitInfo, accessManagerRoleGuid);
-
Wait for
UnitEnrollmentSucceeded. This event confirms the enrollment but does not carry the new unit's GUID; that GUID arrives throughengine.EntitiesAdded. Subscribe toEntitiesAddedbefore you enroll, and when it is raised, take the GUID of the added entity whoseEntityTypeisUnitand pass it toengine.GetEntity<Unit>. -
Attach interface modules to the newly enrolled unit. See Adding an interface module for the construction details.
For HID VertX units running newer firmware, secure mode must be enabled, or FTP, Telnet, and SSH must be enabled on the controller's web page, before enrollment succeeds. Use the AddAccessControlUnitInfo constructor that takes secureMode and translatedHostIp:
var unitInfo = new AddAccessControlUnitInfo(
address: IPAddress.Parse("192.168.1.100"),
extensionType: AccessControlExtensionType.VertX,
port: 443,
username: "admin",
password: new NetworkCredential("", "admin-password").SecurePassword,
translatedHostIp: "10.0.0.50",
secureMode: true);- About access control units and interface modules: The unit entity and interface-module construction.
- About access control: The access control hub.
- Door templates: Apply standardized door configuration across newly enrolled doors.
- Overview
- Connecting to Security Center
- SDK certificates
- Referencing SDK assemblies
- ASP.NET hosting
- SDK compatibility
- Migrating to modern .NET
- Entities
- Entity cache
- Entity loading, cache, and query options
- Detecting entity changes
- Entity change event reference
- Transactions
- Security Center events
- Actions
- Security Desk
- Custom events
- Event-to-actions
- Managing macros
- ReportManager
- ReportManager query reference
- Access control raw events
- DownloadAllRelatedData and StrictResults
- Privileges
- Partitions
- Entity write restrictions
- About custom fields
- About video
- About cameras
- Enrolling a video unit
- Ingesting third-party video
- Archiver and auxiliary archiver roles
- Archive transfer
- About access control
- About cardholders and credentials
- About doors, areas, elevators, and access points
- About access rules and schedules
- About access control units and interface modules
- Enrolling an access control unit
- Door templates
- Visitors
- Mobile credentials
- About threat levels
- About alarms
- About incidents
- Maps
- Logging
- Overview
- Localization
- Certificates
- Lifecycle
- Threading
- State management
- Configuration
- Restricted configuration
- Events
- Queries
- Request manager
- Database
- Entity ownership
- Engine extensions
- Entity mappings
- Server management
- Custom privileges
- Custom entity types
- Resolving non-SDK assemblies
- Deploying plugins
- Modern .NET support
- Overview
- Localization
- Certificates
- Creating modules
- Tasks
- Pages
- Components
- Tile extensions
- Services
- Contextual actions
- Custom actions
- Options extensions
- Configuration pages
- Monitors
- Shared components
- Commands
- Extending events
- Map extensions
- Timeline providers
- Image extractors
- Credential encoders
- Credential readers
- Cardholder fields extractors
- Badge printers
- Content builders
- Dashboard widgets
- Incidents
- Logon providers
- Pinnable content builders
- Custom report pages
- Overview
- Getting started
- Media file formats
- MediaPlayer
- VideoSourceFilter
- MediaExporter
- MediaFile
- G64 converters
- FileCryptingManager
- PlaybackSequenceQuerier
- PlaybackStreamReader
- OverlayFactory
- PtzCoordinatesManager
- AudioTransmitter
- AudioRecorder
- AnalogMonitorController
- Camera blocking
- Overview
- Getting started
- Referencing entities
- Entity operations
- About access control in the Web SDK
- About video in the Web SDK
- Users and user groups
- Partitions
- Custom fields
- Custom card formats
- Actions
- Events and alarms
- Incidents
- Reports
- Tasks
- Macros
- Custom entity types
- System endpoints
- Performance guide
- Reference
- Endpoints
- Constants
- Enumerations
- Under the hood
- Troubleshooting