The Zigbee2mqtt integration has an “Enable/Disable” button that stops the containers, but does not clean up either database variables or files on disk. There is no way to start from scratch without manual intervention. The idea is to add a “Reset” button on the setup page, with confirmation (like on matterbridge/node-red), that performs a full reset: disconnection, deletion of variables, deletion of files and containers.
Reset procedure:
- Call
this.disconnect()(stop containers + MQTT disconnection) - Delete all config variables in the database via
this.gladys.variable.destroy(key, this.serviceId)for each CONFIGURATION key inconstants.js:
ZIGBEE2MQTT_DRIVER_PATH, Z2M_BACKUP, ZIGBEE_DONGLE_NAME, Z2M_MQTT_MODE, Z2M_TCP_POR, Z2M_MQTT_URLZ2M_MQTT_USERNAME_KEY, Z2M_MQTT_PASSWORD_KEYGLADYS_MQTT_USERNAME_KEY, GLADYS_MQTT_PASSWORD_KEYDOCKER_MQTT_VERSION, DOCKER_Z2M_VERSION
- Delete the
zigbee2mqtt/folder on disk - Reset state (
discoveredDevices, usbConfigured, status flags, etc.) - Emit a status event via
this.emitStatusEvent()
Only available in “Install from Gladys” mode
Design proposal + messages
With confirmation
For Gladys devices linked to this integration, I think they should be kept (otherwise, we might break scenes?).


