Zigbee Home Automation (ZHA)
ZHA is a versatile and hardware-independent Zigbee gateway implementation, designed to replace proprietary Zigbee gateways, bridges, hubs, and controllers. With ZHA, you can create a unified Zigbee network, allowing you to easily pair and connect a wide range of Zigbee-based devices for home automation and lighting.
Key Features
- Hardware Independence: ZHA is not tied to any specific hardware, giving you the freedom to choose the Zigbee radio that best suits your needs.
- Compatibility: ZHA supports a vast array of Zigbee-based devices, ensuring seamless integration with popular home automation and lighting solutions.
- Unified Zigbee Network: By utilizing ZHA, you can establish a single Zigbee network, simplifying device management and enhancing interoperability.
- Low-Bandwidth Communication: Zigbee operates on a low-bandwidth communication protocol, utilizing small, low-power digital radios to connect devices within local Zigbee wireless private area networks.
Getting Started With Development
To bootstrap a development environment for ZHA, follow these steps:
-
Clone the project from the zigpy organization:
git clone https://github.com/zigpy/zha.git
-
Navigate to the
scriptdirectory:cd zha/script
-
Run the setup script to install the necessary dependencies:
./setup
The
setupscript sets up a virtual environment, installs necessary packages and dependencies, and configures pre-commit hooks for the project. It helps ensure a consistent and controlled development environment for the project, saving you time and effort.Script Overview
The
setupscript in thezha/scriptdirectory performs the following actions:-
curl -LsSf https://astral.sh/uv/install.sh | sh: This command uses curl to download a shell script from the specified URL (https://astral.sh/uv/install.sh) and then pipes it to the sh command to execute it. This script is responsible for installing a tool called "uv" (short for "universal virtualenv") which helps manage Python virtual environments. -
uv venv venv: This command uses the "uv" tool to create a new Python virtual environment named "venv" in the current directory. A virtual environment is an isolated Python environment that allows you to install packages and dependencies specific to your project without affecting the global Python installation. -
. venv/bin/activate: This command activates the newly created virtual environment. When a virtual environment is activated, any subsequent Python-related commands will use the Python interpreter and packages installed within that environment. -
uv pip install -U pip setuptools pre-commit: This command uses the "uv" tool to upgrade the "pip" package manager, as well as install or upgrade the "setuptools" and "pre-commit" packages. "pip" is the default package manager for Python, "setuptools" is a library that facilitates packaging Python projects, and "pre-commit" is a tool for managing and enforcing pre-commit hooks in a Git repository. -
uv pip install -r requirements_test.txt: This command uses the "uv" tool to install the Python packages listed in the "requirements_test.txt" file. This file typically contains a list of dependencies required for running tests in the project. -
uv pip install -e .: This command uses the "uv" tool to install the project itself in editable mode. The dot (.) represents the current directory, so this command installs the project as a package in the virtual environment. -
pre-commit install: This command installs Git pre-commit hooks for the project. Pre-commit hooks are scripts that run before each commit is made in a Git repository, allowing you to enforce certain checks or actions before committing changes.
-
License
ZHA is released under the Apache 2.0 License. Please refer to the LICENSE file for more details
Metadata
Release files for zha 0.0.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zha-0.0.36.tar.gz | 219.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zha-0.0.36-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 394.4 kB
Release files / zha-0.0.36.tar.gz
| Download URL | zha-0.0.36.tar.gz |
|---|---|
| Size | 219.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cfa5c82eb4d5d20c900e23b603593fa9e267b6a161ddc0007f3dc3826372679
|
|
BLAKE2b-256 checksum How to use checksums |
0cd9365deae87d590dd4961ba6bb6803e280dc23db62bf6329d403f412a4e66e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / zha-0.0.36-py3-none-any.whl
| Download URL | zha-0.0.36-py3-none-any.whl |
|---|---|
| Size | 174.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fe2bb6ff8259731e4a46ecd94dab79f4cba3956cab55c2bc9070e2ccf28415a
|
|
BLAKE2b-256 checksum How to use checksums |
8a0710915929e86267ef40818bfd177abc8193ec61a8750915e42f89a3917a29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|