Skip to content

Commit b356d28

Browse files
authored
Add configuration update page (Koenkk#3244)
* fix links * fix typing * add page
1 parent dbc2863 commit b356d28

File tree

4 files changed

+59
-4
lines changed

4 files changed

+59
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
sidebarDepth: 1
3+
---
4+
5+
# Configuration update
6+
7+
Starting with v2.0.0 Zigbee2MQTT includes an automatic settings migration system. This system will take care of adjusting your `configuration.yaml` according to your previous one, and the requirements of the new Zigbee2MQTT version. If necessary, the migration process is repeated until your `configuration.yaml` is up to the current version.
8+
9+
The migration system will automatically make a backup of your current `data/configuration.yaml` before starting a migration. The backup file will be named according to its version, for example `data/configuration_backup_v1.yaml`.
10+
11+
:::warning IMPORTANT
12+
While this automatically migrates Zigbee2MQTT settings, it **cannot** migrate side-effects on third parties (like Home Assistant). Make sure you go over the [migration notes](#migration-notes) and the link given to adjust things accordingly on that front.
13+
:::
14+
15+
:::caution CAUTION
16+
Do not edit the `version` setting manually. If you do, you run the risk of corrupting your `configuration.yaml`, the migration system may no longer work properly.
17+
:::
18+
19+
## Migration notes
20+
21+
The migration system will consider every migrations required for a particular version and build a log for you to easily identify what needed changing in your `configuration.yaml` and has an impact on your new configuration. The file will be named according to the Zigbee2MQTT version change, for example `data/migration-1.x.x-to-2.0.0.log`.
22+
23+
### Example migration notes from v1.x.x to v2.0.0
24+
25+
```
26+
[REMOVAL] HA discovery_topic was moved from advanced.homeassistant_discovery_topic to homeassistant.discovery_topic.
27+
28+
[TRANSFER] Baudrate was moved from advanced.baudrate to serial.baudrate.
29+
30+
[REMOVAL] RTSCTS was moved from advanced.rtscts to serial.rtscts.
31+
32+
[TRANSFER] ban was renamed to passlist.
33+
34+
[CHANGE] Log level 'warn' has been renamed to 'warning'.
35+
36+
[ADDITION] Migrated settings to version 2
37+
38+
[REMOVAL] The MQTT legacy API has been removed (advanced.legacy_api setting). See link below for affected topics.
39+
40+
[REMOVAL] Retrieve state option ((devices|groups).xyz.retrieve_state setting)
41+
42+
For more details, see https://github.com/Koenkk/zigbee2mqtt/discussions/24198
43+
```
44+
45+
In this scenario:
46+
47+
- You had set both `advanced.homeassistant_discovery_topic` and `homeassistant.discovery_topic`, the latter was retained, the former removed.
48+
- You had set `advanced.baudrate`, it was moved to `serial.baudrate`.
49+
- You had set both `advanced.rtscts` and `serial.rtscts`, the latter was retained, the former removed.
50+
- You had set `ban`, it was merged into `passlist`.
51+
- You had set `log_level` to `warn`, it was renamed to `warning`.
52+
- `version: 2` was added (future migrations will automatically update it).
53+
- You had set `advanced.legacy_api` to true. This is no longer supported, the setting was removed.
54+
- You had set `retrieve_state` to true for one or more devices or groups under `devices` or `groups`. This is no longer supported, the setting was removed.

docs/guide/installation/01_linux.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Zigbee2MQTT can be stopped by pressing `CTRL + C`.
123123
124124
::: warning ATTENTION
125125
126-
In case Zigbee2MQTT fails to start with `USB adapter discovery error (No valid USB adapter found). Specify valid 'adapter' and 'port' in your configuration.` see the [serial configuration docs](../configuration/)
126+
In case Zigbee2MQTT fails to start with `USB adapter discovery error (No valid USB adapter found). Specify valid 'adapter' and 'port' in your configuration.` see the [serial configuration docs](../configuration/adapter-settings.md)
127127
128128
:::
129129

docs/guide/installation/20_zigbee2mqtt-fails-to-start.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Configure the `serial` section as described [here](../configuration/adapter-sett
1717
Common reasons for this error:
1818

1919
1. The port of your serial adapter changed.
20-
Check [this](../installation/01_linux.md#1-determine-location-of-the-adapter-and-checking-user-permissions) to find out the port of your adapter.
20+
Check [this](../configuration/adapter-settings.md) to find out the port of your adapter.
2121
2. If you are using a CC2530 or CC2531; it is a common issue for this adapter to crash (due to its outdated hardware).
2222
Reflashing the firmware should fix the problem. If it happens often consider flashing the [source routing firmware](https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_Home_1.2/bin/source_routing) or upgrade to a [more powerful adapter](../adapters/README.md).
2323
3. Your adapter requires additional configuration parameters. Check [supported Adapters](../adapters/README.md) section to find out if your adapter requires extra parameters (eg. ConBee II / RaspBee II).

sidebar.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type {SidebarConfig} from '@vuepress/theme-default';
1+
import type {SidebarOptions} from '@vuepress/theme-default';
22
import {getFiles} from './navbar';
33

4-
export const sidebar: SidebarConfig = {
4+
export const sidebar: SidebarOptions = {
55
'/guide/': [
66
'/guide/getting-started/',
77
{
@@ -32,6 +32,7 @@ export const sidebar: SidebarConfig = {
3232
'/guide/configuration/device-availability.md',
3333
'/guide/configuration/homeassistant.md',
3434
'/guide/configuration/more-config-options.md',
35+
'/guide/configuration/configuration-update.md',
3536
],
3637
},
3738
{

0 commit comments

Comments
 (0)