Skip to main content

No project description provided

Project description

matterbridge

Pythonic API for creating a Matter bridge, registering devices/endpoints, and processing events.

Requirements

  • Python 3.8+ (abi3)
  • zeroconf runtime dependency (required for mDNS)

Installation

pip install matterbridge

Quick start

from matterbridge import Bridge, DeviceConfigBuilder, EndpointPreset, device_type, cluster

bridge = Bridge("/tmp/matterbridge-py")

endpoint = EndpointPreset(device_type("on_off_light"))
endpoint.cluster_list([cluster("on_off")])
endpoint.node_label("light-1")

cfg = DeviceConfigBuilder("light-1")
cfg.vendor_name("Bridge")
cfg.product_name("On/Off Light")
cfg.serial_number("LIGHT-0001")
cfg.endpoint(endpoint)

dev = bridge.add_device(cfg.build())

if not bridge.is_commissioned():
    info = bridge.open_commissioning_window_qr()
    if info is not None:
        print(info["qr_code_text"])
        print(info["qr_code"])

events, _runner = bridge.start()

while True:
    evt = events.recv_timeout(100)
    if evt is not None:
        print(evt)

Threading notes

  • EventStream is a single-consumer stream; avoid reading from multiple threads at once.
  • All other binding APIs are thread-safe; operations are marshaled to a single worker thread.

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 Distributions

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

matterbridge-0.0.1-cp38-abi3-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8+Windows x86-64

matterbridge-0.0.1-cp38-abi3-manylinux_2_38_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.38+ x86-64

matterbridge-0.0.1-cp38-abi3-manylinux_2_34_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ ARM64

File details

Details for the file matterbridge-0.0.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: matterbridge-0.0.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for matterbridge-0.0.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 554141172dfa68133b6d4aa89d3fa3cfdf4388b7c854df56973e3a771a344cf0
MD5 988223ea7e6fd19abe1d336dbe0ebcd7
BLAKE2b-256 44537c4cf4d93232ea148756fe223e79970700b8c87fc388fdfc9a4bd7f5fc86

See more details on using hashes here.

File details

Details for the file matterbridge-0.0.1-cp38-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for matterbridge-0.0.1-cp38-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 e688f28be44d21bb3e13499a31232326825a0ccdab2745e87ba291ac71ea82c4
MD5 fd60128b309f38a43a2d715eed8cadd5
BLAKE2b-256 efdd2987220acaa6e1f9ef7484ba12fd9c4848aa1f86364fc0afe7205c84f237

See more details on using hashes here.

File details

Details for the file matterbridge-0.0.1-cp38-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for matterbridge-0.0.1-cp38-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a6f27185c46b42421bbe919bcd94e0d61f3d0f598f8c2880bd60da43b1e725fe
MD5 3a2794cd915296d3bc98121a9ae2f342
BLAKE2b-256 f4039f19bcf605af37f90b4b304e556b171a0c0f19ca1ee200e8cc1ca1dc6a3c

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