Install RS2 access plugin for NEMO
Project description
NEMO RS2 Access plugin
This plugin for NEMO allows to sync up area access with the RS2 Access system.
Installation
pip install NEMO-rs2-access
- in
settings.py
add toINSTALLED_APPS
:
INSTALLED_APPS = [
'...',
'NEMO_rs2_access',
'...'
]
- add the RS2 access information:
RS2_ACCESS = {
"url": "",
"timeout": 30, # timeout in seconds
"public_key": "",
"auth": {
"user_id": "",
"password": ""
},
# Uncomment to change the default CardHolder sync field
# Choices are "CardholderId", "CardNumber", "CardId", or cardholder attribute like "UserColumns.UserText1"
# "user_sync_field": "CardNumber",
# Uncomment to use the sync field as an attribute of Cardholder (default is False, meaning it is an attribute of the Event)
# "cardholder_sync": False,
# Uncomment to change the default NEMO sync field, for example `details__employee_id`
# "nemo_user_sync_field": "badge_number",
# Uncomment to change the default buffer in seconds, used to prevent potential duplicates and potential missing events between calls to readers
# "buffer_in_seconds": "7",
}
- enable and start systemd tasks (examples in this systemd folder):
- nemo_rs2_sync_readers (every hour or every day)
- nemo_rs2_sync_access (every minute)
Notes:
- In Detailed administration -> Customization, a customization with key
rs2_event_begin_date
and date value for example2023-05-18T19:30:16
can be set prior to the first run to grab data starting at that date. - If not set, the system will start syncing from the beginning of the current day
- The systemd tasks can also be run manually from Detailed admin -> RS2 Access -> Reader -> select any reader (doesn't matter which one) and use the action dropdown to run the sync.
Usage
- Run the
sync reader
action via systemd or Detailed administration - Edit the relevant readers and associate them with an Area and a type (Entrance or Exit)
- Set Badge numbers in NEMO users
- Run the
sync access
action via systemd or Detailed administration
Project selection rules
Upon login, the first active project is selected since all that matters is that we have a placeholder.
When updating the record on logout, the project is set using the following rules:
- If the user has only one active project, use it
- Check tool usage for this user since login time (non-remote) and create one record for each distinct account
- If there is no tool usage, use the default project (set in user preferences)
- If there is no default project, use the first active project by relation id (first added)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file NEMO_rs2_access-1.5.3-py3-none-any.whl
.
File metadata
- Download URL: NEMO_rs2_access-1.5.3-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e935e75232e013142ad082f64b9f5192ee9ee12cc6334729583235b420d95709 |
|
MD5 | d865a1871621ae75e2053b0789815866 |
|
BLAKE2b-256 | 43602d91139d12513eaae809b43f7180716d006528de3ccc16788811637510ce |