2
2
The command line tools bundled with zigpy-znp do not depend in any way on Home Assistant
3
3
and will work with any Texas Instruments radio previously used with ZHA or Zigbee2MQTT.
4
4
5
+
6
+ # Table of Contents
7
+ - [ Installation] ( #installation )
8
+ * [ In Home Assistant OS] ( #in-home-assistant-os )
9
+ * [ In other environments] ( #in-other-environments )
10
+ + [ Installing Python 3.7 or above] ( #installing-python-37-or-above )
11
+ - [ Linux] ( #linux )
12
+ - [ macOS] ( #macos )
13
+ - [ Windows] ( #windows )
14
+ + [ Creating a virtualenv (recommended)] ( #creating-a-virtualenv-recommended )
15
+ + [ Installing zigpy-znp] ( #installing-zigpy-znp )
16
+ - [ Tools] ( #tools )
17
+ * [ Backup and restore] ( #backup-and-restore )
18
+ + [ Network backup (beta)] ( #network-backup-beta )
19
+ + [ NVRAM backup] ( #nvram-backup )
20
+ * [ NVRAM reset] ( #nvram-reset )
21
+ * [ Network formation] ( #network-formation )
22
+ * [ Network scan] ( #network-scan )
23
+ * [ Energy scan] ( #energy-scan )
24
+ * [ CC2531 tools] ( #cc2531-tools )
25
+ + [ Network migration for coordinator upgrades] ( #network-migration-for-coordinator-upgrades )
26
+ + [ Flash operations] ( #flash-operations )
27
+ - [ Flash read] ( #flash-read )
28
+ - [ Flash write] ( #flash-write )
29
+
30
+
5
31
# Installation
6
- ## A note about Home Assistant
7
- While zigpy-znp is already installed within the Python environment used by Home Assistant
8
- with ZHA, getting exclusive access to the radio's serial port and shell access within the
9
- Docker container is not always simple. For this reason, the following installation
10
- instructions will help you setup just zigpy-znp on another computer. Feel free to skip
11
- them if you know your way around the Home Assistant OS Docker container.
12
-
13
- ## Installing Python 3.7 or above
14
- ### Linux
32
+ ## In Home Assistant OS
33
+ zigpy-znp is already installed by Home Assistant's ZHA component and is used to communicate
34
+ with your radio. You only need to gain access to the correct Docker container and temporarily
35
+ disable ZHA to run any of the tools:
36
+
37
+ 1 . Install [ the SSH addon] ( https://github.com/home-assistant/addons/blob/master/ssh/DOCS.md ) .
38
+ Once you are logged in, you will be presented with the Home Assistant CLI.
39
+ 2 . Drop into a regular shell by running ` login ` .
40
+ 3 . At the root shell, log into the main Home Assistant Docker container:
41
+ ``` bash
42
+ docker exec -it $( docker ps -f name=homeassistant -q) bash
43
+ ```
44
+
45
+ 4. Since ZHA is still using your Zigbee radio, you must temporarily * disable* the ZHA
46
+ integration before continuing. This is done with the three-dot dropdown menu in the
47
+ " Integrations" section of the Home Assistant web UI.
48
+
49
+ # # In other environments
50
+ # ## Installing Python 3.7 or above
51
+ # ### Linux
15
52
For Ubuntu 20.04:
16
53
17
54
` ` ` console
18
55
$ sudo apt install python3 python3-virtulenv # ensure this is Python 3.7 or above
19
56
` ` `
20
57
21
- ### macOS
58
+ # ### macOS
22
59
[Homebrew](https://brew.sh/) allows easy installation of recent Python releases.
23
60
24
61
` ` ` console
@@ -29,7 +66,7 @@ If you want to use virtualenv (see below), install it as well
29
66
$ brew install virtualenv
30
67
` ` `
31
68
32
- ### Windows
69
+ # ### Windows
33
70
Download the latest release of Python 3 from the [Python homepage](https://www.python.org/downloads/).
34
71
35
72
If you are using a zzh! or any other device with a CH340 USB-serial adapter, you may have
@@ -53,7 +90,7 @@ Run this:
53
90
> py -3 -m zigpy_znp.tools.foo
54
91
```
55
92
56
- ## Creating a virtualenv (recommended)
93
+ ### Creating a virtualenv (recommended)
57
94
It is recommended you install Python packages within a virtualenv to prevent dependency
58
95
conflicts. You will need to activate the virtualenv again if you close your terminal
59
96
emulator.
@@ -73,7 +110,7 @@ For Windows:
73
110
> venv\Scripts\activate.bat # for cmd.exe
74
111
```
75
112
76
- ## Installing zigpy-znp
113
+ ### Installing zigpy-znp
77
114
The latest stable release from the PyPI
78
115
```console
79
116
$ pip install zigpy-znp
@@ -121,6 +158,9 @@ For example, a network backup will allow you to migrate from a CC2531 with Z-Sta
121
158
fully documented so you can fill out the appropriate information by hand to form a network
122
159
if you are migrating from a non-Texas Instruments device.
123
160
161
+ To get ZHA to utilize your new radio, make sure to change the coordiantor' s `path` in
162
+ `/config/.storage/core.config_entries`.
163
+
124
164
### NVRAM backup
125
165
In contrast to the high-level coordinator backup described above, an exhaustive, low-level
126
166
NVRAM backup can be performed to clone your entire device state. The backed up data is
@@ -213,7 +253,7 @@ button closest to the antenna (the LED will turn red), or running one of the fol
213
253
commands:
214
254
215
255
# ### Flash read
216
- This read only the firmware. NVRAM regions are not accessible from the serial bootloader.
256
+ This reads only the firmware. NVRAM regions are not accessible from the serial bootloader.
217
257
218
258
` ` ` console
219
259
$ python -m zigpy_znp.tools.flash_read -o firmware.bin /dev/cu.usbmodem14101
0 commit comments