acr122u-websocket


Nameacr122u-websocket JSON
Version 1.1.1 PyPI version JSON
download
home_page
SummaryA webserver that connects to a acr122u and exposes it over websocket
upload_time2023-04-09 14:32:37
maintainer
docs_urlNone
author
requires_python>=3.11
license
keywords nfc acr acr122u websocket web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ACR122U Websocket

[![PyPI - Version](https://img.shields.io/pypi/v/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
[![PyPI - License](https://img.shields.io/pypi/l/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)

This project enables you to connect an usb ACR122U NFC card scanner to a computer and access it using Socket.IO.

## Features

- Read UUID from nfc cards and send them over Socket.IO.
- Websocket messages to start and stop the polling for cards.
- Websocket messages to give a confirmation or error beep and light signal.
- Automatically reconnect to the reader when interrupted.

## Installation

You can install this package from [PyPI](https://pypi.org/project/acr122u-websocket/).

```shell
pip install acr122u-websocket
```

## Usage

1. Connect the ACR122U reader to the computer
2. Run the app
    ```shell
    python -m acr122u_websocket.app
    ```

## API

You can connect to the webserver using [Socket.IO](https://socket.io).
These are the available events:

<details>
<summary><h3><code>polling</code></h3></summary>

Start or stop the polling.

#### Request

- `start` to start the polling.
- `stop` to stop the polling.

#### Reply

- `no card reader connected` if no card reader is connected.
- `polling started` if the polling has (already) started.
- `polling stopped` if the polling has (already) stopped.
- `invalid message` if the message is neither `start` nor `stop`.

</details>

<details>
<summary><h3><code>status indicator</code></h3></summary>

Set the status indicator.

#### Request

- `confim` to play the confirming status.
- `error` to play the error status.

#### Reply

- `no card reader connected` if no card reader is connected
- `confirm status set` if the confirm beep and light have been show
- `error status set` if the error beep and light have been show
- `invalid message` if the message is neither `confirm` nor `error`

</details>

<details>
<summary><h3><code>card scanned</code></h3></summary>

Broadcasts when a card has been scanned

#### Broadcast

- `{"uuid": [..]}` - An object containing the uuid in the form of a list of integers.

</details>

## Example

See an example webpage at [test.html](acr122u_websocket/templates/test.html).

This page is also served on [`http://localhost:8080/test`](http://localhost:8080/test).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "acr122u-websocket",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "nfc,acr,acr122u,websocket,web",
    "author": "",
    "author_email": "Robert van Dijk <contact@robertvandijk.nl>",
    "download_url": "https://files.pythonhosted.org/packages/65/56/1134cd51efe50b5412da9fa008ec0e0280a302a21c2258208f0888f41db9/acr122u-websocket-1.1.1.tar.gz",
    "platform": null,
    "description": "# ACR122U Websocket\n\n[![PyPI - Version](https://img.shields.io/pypi/v/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)\n[![PyPI - License](https://img.shields.io/pypi/l/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/acr122u-websocket)](https://pypi.org/project/acr122u-websocket/)\n\nThis project enables you to connect an usb ACR122U NFC card scanner to a computer and access it using Socket.IO.\n\n## Features\n\n- Read UUID from nfc cards and send them over Socket.IO.\n- Websocket messages to start and stop the polling for cards.\n- Websocket messages to give a confirmation or error beep and light signal.\n- Automatically reconnect to the reader when interrupted.\n\n## Installation\n\nYou can install this package from [PyPI](https://pypi.org/project/acr122u-websocket/).\n\n```shell\npip install acr122u-websocket\n```\n\n## Usage\n\n1. Connect the ACR122U reader to the computer\n2. Run the app\n    ```shell\n    python -m acr122u_websocket.app\n    ```\n\n## API\n\nYou can connect to the webserver using [Socket.IO](https://socket.io).\nThese are the available events:\n\n<details>\n<summary><h3><code>polling</code></h3></summary>\n\nStart or stop the polling.\n\n#### Request\n\n- `start` to start the polling.\n- `stop` to stop the polling.\n\n#### Reply\n\n- `no card reader connected` if no card reader is connected.\n- `polling started` if the polling has (already) started.\n- `polling stopped` if the polling has (already) stopped.\n- `invalid message` if the message is neither `start` nor `stop`.\n\n</details>\n\n<details>\n<summary><h3><code>status indicator</code></h3></summary>\n\nSet the status indicator.\n\n#### Request\n\n- `confim` to play the confirming status.\n- `error` to play the error status.\n\n#### Reply\n\n- `no card reader connected` if no card reader is connected\n- `confirm status set` if the confirm beep and light have been show\n- `error status set` if the error beep and light have been show\n- `invalid message` if the message is neither `confirm` nor `error`\n\n</details>\n\n<details>\n<summary><h3><code>card scanned</code></h3></summary>\n\nBroadcasts when a card has been scanned\n\n#### Broadcast\n\n- `{\"uuid\": [..]}` - An object containing the uuid in the form of a list of integers.\n\n</details>\n\n## Example\n\nSee an example webpage at [test.html](acr122u_websocket/templates/test.html).\n\nThis page is also served on [`http://localhost:8080/test`](http://localhost:8080/test).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A webserver that connects to a acr122u and exposes it over websocket",
    "version": "1.1.1",
    "split_keywords": [
        "nfc",
        "acr",
        "acr122u",
        "websocket",
        "web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b8d3892d4bf2aeebe556e6fa1fa34e34ea2dfdfb92e9e37b5e78159b6fcd443",
                "md5": "641c6ce218daa2459acbf8845f64d0ed",
                "sha256": "0d43e016809386e9797e635e04d78ba3f7baf28876245304f566f58199de09d8"
            },
            "downloads": -1,
            "filename": "acr122u_websocket-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "641c6ce218daa2459acbf8845f64d0ed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 18228,
            "upload_time": "2023-04-09T14:32:35",
            "upload_time_iso_8601": "2023-04-09T14:32:35.694947Z",
            "url": "https://files.pythonhosted.org/packages/0b/8d/3892d4bf2aeebe556e6fa1fa34e34ea2dfdfb92e9e37b5e78159b6fcd443/acr122u_websocket-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65561134cd51efe50b5412da9fa008ec0e0280a302a21c2258208f0888f41db9",
                "md5": "593125d3acea953fe471df4ee280f5ea",
                "sha256": "5d0edde4ae9b92628f1691db35c0fe1bb7b092b8fc47aace13fd04a267e6f94a"
            },
            "downloads": -1,
            "filename": "acr122u-websocket-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "593125d3acea953fe471df4ee280f5ea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17275,
            "upload_time": "2023-04-09T14:32:37",
            "upload_time_iso_8601": "2023-04-09T14:32:37.196009Z",
            "url": "https://files.pythonhosted.org/packages/65/56/1134cd51efe50b5412da9fa008ec0e0280a302a21c2258208f0888f41db9/acr122u-websocket-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-09 14:32:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "acr122u-websocket"
}
        
Elapsed time: 0.05920s