Pythonic API for building a Matter bridge: register devices/endpoints and process events.
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():
bridge.open_commissioning_window_qr()
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 common 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.
- thermostat.py - Thermostat with setpoints and local temperature updates.
- curtain.py - Window Covering (Curtain) control with position management.
- doorlock.py - Door Lock with security command handling.
Threading notes
EventStreamis 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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matterbridge-0.0.4-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: matterbridge-0.0.4-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
161784dce21a8c4026c30ce2136524f44bedaff73d5ecc4134212796b492efe3
|
|
| MD5 |
0fc963cbf5a1b16e2d93c5bb77e93a5d
|
|
| BLAKE2b-256 |
d9dd3c3a5256eaba2eb5169d206b200e206ddd630d50b37463214595c8abdcf4
|
Provenance
The following attestation bundles were made for matterbridge-0.0.4-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on 3735943886/matterbridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matterbridge-0.0.4-cp38-abi3-win_amd64.whl -
Subject digest:
161784dce21a8c4026c30ce2136524f44bedaff73d5ecc4134212796b492efe3 - Sigstore transparency entry: 1687778655
- Sigstore integration time:
-
Permalink:
3735943886/matterbridge@1149f46c3087cd2fa542247ea2d1cdefb6b571a1 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1149f46c3087cd2fa542247ea2d1cdefb6b571a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file matterbridge-0.0.4-cp38-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: matterbridge-0.0.4-cp38-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92f27c095e04a9b416c81ebe40663c1f4b7ce290560039ce286e6f89f1ddce7e
|
|
| MD5 |
84a9dd117ccaeeee73f64376cc6a6970
|
|
| BLAKE2b-256 |
aa0891900bfdf45421ba1f848fcd4362bf6f310f467d61f78cde7717cdbe6a65
|
Provenance
The following attestation bundles were made for matterbridge-0.0.4-cp38-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on 3735943886/matterbridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matterbridge-0.0.4-cp38-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
92f27c095e04a9b416c81ebe40663c1f4b7ce290560039ce286e6f89f1ddce7e - Sigstore transparency entry: 1687778757
- Sigstore integration time:
-
Permalink:
3735943886/matterbridge@1149f46c3087cd2fa542247ea2d1cdefb6b571a1 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1149f46c3087cd2fa542247ea2d1cdefb6b571a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file matterbridge-0.0.4-cp38-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: matterbridge-0.0.4-cp38-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81155fa107eef9491e5964b6ea7406958c1ad89e92d22ff3c890be0a78bc7c94
|
|
| MD5 |
d225a8d3e9792ef6192a68a509692204
|
|
| BLAKE2b-256 |
be9481896b9bc01712bdea3b1df9dbf4d7ef7fc2f8af7b238eb33a3bafc2c032
|
Provenance
The following attestation bundles were made for matterbridge-0.0.4-cp38-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on 3735943886/matterbridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matterbridge-0.0.4-cp38-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
81155fa107eef9491e5964b6ea7406958c1ad89e92d22ff3c890be0a78bc7c94 - Sigstore transparency entry: 1687778589
- Sigstore integration time:
-
Permalink:
3735943886/matterbridge@1149f46c3087cd2fa542247ea2d1cdefb6b571a1 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/3735943886
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1149f46c3087cd2fa542247ea2d1cdefb6b571a1 -
Trigger Event:
push
-
Statement type: