https://github.com/ryanhz/osdp-python
A Python control panel implementation of the Open Supervised Device Protocol (OSDP)
https://github.com/ryanhz/osdp-python
access-control osdp osdp-python protocol python-framework
Last synced: about 2 months ago
JSON representation
A Python control panel implementation of the Open Supervised Device Protocol (OSDP)
- Host: GitHub
- URL: https://github.com/ryanhz/osdp-python
- Owner: ryanhz
- License: apache-2.0
- Created: 2019-11-18T04:34:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-29T06:29:30.000Z (about 5 years ago)
- Last Synced: 2025-09-28T23:15:26.897Z (3 months ago)
- Topics: access-control, osdp, osdp-python, protocol, python-framework
- Language: Python
- Homepage:
- Size: 143 KB
- Stars: 39
- Watchers: 9
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
===========
OSDP Python
===========
OSDP Python is a python framework implementation of the Open Supervised Device Protocol (OSDP). This protocol has been adopted by the Security Industry Association(SIA) to standardize communication to access control hardware. Further information can be found at `http://www.osdp-connect.com `_.
This project is highly inspired by @bytedreamer's `OSDP.Net `
License
-------
- Apache
Quick Start
-----------
Installation
------------
To install OSDP, use `pip3 `_ or `pipenv `_:
.. code-block:: console
$ pip3 install -U osdp
This module depends on
- pycryptodome
- pyserial
Example Usage
~~~~~~~~~~~~~
.. code-block:: python
>>> from osdp import *
>>> conn = SerialPortOsdpConnection(port='/dev/tty.wchusbserial1420', baud_rate=9600)
>>> cp = ControlPanel()
>>> bus_id = cp.start_connection(conn)
>>> cp.add_device(connection_id=bus_id, address=0x7F, use_crc=True, use_secure_channel=False)
>>> id_report = cp.id_report(connection_id=bus_id, address=0x7F)
>>> device_capabilities = cp.device_capabilities(connection_id=bus_id, address=0x7F)
>>> local_status = cp.local_status(connection_id=bus_id, address=0x7F)
>>> input_status = cp.input_status(connection_id=bus_id, address=0x7F)
>>> output_status = cp.output_status(connection_id=bus_id, address=0x7F)
>>> cp.shutdown()