Skip to content

Commit 120082a

Browse files
committed
Support watchdog Koenkk/zigbee2mqtt#23148
1 parent c726c16 commit 120082a

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

common/rootfs/docker-entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ advanced:
5959
EOF
6060
fi
6161

62+
if bashio::config.has_value 'watchdog'; then
63+
export Z2M_WATCHDOG="$(bashio::config 'watchdog')"
64+
bashio::log.info "Enabled Zigbee2MQTT watchdog with value '$Z2M_WATCHDOG'"
65+
fi
66+
6267
export NODE_PATH=/app/node_modules
6368
export ZIGBEE2MQTT_CONFIG_FRONTEND='{"port": 8099}'
6469

zigbee2mqtt-edge/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"adapter": "match(zstack|deconz|zigate|ezsp|ember)?",
6969
"baudrate": "int?",
7070
"rtscts": "bool?"
71-
}
71+
},
72+
"watchdog": "str?"
7273
},
7374
"image": "zigbee2mqtt/zigbee2mqtt-edge-{arch}"
7475
}

zigbee2mqtt/DOCS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ Configuration required to startup Zigbee2MQTT is available from the addon config
1111
The add-on will create a backup of your configuration.yml within your data path: `$DATA_PATH/configuration.yaml.bk`. When upgrading, you should use this to fill in the relevant values into your new config, particularly the network key, to avoid breaking your network and having to repair all of your devices.
1212
The backup of your configuration is created on add-on startup if no previous backup was found.
1313

14+
# Enabling the watchdog
15+
To automatically restart Zigbee2MQTT in case of a crash, the watchdog can be used. It can be enabled by adding the following to the addon configuration:
16+
17+
```yaml
18+
watchdog: default
19+
```
20+
21+
This will use the default watchdog retry delays of 1min, 5min, 15min, 30min, 60min. Custom delays are also supported, e.g. `watchdog: 5,10,30` will start Zigbee2MQTT with the watchdog's retry delays of 5min, 10min, 30min. For more information about the watchdog, read the [docs](https://www.zigbee2mqtt.io/guide/installation/15_watchdog.html).
22+
1423
# Adding Support for New Devices
1524
If you are interested in adding support for new devices to Zigbee2MQTT see [How to support new devices](https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html).
1625

zigbee2mqtt/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"adapter": "match(zstack|deconz|zigate|ezsp|ember)?",
6969
"baudrate": "int?",
7070
"rtscts": "bool?"
71-
}
71+
},
72+
"watchdog": "str?"
7273
},
7374
"image": "zigbee2mqtt/zigbee2mqtt-{arch}"
7475
}

0 commit comments

Comments
 (0)