Skip to main content

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 OHReceiver (recommended)

import asyncio
from osbornehoffman import OHReceiver, 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 OHReceiver("0.0.0.0", 8996, accounts, on_event) as receiver:
        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

  • OHReceiver - High-level async receiver with lifecycle management (start/stop, context manager)
  • OHServer - Low-level TCP server handling protocol framing and encryption
  • OHAccount - Account configuration (account_id, panel_id, forward_heartbeat)
  • OHEvent - Parsed event dataclass with code, ri, effective_account properties
  • OHKeyStore - JSON-based persistence for V4 AES keys
  • OHVideoServer - TCP server for receiving video clips from panels
  • OHVideoEvent - Parsed video clip event with image data and alarm info
  • MessageType - 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

osbornehoffman-2.2.1.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osbornehoffman-2.2.1-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file osbornehoffman-2.2.1.tar.gz.

File metadata

  • Download URL: osbornehoffman-2.2.1.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for osbornehoffman-2.2.1.tar.gz
Algorithm Hash digest
SHA256 fc4aa052372a1b0a7270c22a44dc21ff5f5c376a303603e64afe9042aafbb718
MD5 1d40bf6569a08148f91708c24493882a
BLAKE2b-256 78bbbeb6474f83aa05fae33ee38607d87f061d3fbfcb0095fc34fde1ab797595

See more details on using hashes here.

File details

Details for the file osbornehoffman-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: osbornehoffman-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for osbornehoffman-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c65099a7a27c88dea110dcbcaaf5b8c1ede6d7dd1339bfc4e80649fd9289da9b
MD5 587ecceac0353020114a78168ff93388
BLAKE2b-256 df7b2a69cf9fc97e7163369d135342752276cd623709647dfaeaa6be808454ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page