Skip to main content

Python client library for WyreStorm NetworkHD API operations - matrix switching, device control, video walls, and multiview.

Project description

WyreStorm NetworkHD Python Client

PyPI version Python Support Coverage License: MIT Code style: black

A Python client library for WyreStorm NetworkHD devices, providing a high-level interface for device control and monitoring. Features strongly typed APIs, async/await support, multiple connection types (SSH and RS232), comprehensive API coverage, robust error handling, and real-time notifications.

📖 View Documentation | 🚀 Quick Start | 💻 API Reference | 🔧 Troubleshooting

Installation

pip install wyrestorm-networkhd

# For RS232 support (optional)
pip install wyrestorm-networkhd[rs232]

Quick Start

import asyncio
from wyrestorm_networkhd import NetworkHDClientSSH, NHDAPI

async def main():
    # Create SSH client
    client = NetworkHDClientSSH(
        host="192.168.1.100",
        port=10022,
        username="wyrestorm",
        password="networkhd",
        ssh_host_key_policy="warn"
    )

    # Register notification callbacks for real-time updates
    def on_device_status(notification):
        print(f"Device {notification.device} is {'online' if notification.online else 'offline'}")

    def on_cec_data(notification):
        print(f"CEC data from {notification.device}: {notification.cec_data}")

    client.register_notification_callback("endpoint", on_device_status)
    client.register_notification_callback("cecinfo", on_cec_data)

    # Use async context manager for automatic connection handling
    async with client:
        # Create API wrapper for organized command access
        api = NHDAPI(client)

        # Execute commands and get typed responses
        device_list = await api.api_query.config_get_devicelist()
        matrix_info = await api.api_query.matrix_get()

        # Query device information with typed responses
        devices = await api.api_query.config_get_device_info()
        for device in devices:
            print(f"Device {device.aliasname} ({device.name}) - IP: {device.ip4addr}")

        # Query device status with typed responses
        status_list = await api.api_query.config_get_device_status()
        for status in status_list:
            print(f"Device {status.aliasname} - HDMI out: {status.hdmi_out_active}")
        await api.video_wall.scene_active("office", "splitmode")

        # Real-time notifications are automatically handled in the background

# Run the async function
asyncio.run(main())

📚 Documentation

🌐 Complete Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

wyrestorm_networkhd-2.1.0-py3-none-any.whl (63.1 kB view details)

Uploaded Python 3

File details

Details for the file wyrestorm_networkhd-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wyrestorm_networkhd-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a41513d8eb84bd8fc72d0f1d40a24ac2eecd347c5aa0c4a08b5aa0ffc484a7fa
MD5 69eb6f61b972661e38a24987ef806f1f
BLAKE2b-256 9552e48a3004f9a8004e14c2035d0e8ee226212f04780adfe8ec09f3ada5274a

See more details on using hashes here.

Provenance

The following attestation bundles were made for wyrestorm_networkhd-2.1.0-py3-none-any.whl:

Publisher: release.yml on Matt-Hadley/wyrestorm-networkhd-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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