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)

Examples

Check out the examples/ directory for complete usage scenarios:

  • light.py - Basic On/Off, Dimmable, and Extended Color Light implementation.
  • plugpower.py - Smart Plug with electrical energy and power measurement.
  • sensors.py - Multi-sensor suite (Temperature, Humidity, Pressure, Light, Occupancy, Contact).
  • fan.py - Fan Control with multi-speed support and mode sequencing.
  • curtain.py - Window Covering (Curtain) control with position management.
  • doorlock.py - Door Lock with security command handling.

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

Uploaded CPython 3.8+Windows x86-64

matterbridge-0.0.3-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.3-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.3-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: matterbridge-0.0.3-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.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7a61695302b8dfa1c47e927e095f0109556cb78b6a2b51058846e39f7df6fa83
MD5 ece50598109368b3c606346d577e5d40
BLAKE2b-256 ccbe6f5bf8ed2e305c5021d5e879741d6ef6f422c00bb165f46db82658dde14f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for matterbridge-0.0.3-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3af02688a29e4746c5a45602019f67ea89c03309e353a75f34d9b3a6bf1b1221
MD5 0c082f43cb911d212becd219dffc0a57
BLAKE2b-256 a6927bb7e2e11ebfe4d5d59c484ced228ce6dd42d1801f64cce1fd00c61fc529

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for matterbridge-0.0.3-cp38-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3994bcf3452f70415ed8315567df8cf2dc10f3d23b96696a21feb554435912fd
MD5 4a9966475a85aed1357ca3f76b418c29
BLAKE2b-256 35b6201b3fbceb9c89bb6082d666de3a6322a6611c5c408016d2a9a5ba39e4da

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