Python 3 package to interface with Osborne Hoffman panels.
Project description
osbornehoffman
Python 3 package to interface with Osborne-Hoffman (OH+CID, OH+SIA or OH+XSIA) compatible panels:
- CSX75 Panel Range (CS7050(N) TCP/IP gateway)
- CSX75 Panel Range (CS9104/9204 Video Verification Module)
- CSX75 Panel Range (CS7002(N) GSM/GPRS module)
- ATS MASTER Panel range (ATS2xxx, ATS3xxx, ATS4xxx with ATS1806 or ATS1809)
- ATS Advanced (with TDA74xx GRPS/IP modules or ATS7310 GSM/GPRS module)
- ATS Advanced IP (ATSx000A-IP, ATSx500A-IP)
- NetworX Panel Range (NX-590(N)E TCP/IP gateway)
- NetworX Panel Range (NX-9104/9204 Video Verification Module)
- NetworX Panel Range (NX-7002(N) GSM/GPRS module)
- Simon Panel Range (60-938)
Protocol Support
- V1-V3: 3DES/ECB encryption with XOR-scrambled key handshake
- V4: AES-256/CBC encryption with Diffie-Hellman key exchange and IV mixing
The Osborne-Hoffman protocol is a TCP overlay protocol where the server sends a scrambled 192-bit 3DES key to the panel. V4 extends this with a Diffie-Hellman negotiation for AES-256 key derivation.
Installation
pip install osbornehoffman
Requires Python >= 3.10 and pycryptodome.
Usage
Using OHClient (recommended)
import asyncio
from osbornehoffman import OHClient, OHAccount, OHEvent
async def main():
async def on_event(event: OHEvent) -> None:
print(f"Event: code={event.code}, account={event.effective_account}")
accounts = [OHAccount("001234")]
async with OHClient("0.0.0.0", 8996, accounts, on_event) as client:
await asyncio.Event().wait() # run forever
asyncio.run(main())
Using OHServer directly
import asyncio
from osbornehoffman import OHServer, OHAccount
async def main():
async def process_event_cb(event: dict) -> bool:
print("Processing event")
return True
accounts = {"001234": OHAccount("001234")}
server = OHServer("0.0.0.0", 8996, accounts, process_event_cb)
await server.start_server()
async with server.server:
await server.server.serve_forever()
asyncio.run(main())
Key Classes
OHClient- High-level async client with lifecycle management (start/stop, context manager)OHServer- Low-level TCP server handling protocol framing and encryptionOHAccount- Account configuration (account_id, panel_id, forward_heartbeat)OHEvent- Parsed event dataclass withcode,ri,effective_accountpropertiesOHKeyStore- JSON-based persistence for V4 AES keysMessageType- Enum for event types (SIA, CID, HB_V1, HB_V2, DHR, V4)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osbornehoffman-2.0.0.tar.gz.
File metadata
- Download URL: osbornehoffman-2.0.0.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0380eedbcf0feb030205bc40bf4b34c5d3c9799503d6707903a9057696d0c4da
|
|
| MD5 |
0ee4f560b6ce1b558ae66d4c4df3874d
|
|
| BLAKE2b-256 |
75c2cee18be47d8286fbf0d8966e63b2e84c629ef127d97116f773b298a7c8e4
|
File details
Details for the file osbornehoffman-2.0.0-py3-none-any.whl.
File metadata
- Download URL: osbornehoffman-2.0.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96f58321d23c9143a6c54939adfa8e4273d3724caac41e8de39045f645313b7e
|
|
| MD5 |
b1678d6bd13fc450fb1fe6ff0a0eba73
|
|
| BLAKE2b-256 |
a55b62a339feca717440ca50066ecc6e07005adb5963f2bae8a60f742146ca9f
|