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.2-cp38-abi3-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8+Windows x86-64

matterbridge-0.0.2-cp38-abi3-manylinux_2_28_x86_64.whl (4.2 MB view details)

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

matterbridge-0.0.2-cp38-abi3-manylinux_2_28_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ ARM64

File details

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

File metadata

  • Download URL: matterbridge-0.0.2-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.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d8886532ed015ea4177a2907df7449c6bcbdcf9807389acadb5e6051d5f9a8be
MD5 3957fc22c0fd163838b9dc229ac92733
BLAKE2b-256 1bfd367ca46511567ded3d49b15765d181c6d84cad4ecabd08fc17f3544ac987

See more details on using hashes here.

File details

Details for the file matterbridge-0.0.2-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for matterbridge-0.0.2-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a317e1afe121049618f3ff46d537809164c84c65ea75a6e4cda44e2e3407e4b1
MD5 4d4fd877ce9e17fbf8569ac45ace7214
BLAKE2b-256 7b662d4dd58e085f95a5de87f03143a9ac0f41fe27f63bc171d2bd74c9a1fa4d

See more details on using hashes here.

File details

Details for the file matterbridge-0.0.2-cp38-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for matterbridge-0.0.2-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7015ce4a1243870d756bfd3f2b44debdb8fb966bbfbe0a25f6fbc4aecbf5ba2f
MD5 e7895ce8ce3af363df0685815bb27a10
BLAKE2b-256 24a95cacefd231142f1e31b7a26289bad5a9322b7800a66d2156a68218053c9a

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