Skip to main content

XP Protocol Communication Tools

Project description

🔌 XP Protocol Communication Tool

A powerful Python CLI and API toolkit for CONSON XP Protocol operations

Control and communicate with XP devices through console bus (Conbus), parse telegrams in real-time, and integrate with smart home systems like Apple HomeKit.


✨ Key Features

🚀 Real-time Communication Connect directly to XP130/XP230 servers with bidirectional TCP communication

📡 Smart Telegram Processing Parse and validate event, system, and reply telegrams with built-in checksum verification

🏠 HomeKit Integration Bridge XP devices to Apple HomeKit for seamless smart home control

🔍 Device Discovery Automatically discover XP servers and scan connected modules on your network

Modern Architecture FastAPI REST endpoints and comprehensive type safety


🚀 Quick Start

# Install with PIP (recommended)
pip install conson-xp

# Parse a telegram
xp telegram parse "<E14L00I02MAK>"

# Discover XP servers on your network
xp conbus discover

# Start the REST API server
xp api start

📦 Installation

Using PIP (Recommended)

pip install conson-xp

Development Installation

# Using PDM

git clone <repository-url>

pip install pdm

pdm install -G dev

📚 Usage

🎯 Core Operations

Telegram Processing

# Parse any telegram (auto-detect type)
xp telegram parse "<E14L00I02MAK>"
xp telegram parse "<S0020012521F02D18FN>"
xp telegram parse "<R0020012521F02D18+26,0§CIL>"

# Validate telegram integrity
xp telegram validate "<E14L00I02MAK>"

Device Communication

# Discover XP servers on your network
xp conbus discover

# Connect and scan for modules
xp conbus scan <host> <port>

# Control device outputs
xp conbus output <host> <port> <module_id> <datapoint> <value>

# Blink device for identification
xp conbus blink <host> <port> <module_id> <datapoint>

Module Information

# Get module details
xp module info 14
xp module search "push button"

# List available modules
xp module list --group-by-category

🔧 Advanced Features

Real-time Operations
# Listen for real-time telegrams
xp conbus receive <host> <port>

# Send custom telegrams
xp conbus custom <host> <port> <telegram>

# Read/write datapoints
xp conbus datapoint read <host> <port> <module_id> <datapoint>
xp conbus datapoint write <host> <port> <module_id> <datapoint> <value>
Checksum Operations
# Calculate and validate checksums
xp checksum calculate "E14L00I02M"
xp checksum validate "E14L00I02M" "AK"
xp checksum calculate "E14L00I02M" --algorithm crc32
File Processing
# Process telegram files
xp file parse telegrams.txt
xp file extract-telegrams mixed-data.txt

🌐 API & Integration

REST API Server

# Start API server with interactive docs at /docs
xp api start

HomeKit Smart Home Bridge

# Set up HomeKit integration
xp homekit config validate
xp homekit start
Module emulators
# Start XP protocol servers
xp server start
xp reverse-proxy start

🏗️ Architecture

Layered Design

CLI Layer → API Layer → Services → Models → Connection Layer

Key Components: Telegram processing • Real-time Conbus communication • HomeKit bridge • Multiple XP server support • Configuration management


🛠️ Development

Quick Development Setup

# Run tests with coverage
pdm run test

# Code quality checks
pdm run lint && pdm run format && pdm run typecheck

# All quality checks at once
pdm run check
Project Structure
src/xp/
├── api/           # FastAPI REST endpoints
├── cli/           # Command-line interface
├── models/        # Core data models
├── services/      # Business logic
└── utils/         # Utility functions

Requirements: Python 3.10+ • FastAPI • Pydantic • Click • HAP-python

License

MIT License - see LICENSE file for details.

Notice

This software is developed for interoperability purposes only under fair use provisions and EU Software Directive Article 6. See NOTICE.md for full details on intellectual property compliance.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conson_xp-0.9.16.tar.gz (157.3 kB view details)

Uploaded Source

Built Distribution

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

conson_xp-0.9.16-py3-none-any.whl (129.9 kB view details)

Uploaded Python 3

File details

Details for the file conson_xp-0.9.16.tar.gz.

File metadata

  • Download URL: conson_xp-0.9.16.tar.gz
  • Upload date:
  • Size: 157.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.9 CPython/3.9.23 Darwin/24.6.0

File hashes

Hashes for conson_xp-0.9.16.tar.gz
Algorithm Hash digest
SHA256 0f1ea5b31e4f5862c550adbb14ac9719872cd5858ba77f5be53a5939c8326add
MD5 308ba8a60f521448de9a66c8540c8671
BLAKE2b-256 1ceaa7c79ec90d6e959702ef196606d01d6496a63449c6b7dd49c869a65b0cd7

See more details on using hashes here.

File details

Details for the file conson_xp-0.9.16-py3-none-any.whl.

File metadata

  • Download URL: conson_xp-0.9.16-py3-none-any.whl
  • Upload date:
  • Size: 129.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.9 CPython/3.9.23 Darwin/24.6.0

File hashes

Hashes for conson_xp-0.9.16-py3-none-any.whl
Algorithm Hash digest
SHA256 6b278ff7366e1de4e2b8826290c6df098df3f3831085b5af9b2a08bb4a2e696a
MD5 1ba2af8fb4d34c2640eaadaf5f0fa09a
BLAKE2b-256 10be0f79c9b03249ef5fe0b859f000c792e32cf58af35640e70942e2073155bc

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