Zigbee integration for MajorDom — bridges Zigbee devices into the MajorDom language.
Project description
integration-zigbee
A MajorDom integration — bridges Zigbee devices into the MajorDom language.
Built for the MajorDom Hub, but it doesn't need it: this is a standalone, standardized
library for Zigbee that you can use on its own (see Run it standalone below). Built on the
MajorDom Integration SDK. The entry point
is ZigBeeController (majordom_zigbee/controller.py), which the Hub — or the SDK's dev runner —
instantiates and drives through its lifecycle: pairing → commands → teardown.
- Other protocols: browse the MajorDom integrations.
- Create your own: start from the integration template.
Documentation
Full integration-author docs — the controller lifecycle, data models, storing data, discovery, and a worked example — live at docs.majordom.io.
Development
poetry install && poetry run poe install
| Task | Description |
|---|---|
poe check |
Full quality pipeline (ruff, ty, pytest, poetry build/check) |
poe check --ci |
Same, plus git diff --exit-code |
Work lands on develop; master is protected and released via Actions → Release. Tests drive
the controller with the SDK's test doubles against a simulated zigpy device — no radio required
(see tests/).
Run it standalone (without the Hub)
Zigbee needs a physical 802.15.4 radio (a Zigbee coordinator such as a SkyConnect, ConBee, or a zigpy-znp/bellows-supported dongle) at a serial path. Then:
# run.py
import asyncio
from majordom_integration_sdk.dev import run_controller
from majordom_zigbee import ZigBeeController
# Opens the network, watches for joining devices, logs events. Ctrl-C to stop.
asyncio.run(run_controller(ZigBeeController, db_path="devices.db"))
poetry run python run.py
To use the integration in standalone mode — discover, pair, control, or fetch a device programmatically — build the dependencies yourself and call the controller directly. Visit the MajorDom integration docs for more details, like the dependency structure and receiving discoveries/events in standalone mode by implementing a delegate.
import asyncio
from majordom_integration_sdk.dev import build_dependencies
from majordom_integration_sdk.schemas.device import ProvidedCredentials
from majordom_zigbee import ZigBeeController
async def main():
deps = build_dependencies(integration=ZigBeeController.name, db_path="devices.db")
controller = ZigBeeController(deps)
await controller.start()
# ... await controller.pair_device(discovery, ProvidedCredentials(...)), send_command, fetch ...
await controller.stop()
asyncio.run(main())
About this integration
- Protocol / platform: Zigbee via
zigpy(withbellows/zigpy-znpradio libraries). - Transport(s): Zigbee (IEEE 802.15.4).
- Supported devices: Zigbee Home Automation devices — lights, plugs, switches, sensors.
- Credentials needed to pair: none — devices join during an explicit pairing window.
Required harness
- Hardware adapters: a Zigbee coordinator radio (SkyConnect / ConBee / a
zigpy-supported dongle) — the Hub assigns its OS device path viadependencies.hardware_interfaces(e.g./dev/ttyACM0). - Third-party software services: none —
zigpyspeaks to the radio directly. - OS / permissions: serial-port access to the radio.
Protocol stack (OSI)
| OSI layer | Protocol | Implemented by |
|---|---|---|
| Application (7) | Zigbee Cluster Library (ZCL) | this integration (via zigpy) |
| Network (3) | Zigbee NWK / APS | library (zigpy · radio firmware) |
| Data link / Physical (1–2) | IEEE 802.15.4 | radio adapter (harness) |
Progress
-
start_pairing_windowimplemented (Zigbee requires an explicit join window) - Discovery of joining devices;
controller_did_receive_discoverycalled - Re-discovery of already-paired devices on reconnect (
controller_did_connect_device) - Device pairing
- Device schema mapped: endpoints/clusters → parameter list with per-parameter metadata
- Hub → Device control (
send_command— commands and attribute writes) - Device → Hub event subscription (
controller_did_receive_events) -
identify -
unpair -
fetch - Availability tracking while running (
controller_did_lose_device/last_error) - Graceful shutdown in
stop - Tests pass against a simulated
zigpydevice (tests/)
Notes
The device/parameter ids are derived from the device's IEEE address via the SDK's UUID helpers, so they're stable across restarts and namespaced per integration.
License
See LICENSE. For commercial licensing or partnership inquiries regarding MajorDom, contact us via parker-industries.org/partnership.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 majordom_zigbee-0.1.3.tar.gz.
File metadata
- Download URL: majordom_zigbee-0.1.3.tar.gz
- Upload date:
- Size: 32.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e42e1ef0bd0d5977afaad71851b6f47334e3ef0a2dd578d4b28d35938648be6
|
|
| MD5 |
fe9d732a58bc679bc39c4e47325ae96c
|
|
| BLAKE2b-256 |
82f47496d7ab7b15c6afa8f9e4af028213c4302e2df5e189c2ab66d1a0d223aa
|
Provenance
The following attestation bundles were made for majordom_zigbee-0.1.3.tar.gz:
Publisher:
release.yml on MajorDom-Systems/integration-zigbee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
majordom_zigbee-0.1.3.tar.gz -
Subject digest:
9e42e1ef0bd0d5977afaad71851b6f47334e3ef0a2dd578d4b28d35938648be6 - Sigstore transparency entry: 2201406250
- Sigstore integration time:
-
Permalink:
MajorDom-Systems/integration-zigbee@aeea43ced4220a69b6ee4923a9d07a316b46e2e1 -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/MajorDom-Systems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aeea43ced4220a69b6ee4923a9d07a316b46e2e1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file majordom_zigbee-0.1.3-py3-none-any.whl.
File metadata
- Download URL: majordom_zigbee-0.1.3-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a57cc531af3d571316403dd1fa82c382bbd4bd5267fe85d4f647f3b8cd6ee13f
|
|
| MD5 |
197b5e7508ef023a0a5f97941304d008
|
|
| BLAKE2b-256 |
f83b64ca64a27abb8753cf091abd994b8520d7cc50d0c3c5093c62a43d6edb9b
|
Provenance
The following attestation bundles were made for majordom_zigbee-0.1.3-py3-none-any.whl:
Publisher:
release.yml on MajorDom-Systems/integration-zigbee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
majordom_zigbee-0.1.3-py3-none-any.whl -
Subject digest:
a57cc531af3d571316403dd1fa82c382bbd4bd5267fe85d4f647f3b8cd6ee13f - Sigstore transparency entry: 2201406325
- Sigstore integration time:
-
Permalink:
MajorDom-Systems/integration-zigbee@aeea43ced4220a69b6ee4923a9d07a316b46e2e1 -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/MajorDom-Systems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aeea43ced4220a69b6ee4923a9d07a316b46e2e1 -
Trigger Event:
workflow_dispatch
-
Statement type: