NEMO-rs2-access


NameNEMO-rs2-access JSON
Version 1.6.1 PyPI version JSON
download
home_pageNone
SummaryInstall RS2 access plugin for NEMO
upload_time2024-11-20 00:13:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Atlantis Labs LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords nemo
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NEMO RS2 Access plugin

This plugin for NEMO allows to sync up area access with the RS2 Access system.

# Installation

1. `pip install NEMO-rs2-access`
2. in `settings.py` add to `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
  '...',
  'NEMO_rs2_access',
  '...'
]
```
3. add the RS2 access information:
```python
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",
   # Uncomment to change whether to record someone attempting to log into an area they are already logged in as error in logs (default is True)
   # "record_already_logged_in_as_error": True,
}

```
4. enable and start systemd tasks (examples in this [systemd folder](https://gitlab.com/nemo-community/atlantis-labs/nemo-rs2-access/-/tree/main/resources/systemd)):
   * nemo_rs2_sync_readers (every hour or every day)
   * nemo_rs2_sync_access (every minute)

Notes:
1. In Detailed administration -> Customization, a customization with key `rs2_event_begin_date` and date value for example `2023-05-18T19:30:16` can be set prior to the first run to grab data starting at that date.
2. If not set, the system will start syncing from the beginning of the current day
3. 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
1. Run the `sync reader` action via systemd or Detailed administration
2. Edit the relevant readers and associate them with an Area and a type (Entrance or Exit)
3. Set Badge numbers in NEMO users
4. 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:
 1. If the user has only one active project, use it
 2. Check tool usage for this user since login time (non-remote) and create one record for each distinct account
 3. If there is no tool usage, use the default project (set in user preferences)
 4. If there is no default project, use the first active project by relation id (first added)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "NEMO-rs2-access",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "NEMO",
    "author": null,
    "author_email": "Atlantis Labs LLC <atlantis@atlantislabs.io>",
    "download_url": null,
    "platform": null,
    "description": "# NEMO RS2 Access plugin\n\nThis plugin for NEMO allows to sync up area access with the RS2 Access system.\n\n# Installation\n\n1. `pip install NEMO-rs2-access`\n2. in `settings.py` add to `INSTALLED_APPS`:\n```python\nINSTALLED_APPS = [\n  '...',\n  'NEMO_rs2_access',\n  '...'\n]\n```\n3. add the RS2 access information:\n```python\nRS2_ACCESS = {\n  \"url\": \"\",\n  \"timeout\": 30, # timeout in seconds\n  \"public_key\": \"\",\n  \"auth\": {\n    \"user_id\": \"\",\n    \"password\": \"\"\n  },\n   # Uncomment to change the default CardHolder sync field \n   # Choices are \"CardholderId\", \"CardNumber\", \"CardId\", or cardholder attribute like \"UserColumns.UserText1\"\n   # \"user_sync_field\": \"CardNumber\",\n   # Uncomment to use the sync field as an attribute of Cardholder (default is False, meaning it is an attribute of the Event)\n   # \"cardholder_sync\": False,\n   # Uncomment to change the default NEMO sync field, for example `details__employee_id`\n   # \"nemo_user_sync_field\": \"badge_number\",\n   # Uncomment to change the default buffer in seconds, used to prevent potential duplicates and potential missing events between calls to readers\n   # \"buffer_in_seconds\": \"7\",\n   # Uncomment to change whether to record someone attempting to log into an area they are already logged in as error in logs (default is True)\n   # \"record_already_logged_in_as_error\": True,\n}\n\n```\n4. enable and start systemd tasks (examples in this [systemd folder](https://gitlab.com/nemo-community/atlantis-labs/nemo-rs2-access/-/tree/main/resources/systemd)):\n   * nemo_rs2_sync_readers (every hour or every day)\n   * nemo_rs2_sync_access (every minute)\n\nNotes:\n1. In Detailed administration -> Customization, a customization with key `rs2_event_begin_date` and date value for example `2023-05-18T19:30:16` can be set prior to the first run to grab data starting at that date.\n2. If not set, the system will start syncing from the beginning of the current day\n3. 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.\n\n## Usage\n1. Run the `sync reader` action via systemd or Detailed administration\n2. Edit the relevant readers and associate them with an Area and a type (Entrance or Exit)\n3. Set Badge numbers in NEMO users\n4. Run the `sync access` action via systemd or Detailed administration\n\n## Project selection rules\nUpon login, the first active project is selected since all that matters is that we have a placeholder.\n\nWhen updating the record on logout, the project is set using the following rules:\n 1. If the user has only one active project, use it\n 2. Check tool usage for this user since login time (non-remote) and create one record for each distinct account\n 3. If there is no tool usage, use the default project (set in user preferences)\n 4. If there is no default project, use the first active project by relation id (first added)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Atlantis Labs LLC  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Install RS2 access plugin for NEMO",
    "version": "1.6.1",
    "project_urls": {
        "CI": "https://gitlab.com/nemo-community/atlantis-labs/nemo-rs2-access/-/pipelines",
        "Changelog": "https://gitlab.com/nemo-community/atlantis-labs/nemo-rs2-access/-/releases",
        "Homepage": "https://gitlab.com/nemo-community/atlantis-labs/nemo-rs2-access",
        "Issues": "https://gitlab.com/nemo-community/atlantis-labs/nemo-rs2-access/-/issues"
    },
    "split_keywords": [
        "nemo"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd4d28ac9db1da2e89cc964db759b6f89180c00f4c157a0229604cef8a325c20",
                "md5": "d88b9fb9a66b6ca0e7bc72f99d3f0e52",
                "sha256": "cda26d1cd7d1821d6d2f7ba2049f0037de51efe086467bf2e9f6e4405ed0bbee"
            },
            "downloads": -1,
            "filename": "NEMO_rs2_access-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d88b9fb9a66b6ca0e7bc72f99d3f0e52",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 4210,
            "upload_time": "2024-11-20T00:13:40",
            "upload_time_iso_8601": "2024-11-20T00:13:40.079663Z",
            "url": "https://files.pythonhosted.org/packages/bd/4d/28ac9db1da2e89cc964db759b6f89180c00f4c157a0229604cef8a325c20/NEMO_rs2_access-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-20 00:13:40",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "nemo-community",
    "gitlab_project": "atlantis-labs",
    "lcname": "nemo-rs2-access"
}
        
Elapsed time: 0.35344s