diff --git a/README.md b/README.md deleted file mode 100644 index 1d3fd44..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 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](http://www.osdp-connect.com). - -This project is highly inspired by @bytedreamer 's [OSDP.Net](https://github.com/bytedreamer/OSDP.Net) diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..8b02561 --- /dev/null +++ b/README.rst @@ -0,0 +1,48 @@ +=========== +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](http://www.osdp-connect.com). + +This project is highly inspired by @bytedreamer's `OSDP.Net ` + + +License +------- + - Apache + +Quick Start +----------- + +Installation +------------ + +To install OSDP, use `pip `_ or `pipenv `_: + +.. code-block:: console + + $ pip 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() +