Skip to main content

LCN-PCK library

Project description


Open source LCN-PCK library written in Python


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 for switching an output port of moudle 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(
        settings={"SK_NUM_TRIES": 0},
    ) as pck_client:
        module10 = pck_client.get_address_conn(LcnAddr(0, 10, False))

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

Project details

Download files

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

Files for pypck, version 0.7.5
Filename, size File type Python version Upload date Hashes
Filename, size pypck-0.7.5-py3-none-any.whl (47.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pypck-0.7.5.tar.gz (40.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page