Skip to main content

LCN-PCK library

Project description

pypck - Asynchronous LCN-PCK library written in Python

GitHub release (latest SemVer) GitHub Workflow Status (dev branch) Codecov branch PyPI - Downloads pre-commit

Buy Me A Coffee

Overview

pypck is an open source library written in Python which allows the connection to the LCN (local control network) system. It uses the vendor protocol LCN-PCK. To get started an unused license of the coupling software LCN-PCHK and a hardware coupler is necessary.

pypck is used by the LCN integration of the Home Assistant project.

Example

"""Example for switching an output port of module 10 on and off."""
import asyncio

from pypck.connection import PchkConnectionManager
from pypck.lcn_addr import LcnAddr

async def main():
    """Connect to PCK host, get module object and switch output port on and off."""
    async with PchkConnectionManager(
        "192.168.2.41",
        4114,
        username="lcn",
        password="lcn",
        settings={"SK_NUM_TRIES": 0},
    ) as pck_client:
        module = pck_client.get_device_connection(LcnAddr(0, 10, False))

        await module.dim_output(0, 100, 0)
        await asyncio.sleep(1)
        await module.dim_output(0, 0, 0)

asyncio.run(main())

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

pypck-0.9.15a2.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

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

pypck-0.9.15a2-py3-none-any.whl (45.3 kB view details)

Uploaded Python 3

File details

Details for the file pypck-0.9.15a2.tar.gz.

File metadata

  • Download URL: pypck-0.9.15a2.tar.gz
  • Upload date:
  • Size: 55.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pypck-0.9.15a2.tar.gz
Algorithm Hash digest
SHA256 13d7f7a0db668c63a1039463302ff4feaa5adb3dfa308db6ab8daf916fc3a34b
MD5 a35d13b6e2a749b21b094bc01197da15
BLAKE2b-256 6a7aa6c84a83b263dd23f0031c39e3e2be2c524602df63eb85d8e6765a2279ca

See more details on using hashes here.

File details

Details for the file pypck-0.9.15a2-py3-none-any.whl.

File metadata

  • Download URL: pypck-0.9.15a2-py3-none-any.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pypck-0.9.15a2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4c760839775a3cbf05549eb5f0950206b964cabbd8eac281b8eef3097fbabc1
MD5 c79777f6abcf8913df21549b3dd29a66
BLAKE2b-256 e0789853711bc1f07527d921725620ad4d23c336a3307a530d44e1a1ba29e409

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