Zigbee2MQTT LXC cannot be created #266

Closed
opened 2026-02-04 17:32:00 +03:00 by OVERLORD · 46 comments
Owner

Originally created by @tomfrenzel on GitHub (Jan 4, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Zigbee2MQTT

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zigbee2mqtt.sh)"

📝 Provide a clear and concise description of the issue.

Since the Release of Zigbee2MQTT 2.0.0 today, no Zigbee2MQTT LXCs can be created or updated.

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

Run the install script

Paste the full error output (if available).

✔️ Installed Node.js
⠋Cloning into '/opt/zigbee2mqtt'...
⠦remote: Enumerating objects: 143, done.
remote: Counting objects: 100% (143/143), done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 143 (delta 6), reused 76 (delta 1), pack-reused 0 (from 0)
Receiving objects: 100% (143/143), 540.96 KiB | 3.98 MiB/s, done.
Resolving deltas: 100% (6/6), done.
✔️ Set up Zigbee2MQTT Repository
npm error code EUSAGE
npm error
npm error The npm ci command can only install with an existing package-lock.json or
npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm error later to generate a package-lock.json file, then try again.
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace [-w|--workspace ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-03T21_45_53_474Z-debug-0.log

[ERROR] in line 45: exit code 0: while executing command $STD npm ci

🖼️ Additional context (optional).

No response

Originally created by @tomfrenzel on GitHub (Jan 4, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Zigbee2MQTT ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zigbee2mqtt.sh)" ### 📝 Provide a clear and concise description of the issue. Since the Release of Zigbee2MQTT 2.0.0 today, no Zigbee2MQTT LXCs can be created or updated. ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 🔄 Steps to reproduce the issue. Run the install script ### ❌ Paste the full error output (if available). ✔️ Installed Node.js ⠋Cloning into '/opt/zigbee2mqtt'... ⠦remote: Enumerating objects: 143, done. remote: Counting objects: 100% (143/143), done. remote: Compressing objects: 100% (139/139), done. remote: Total 143 (delta 6), reused 76 (delta 1), pack-reused 0 (from 0) Receiving objects: 100% (143/143), 540.96 KiB | 3.98 MiB/s, done. Resolving deltas: 100% (6/6), done. ✔️ Set up Zigbee2MQTT Repository npm error code EUSAGE npm error npm error The `npm ci` command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling] npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]] npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] npm error [--no-bin-links] [--no-fund] [--dry-run] npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] npm error [-ws|--workspaces] [--include-workspace-root] [--install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run "npm help ci" for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-03T21_45_53_474Z-debug-0.log ⠇ [ERROR] in line 45: exit code 0: while executing command $STD npm ci ### 🖼️ Additional context (optional). _No response_
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

Quickfix tomorrow

@MickLesk commented on GitHub (Jan 4, 2025): Quickfix tomorrow
Author
Owner

@Gugulator commented on GitHub (Jan 4, 2025):

same error.

⚙️ Using Default Settings on node pve
🖥️ Operating System: debian
🌟 Version: 12
📦 Container Type: Privileged
💾 Disk Size: 4GB
🧠 CPU Cores: 2
🛠️ RAM Size: 1024MB
🆔 Container ID: 100
🚀 Creating a Zigbee2MQTT LXC using the above default settings

✔️ Using local for Template Storage.
✔️ Using ALL for Container Storage.
✔️ Updated LXC Template List
✔️ LXC Container 100 was successfully created.
✔️ Started LXC Container
✔️ Set up Container OS
✔️ Network Connected: 192.168.x.x
✔️ IPv4 Internet Connected
✖️ IPv6 Internet Not Connected
✔️ DNS Resolved github.com to 20.217.135.5
✔️ Updated Container OS
✔️ Installed Dependencies
✔️ Set up Node.js Repository
✔️ Installed Node.js
✔️ Set up Zigbee2MQTT Repository
⠴ Installing Zigbee2MQTT
[ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1

also tried with advanced options as non-privileged - same issue.
in addition, current version of Zigbee2MQTT LXC fails to update

@Gugulator commented on GitHub (Jan 4, 2025): same error. ⚙️ Using Default Settings on node pve 🖥️ Operating System: debian 🌟 Version: 12 📦 Container Type: Privileged 💾 Disk Size: 4GB 🧠 CPU Cores: 2 🛠️ RAM Size: 1024MB 🆔 Container ID: 100 🚀 Creating a Zigbee2MQTT LXC using the above default settings ✔️ Using local for Template Storage. ✔️ Using ALL for Container Storage. ✔️ Updated LXC Template List ✔️ LXC Container 100 was successfully created. ✔️ Started LXC Container ✔️ Set up Container OS ✔️ Network Connected: 192.168.x.x ✔️ IPv4 Internet Connected ✖️ IPv6 Internet Not Connected ✔️ DNS Resolved github.com to 20.217.135.5 ✔️ Updated Container OS ✔️ Installed Dependencies ✔️ Set up Node.js Repository ✔️ Installed Node.js ✔️ Set up Zigbee2MQTT Repository ⠴ Installing Zigbee2MQTT [ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1 also tried with advanced options as non-privileged - same issue. in addition, current version of Zigbee2MQTT LXC fails to update
Author
Owner

@tommeh1337 commented on GitHub (Jan 4, 2025):

Same error when updating existing Zigbee2MQTT LXC.
Zigbee2MQTT doesn't start anymore after this update failure. Have to restore a backup.

Shutting down Zigbee2MQTT...
Generating a backup of the configuration...
Checking if any changes were made to package-lock.json...
Updated 1 path from the index
Initiating update...
remote: Enumerating objects: 31648, done.
remote: Counting objects: 100% (31648/31648), done.
remote: Compressing objects: 100% (7851/7851), done.
remote: Total 31521 (delta 23989), reused 30987 (delta 23511), pack-reused 0 (from 0)
Receiving objects: 100% (31521/31521), 108.37 MiB | 16.43 MiB/s, done.
Resolving deltas: 100% (23989/23989), completed with 106 local objects.
From https://github.com/Koenkk/zigbee2mqtt
   7dc92d4b..060ae99c  master     -> origin/master
 * [new tag]           2.0.0      -> 2.0.0
 * [new tag]           0.1.0      -> 0.1.0
 * [new tag]           0.1.1      -> 0.1.1
 * [new tag]           0.1.2      -> 0.1.2
 * [new tag]           0.1.3      -> 0.1.3
 * [new tag]           0.1.4      -> 0.1.4
 * [new tag]           0.1.5      -> 0.1.5
 * [new tag]           0.1.6      -> 0.1.6
 * [new tag]           0.1.7      -> 0.1.7
 * [new tag]           0.1.8      -> 0.1.8
 * [new tag]           0.2.0      -> 0.2.0
 * [new tag]           1.0.0      -> 1.0.0
 * [new tag]           1.0.1      -> 1.0.1
 * [new tag]           1.1.0      -> 1.1.0
 * [new tag]           1.1.1      -> 1.1.1
 * [new tag]           1.10.0     -> 1.10.0
 * [new tag]           1.11.0     -> 1.11.0
 * [new tag]           1.12.0     -> 1.12.0
 * [new tag]           1.12.1     -> 1.12.1
 * [new tag]           1.12.2     -> 1.12.2
 * [new tag]           1.13.0     -> 1.13.0
 * [new tag]           1.13.1     -> 1.13.1
 * [new tag]           1.14.0     -> 1.14.0
 * [new tag]           1.14.1     -> 1.14.1
 * [new tag]           1.14.2     -> 1.14.2
 * [new tag]           1.14.3     -> 1.14.3
 * [new tag]           1.14.4     -> 1.14.4
 * [new tag]           1.15.0     -> 1.15.0
 * [new tag]           1.16.0     -> 1.16.0
 * [new tag]           1.16.1     -> 1.16.1
 * [new tag]           1.16.2     -> 1.16.2
 * [new tag]           1.17.0     -> 1.17.0
 * [new tag]           1.17.1     -> 1.17.1
 * [new tag]           1.18.0     -> 1.18.0
 * [new tag]           1.18.1     -> 1.18.1
 * [new tag]           1.18.2     -> 1.18.2
 * [new tag]           1.18.3     -> 1.18.3
 * [new tag]           1.19.0     -> 1.19.0
 * [new tag]           1.19.1     -> 1.19.1
 * [new tag]           1.2.0      -> 1.2.0
 * [new tag]           1.2.1      -> 1.2.1
 * [new tag]           1.20.0     -> 1.20.0
 * [new tag]           1.21.0     -> 1.21.0
 * [new tag]           1.21.1     -> 1.21.1
 * [new tag]           1.21.2     -> 1.21.2
 * [new tag]           1.22.0     -> 1.22.0
 * [new tag]           1.22.1     -> 1.22.1
 * [new tag]           1.22.2     -> 1.22.2
 * [new tag]           1.23.0     -> 1.23.0
 * [new tag]           1.24.0     -> 1.24.0
 * [new tag]           1.25.0     -> 1.25.0
 * [new tag]           1.25.1     -> 1.25.1
 * [new tag]           1.25.2     -> 1.25.2
 * [new tag]           1.26.0     -> 1.26.0
 * [new tag]           1.27.0     -> 1.27.0
 * [new tag]           1.27.1     -> 1.27.1
 * [new tag]           1.27.2     -> 1.27.2
 * [new tag]           1.28.0     -> 1.28.0
 * [new tag]           1.28.1     -> 1.28.1
 * [new tag]           1.28.2     -> 1.28.2
 * [new tag]           1.28.3     -> 1.28.3
 * [new tag]           1.28.4     -> 1.28.4
 * [new tag]           1.29.0     -> 1.29.0
 * [new tag]           1.29.1     -> 1.29.1
 * [new tag]           1.29.2     -> 1.29.2
 * [new tag]           1.3.0      -> 1.3.0
 * [new tag]           1.3.1      -> 1.3.1
 * [new tag]           1.30.0     -> 1.30.0
 * [new tag]           1.30.1     -> 1.30.1
 * [new tag]           1.30.2     -> 1.30.2
 * [new tag]           1.30.3     -> 1.30.3
 * [new tag]           1.30.4     -> 1.30.4
 * [new tag]           1.31.0     -> 1.31.0
 * [new tag]           1.31.1     -> 1.31.1
 * [new tag]           1.31.2     -> 1.31.2
 * [new tag]           1.32.0     -> 1.32.0
 * [new tag]           1.32.1     -> 1.32.1
 * [new tag]           1.32.2     -> 1.32.2
 * [new tag]           1.33.0     -> 1.33.0
 * [new tag]           1.33.1     -> 1.33.1
 * [new tag]           1.33.2     -> 1.33.2
 * [new tag]           1.34.0     -> 1.34.0
 * [new tag]           1.35.0     -> 1.35.0
 * [new tag]           1.35.1     -> 1.35.1
 * [new tag]           1.35.2     -> 1.35.2
 * [new tag]           1.35.3     -> 1.35.3
 * [new tag]           1.36.0     -> 1.36.0
 * [new tag]           1.36.1     -> 1.36.1
 * [new tag]           1.37.0     -> 1.37.0
 * [new tag]           1.37.1     -> 1.37.1
 * [new tag]           1.38.0     -> 1.38.0
 * [new tag]           1.39.0     -> 1.39.0
 * [new tag]           1.39.1     -> 1.39.1
 * [new tag]           1.4.0      -> 1.4.0
 * [new tag]           1.40.0     -> 1.40.0
 * [new tag]           1.40.1     -> 1.40.1
 * [new tag]           1.40.2     -> 1.40.2
 * [new tag]           1.41.0     -> 1.41.0
 * [new tag]           1.42.0     -> 1.42.0
 * [new tag]           1.5.0      -> 1.5.0
 * [new tag]           1.5.1      -> 1.5.1
 * [new tag]           1.6.0      -> 1.6.0
 * [new tag]           1.7.0      -> 1.7.0
 * [new tag]           1.7.1      -> 1.7.1
 * [new tag]           1.8.0      -> 1.8.0
 * [new tag]           1.9.0      -> 1.9.0
Updating 7dc92d4b..060ae99c
error: Your local changes to the following files would be overwritten by merge:
        data/configuration.yaml
Please commit your changes or stash them before you merge.
Aborting
Update failed, temporarily storing changes and trying again.
Saved working directory and index state WIP on master: 7dc92d4b chore: fix update_dep.yml
Updating 7dc92d4b..060ae99c
Fast-forward
 .github/workflows/ci.yml                                                  |  114 +-
 .github/workflows/release_please.yml                                      |    6 +-
 .github/workflows/stale.yml                                               |    8 +-
 .prettierignore                                                           |    2 +-
 .prettierrc                                                               |    1 +
 .release-please-manifest.json                                             |    2 +-
 CHANGELOG.md                                                              |   92 +
 CODE_OF_CONDUCT.md                                                        |   30 +-
 CONTRIBUTING.md                                                           |    8 +-
 README.md                                                                 |   20 +-
 babel.config.js                                                           |    5 -
 data/configuration.example.yaml                                           |   29 +-
 data/configuration.yaml                                                   |   20 -
 docker/Dockerfile                                                         |   49 +-
 index.js                                                                  |   11 +-
 lib/controller.ts                                                         |  100 +-
 lib/eventBus.ts                                                           |    9 +-
 lib/extension/availability.ts                                             |   22 +-
 lib/extension/bind.ts                                                     |  322 +--
 lib/extension/bridge.ts                                                   |  430 ++--
 lib/extension/configure.ts                                                |   48 +-
 lib/extension/extension.ts                                                |    1 -
 lib/extension/externalConverters.ts                                       |   76 +-
 lib/extension/externalExtension.ts                                        |  120 -
 lib/extension/externalExtensions.ts                                       |   59 +
 lib/extension/externalJS.ts                                               |  191 ++
 lib/extension/frontend.ts                                                 |   42 +-
 lib/extension/groups.ts                                                   |  374 +---
 lib/extension/homeassistant.ts                                            |  485 ++--
 lib/extension/legacy/bridgeLegacy.ts                                      |  424 ----
 lib/extension/legacy/deviceGroupMembership.ts                             |   67 -
 lib/extension/legacy/report.ts                                            |  204 --
 lib/extension/legacy/softReset.ts                                         |   61 -
 lib/extension/networkMap.ts                                               |   90 +-
 lib/extension/otaUpdate.ts                                                |  213 +-
 lib/extension/publish.ts                                                  |   81 +-
 lib/extension/receive.ts                                                  |   10 +-
 lib/model/device.ts                                                       |   17 +-
 lib/model/group.ts                                                        |    1 -
 lib/mqtt.ts                                                               |  134 +-
 lib/state.ts                                                              |    4 +-
 lib/types/api.ts                                                          |  687 ++++++
 lib/types/mkdir-recursive.ts                                              |    3 -
 lib/types/types.d.ts                                                      |   78 +-
 lib/types/zigbee2mqtt-frontend.d.ts                                       |    2 +-
 lib/util/data.ts                                                          |    2 +-
 lib/util/logger.ts                                                        |   39 +-
 lib/util/settings.schema.json                                             |  433 ++--
 lib/util/settings.ts                                                      |  341 +--
 lib/util/settingsMigration.ts                                             |  586 +++++
 lib/util/utils.ts                                                         |  186 +-
 lib/util/yaml.ts                                                          |    6 +-
 lib/zigbee.ts                                                             |   49 +-
 package-lock.json                                                         | 8610 -----------------------------------------------------------------------
 package.json                                                              |   59 +-
 pnpm-lock.yaml                                                            | 3530 +++++++++++++++++++++++++++++
 scripts/install.sh                                                        |   75 -
 test/assets/{ => external_converters}/mock-external-converter-multiple.js |   12 -
 test/assets/{ => external_converters}/mock-external-converter.js          |    0
 test/assets/external_extensions/example2Extension.js                      |   16 +
 test/assets/{ => external_extensions}/exampleExtension.js                 |    6 +-
 test/bind.test.js                                                         |  943 --------
 test/controller.test.js                                                   | 1005 ---------
 test/controller.test.ts                                                   | 1053 +++++++++
 test/{data.test.js => data.test.ts}                                       |   10 +-
 test/{availability.test.js => extensions/availability.test.ts}            |  274 ++-
 test/extensions/bind.test.ts                                              |  774 +++++++
 test/{bridge.test.js => extensions/bridge.test.ts}                        | 1738 +++++++--------
 test/{configure.test.js => extensions/configure.test.ts}                  |  197 +-
 test/extensions/externalConverters.test.ts                                |  357 +++
 test/extensions/externalExtensions.test.ts                                |  207 ++
 test/extensions/frontend.test.ts                                          |  437 ++++
 test/extensions/groups.test.ts                                            |  773 +++++++
 test/{homeassistant.test.js => extensions/homeassistant.test.ts}          | 1811 +++++++--------
 test/{networkMap.test.js => extensions/networkMap.test.ts}                |  662 ++----
 test/extensions/onEvent.test.ts                                           |   98 +
 test/extensions/otaUpdate.test.ts                                         |  465 ++++
 test/{publish.test.js => extensions/publish.test.ts}                      | 1371 ++++++------
 test/{receive.test.js => extensions/receive.test.ts}                      |  514 +++--
 test/externalConverters.test.js                                           |  167 --
 test/externalExtension.test.js                                            |  149 --
 test/frontend.test.js                                                     |  427 ----
 test/group.test.js                                                        | 1111 ----------
 test/legacy/bridgeLegacy.test.js                                          |  538 -----
 test/legacy/report.test.js                                                |  315 ---
 test/lib/flushPromises.js                                                 |    2 -
 test/{logger.test.js => logger.test.ts}                                   |  153 +-
 test/mocks/data.ts                                                        |  305 +++
 test/mocks/debounce.ts                                                    |    5 +
 test/mocks/jszip.ts                                                       |   11 +
 test/mocks/logger.ts                                                      |   55 +
 test/mocks/mqtt.ts                                                        |   35 +
 test/mocks/sleep.ts                                                       |   11 +
 test/mocks/types.d.ts                                                     |   15 +
 test/mocks/utils.ts                                                       |   14 +
 test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts}                  |  692 ++++--
 test/onEvent.test.js                                                      |   96 -
 test/otaUpdate.test.js                                                    |  579 -----
 test/{settings.test.js => settings.test.ts}                               |  300 +--
 test/settingsMigration.test.ts                                            |  920 ++++++++
 test/stub/data.js                                                         |  302 ---
 test/stub/logger.js                                                       |   48 -
 test/stub/mqtt.js                                                         |   37 -
 test/stub/sleep.js                                                        |   10 -
 test/tsconfig.json                                                        |   10 +
 test/{utils.test.js => utils.test.ts}                                     |   42 +-
 test/vitest.config.mts                                                    |   26 +
 tsconfig.json                                                             |    7 +-
 update.sh                                                                 |   21 +-
 109 files changed, 15933 insertions(+), 21861 deletions(-)
 delete mode 100644 babel.config.js
 delete mode 100644 data/configuration.yaml
 delete mode 100644 lib/extension/externalExtension.ts
 create mode 100644 lib/extension/externalExtensions.ts
 create mode 100644 lib/extension/externalJS.ts
 delete mode 100644 lib/extension/legacy/bridgeLegacy.ts
 delete mode 100644 lib/extension/legacy/deviceGroupMembership.ts
 delete mode 100644 lib/extension/legacy/report.ts
 delete mode 100644 lib/extension/legacy/softReset.ts
 create mode 100644 lib/types/api.ts
 delete mode 100644 lib/types/mkdir-recursive.ts
 create mode 100644 lib/util/settingsMigration.ts
 delete mode 100644 package-lock.json
 create mode 100644 pnpm-lock.yaml
 delete mode 100644 scripts/install.sh
 rename test/assets/{ => external_converters}/mock-external-converter-multiple.js (66%)
 rename test/assets/{ => external_converters}/mock-external-converter.js (100%)
 create mode 100644 test/assets/external_extensions/example2Extension.js
 rename test/assets/{ => external_extensions}/exampleExtension.js (61%)
 delete mode 100644 test/bind.test.js
 delete mode 100644 test/controller.test.js
 create mode 100644 test/controller.test.ts
 rename test/{data.test.js => data.test.ts} (83%)
 rename test/{availability.test.js => extensions/availability.test.ts} (56%)
 create mode 100644 test/extensions/bind.test.ts
 rename test/{bridge.test.js => extensions/bridge.test.ts} (75%)
 rename test/{configure.test.js => extensions/configure.test.ts} (52%)
 create mode 100644 test/extensions/externalConverters.test.ts
 create mode 100644 test/extensions/externalExtensions.test.ts
 create mode 100644 test/extensions/frontend.test.ts
 create mode 100644 test/extensions/groups.test.ts
 rename test/{homeassistant.test.js => extensions/homeassistant.test.ts} (61%)
 rename test/{networkMap.test.js => extensions/networkMap.test.ts} (68%)
 create mode 100644 test/extensions/onEvent.test.ts
 create mode 100644 test/extensions/otaUpdate.test.ts
 rename test/{publish.test.js => extensions/publish.test.ts} (51%)
 rename test/{receive.test.js => extensions/receive.test.ts} (51%)
 mode change 100755 => 100644
 delete mode 100644 test/externalConverters.test.js
 delete mode 100644 test/externalExtension.test.js
 delete mode 100644 test/frontend.test.js
 delete mode 100644 test/group.test.js
 delete mode 100644 test/legacy/bridgeLegacy.test.js
 delete mode 100644 test/legacy/report.test.js
 delete mode 100644 test/lib/flushPromises.js
 rename test/{logger.test.js => logger.test.ts} (74%)
 create mode 100644 test/mocks/data.ts
 create mode 100644 test/mocks/debounce.ts
 create mode 100644 test/mocks/jszip.ts
 create mode 100644 test/mocks/logger.ts
 create mode 100644 test/mocks/mqtt.ts
 create mode 100644 test/mocks/sleep.ts
 create mode 100644 test/mocks/types.d.ts
 create mode 100644 test/mocks/utils.ts
 rename test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts} (55%)
 delete mode 100644 test/onEvent.test.js
 delete mode 100644 test/otaUpdate.test.js
 rename test/{settings.test.js => settings.test.ts} (79%)
 create mode 100644 test/settingsMigration.test.ts
 delete mode 100644 test/stub/data.js
 delete mode 100644 test/stub/logger.js
 delete mode 100644 test/stub/mqtt.js
 delete mode 100644 test/stub/sleep.js
 create mode 100644 test/tsconfig.json
 rename test/{utils.test.js => utils.test.ts} (67%)
 create mode 100644 test/vitest.config.mts
Acquiring necessary components...
npm error code EUSAGE
npm error
npm error The `npm ci` command can only install with an existing package-lock.json or
npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm error later to generate a package-lock.json file, then try again.
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-04T07_24_13_379Z-debug-0.log
Failed to install necessary components.
@tommeh1337 commented on GitHub (Jan 4, 2025): Same error when updating existing Zigbee2MQTT LXC. Zigbee2MQTT doesn't start anymore after this update failure. Have to restore a backup. ``` Shutting down Zigbee2MQTT... Generating a backup of the configuration... Checking if any changes were made to package-lock.json... Updated 1 path from the index Initiating update... remote: Enumerating objects: 31648, done. remote: Counting objects: 100% (31648/31648), done. remote: Compressing objects: 100% (7851/7851), done. remote: Total 31521 (delta 23989), reused 30987 (delta 23511), pack-reused 0 (from 0) Receiving objects: 100% (31521/31521), 108.37 MiB | 16.43 MiB/s, done. Resolving deltas: 100% (23989/23989), completed with 106 local objects. From https://github.com/Koenkk/zigbee2mqtt 7dc92d4b..060ae99c master -> origin/master * [new tag] 2.0.0 -> 2.0.0 * [new tag] 0.1.0 -> 0.1.0 * [new tag] 0.1.1 -> 0.1.1 * [new tag] 0.1.2 -> 0.1.2 * [new tag] 0.1.3 -> 0.1.3 * [new tag] 0.1.4 -> 0.1.4 * [new tag] 0.1.5 -> 0.1.5 * [new tag] 0.1.6 -> 0.1.6 * [new tag] 0.1.7 -> 0.1.7 * [new tag] 0.1.8 -> 0.1.8 * [new tag] 0.2.0 -> 0.2.0 * [new tag] 1.0.0 -> 1.0.0 * [new tag] 1.0.1 -> 1.0.1 * [new tag] 1.1.0 -> 1.1.0 * [new tag] 1.1.1 -> 1.1.1 * [new tag] 1.10.0 -> 1.10.0 * [new tag] 1.11.0 -> 1.11.0 * [new tag] 1.12.0 -> 1.12.0 * [new tag] 1.12.1 -> 1.12.1 * [new tag] 1.12.2 -> 1.12.2 * [new tag] 1.13.0 -> 1.13.0 * [new tag] 1.13.1 -> 1.13.1 * [new tag] 1.14.0 -> 1.14.0 * [new tag] 1.14.1 -> 1.14.1 * [new tag] 1.14.2 -> 1.14.2 * [new tag] 1.14.3 -> 1.14.3 * [new tag] 1.14.4 -> 1.14.4 * [new tag] 1.15.0 -> 1.15.0 * [new tag] 1.16.0 -> 1.16.0 * [new tag] 1.16.1 -> 1.16.1 * [new tag] 1.16.2 -> 1.16.2 * [new tag] 1.17.0 -> 1.17.0 * [new tag] 1.17.1 -> 1.17.1 * [new tag] 1.18.0 -> 1.18.0 * [new tag] 1.18.1 -> 1.18.1 * [new tag] 1.18.2 -> 1.18.2 * [new tag] 1.18.3 -> 1.18.3 * [new tag] 1.19.0 -> 1.19.0 * [new tag] 1.19.1 -> 1.19.1 * [new tag] 1.2.0 -> 1.2.0 * [new tag] 1.2.1 -> 1.2.1 * [new tag] 1.20.0 -> 1.20.0 * [new tag] 1.21.0 -> 1.21.0 * [new tag] 1.21.1 -> 1.21.1 * [new tag] 1.21.2 -> 1.21.2 * [new tag] 1.22.0 -> 1.22.0 * [new tag] 1.22.1 -> 1.22.1 * [new tag] 1.22.2 -> 1.22.2 * [new tag] 1.23.0 -> 1.23.0 * [new tag] 1.24.0 -> 1.24.0 * [new tag] 1.25.0 -> 1.25.0 * [new tag] 1.25.1 -> 1.25.1 * [new tag] 1.25.2 -> 1.25.2 * [new tag] 1.26.0 -> 1.26.0 * [new tag] 1.27.0 -> 1.27.0 * [new tag] 1.27.1 -> 1.27.1 * [new tag] 1.27.2 -> 1.27.2 * [new tag] 1.28.0 -> 1.28.0 * [new tag] 1.28.1 -> 1.28.1 * [new tag] 1.28.2 -> 1.28.2 * [new tag] 1.28.3 -> 1.28.3 * [new tag] 1.28.4 -> 1.28.4 * [new tag] 1.29.0 -> 1.29.0 * [new tag] 1.29.1 -> 1.29.1 * [new tag] 1.29.2 -> 1.29.2 * [new tag] 1.3.0 -> 1.3.0 * [new tag] 1.3.1 -> 1.3.1 * [new tag] 1.30.0 -> 1.30.0 * [new tag] 1.30.1 -> 1.30.1 * [new tag] 1.30.2 -> 1.30.2 * [new tag] 1.30.3 -> 1.30.3 * [new tag] 1.30.4 -> 1.30.4 * [new tag] 1.31.0 -> 1.31.0 * [new tag] 1.31.1 -> 1.31.1 * [new tag] 1.31.2 -> 1.31.2 * [new tag] 1.32.0 -> 1.32.0 * [new tag] 1.32.1 -> 1.32.1 * [new tag] 1.32.2 -> 1.32.2 * [new tag] 1.33.0 -> 1.33.0 * [new tag] 1.33.1 -> 1.33.1 * [new tag] 1.33.2 -> 1.33.2 * [new tag] 1.34.0 -> 1.34.0 * [new tag] 1.35.0 -> 1.35.0 * [new tag] 1.35.1 -> 1.35.1 * [new tag] 1.35.2 -> 1.35.2 * [new tag] 1.35.3 -> 1.35.3 * [new tag] 1.36.0 -> 1.36.0 * [new tag] 1.36.1 -> 1.36.1 * [new tag] 1.37.0 -> 1.37.0 * [new tag] 1.37.1 -> 1.37.1 * [new tag] 1.38.0 -> 1.38.0 * [new tag] 1.39.0 -> 1.39.0 * [new tag] 1.39.1 -> 1.39.1 * [new tag] 1.4.0 -> 1.4.0 * [new tag] 1.40.0 -> 1.40.0 * [new tag] 1.40.1 -> 1.40.1 * [new tag] 1.40.2 -> 1.40.2 * [new tag] 1.41.0 -> 1.41.0 * [new tag] 1.42.0 -> 1.42.0 * [new tag] 1.5.0 -> 1.5.0 * [new tag] 1.5.1 -> 1.5.1 * [new tag] 1.6.0 -> 1.6.0 * [new tag] 1.7.0 -> 1.7.0 * [new tag] 1.7.1 -> 1.7.1 * [new tag] 1.8.0 -> 1.8.0 * [new tag] 1.9.0 -> 1.9.0 Updating 7dc92d4b..060ae99c error: Your local changes to the following files would be overwritten by merge: data/configuration.yaml Please commit your changes or stash them before you merge. Aborting Update failed, temporarily storing changes and trying again. Saved working directory and index state WIP on master: 7dc92d4b chore: fix update_dep.yml Updating 7dc92d4b..060ae99c Fast-forward .github/workflows/ci.yml | 114 +- .github/workflows/release_please.yml | 6 +- .github/workflows/stale.yml | 8 +- .prettierignore | 2 +- .prettierrc | 1 + .release-please-manifest.json | 2 +- CHANGELOG.md | 92 + CODE_OF_CONDUCT.md | 30 +- CONTRIBUTING.md | 8 +- README.md | 20 +- babel.config.js | 5 - data/configuration.example.yaml | 29 +- data/configuration.yaml | 20 - docker/Dockerfile | 49 +- index.js | 11 +- lib/controller.ts | 100 +- lib/eventBus.ts | 9 +- lib/extension/availability.ts | 22 +- lib/extension/bind.ts | 322 +-- lib/extension/bridge.ts | 430 ++-- lib/extension/configure.ts | 48 +- lib/extension/extension.ts | 1 - lib/extension/externalConverters.ts | 76 +- lib/extension/externalExtension.ts | 120 - lib/extension/externalExtensions.ts | 59 + lib/extension/externalJS.ts | 191 ++ lib/extension/frontend.ts | 42 +- lib/extension/groups.ts | 374 +--- lib/extension/homeassistant.ts | 485 ++-- lib/extension/legacy/bridgeLegacy.ts | 424 ---- lib/extension/legacy/deviceGroupMembership.ts | 67 - lib/extension/legacy/report.ts | 204 -- lib/extension/legacy/softReset.ts | 61 - lib/extension/networkMap.ts | 90 +- lib/extension/otaUpdate.ts | 213 +- lib/extension/publish.ts | 81 +- lib/extension/receive.ts | 10 +- lib/model/device.ts | 17 +- lib/model/group.ts | 1 - lib/mqtt.ts | 134 +- lib/state.ts | 4 +- lib/types/api.ts | 687 ++++++ lib/types/mkdir-recursive.ts | 3 - lib/types/types.d.ts | 78 +- lib/types/zigbee2mqtt-frontend.d.ts | 2 +- lib/util/data.ts | 2 +- lib/util/logger.ts | 39 +- lib/util/settings.schema.json | 433 ++-- lib/util/settings.ts | 341 +-- lib/util/settingsMigration.ts | 586 +++++ lib/util/utils.ts | 186 +- lib/util/yaml.ts | 6 +- lib/zigbee.ts | 49 +- package-lock.json | 8610 ----------------------------------------------------------------------- package.json | 59 +- pnpm-lock.yaml | 3530 +++++++++++++++++++++++++++++ scripts/install.sh | 75 - test/assets/{ => external_converters}/mock-external-converter-multiple.js | 12 - test/assets/{ => external_converters}/mock-external-converter.js | 0 test/assets/external_extensions/example2Extension.js | 16 + test/assets/{ => external_extensions}/exampleExtension.js | 6 +- test/bind.test.js | 943 -------- test/controller.test.js | 1005 --------- test/controller.test.ts | 1053 +++++++++ test/{data.test.js => data.test.ts} | 10 +- test/{availability.test.js => extensions/availability.test.ts} | 274 ++- test/extensions/bind.test.ts | 774 +++++++ test/{bridge.test.js => extensions/bridge.test.ts} | 1738 +++++++-------- test/{configure.test.js => extensions/configure.test.ts} | 197 +- test/extensions/externalConverters.test.ts | 357 +++ test/extensions/externalExtensions.test.ts | 207 ++ test/extensions/frontend.test.ts | 437 ++++ test/extensions/groups.test.ts | 773 +++++++ test/{homeassistant.test.js => extensions/homeassistant.test.ts} | 1811 +++++++-------- test/{networkMap.test.js => extensions/networkMap.test.ts} | 662 ++---- test/extensions/onEvent.test.ts | 98 + test/extensions/otaUpdate.test.ts | 465 ++++ test/{publish.test.js => extensions/publish.test.ts} | 1371 ++++++------ test/{receive.test.js => extensions/receive.test.ts} | 514 +++-- test/externalConverters.test.js | 167 -- test/externalExtension.test.js | 149 -- test/frontend.test.js | 427 ---- test/group.test.js | 1111 ---------- test/legacy/bridgeLegacy.test.js | 538 ----- test/legacy/report.test.js | 315 --- test/lib/flushPromises.js | 2 - test/{logger.test.js => logger.test.ts} | 153 +- test/mocks/data.ts | 305 +++ test/mocks/debounce.ts | 5 + test/mocks/jszip.ts | 11 + test/mocks/logger.ts | 55 + test/mocks/mqtt.ts | 35 + test/mocks/sleep.ts | 11 + test/mocks/types.d.ts | 15 + test/mocks/utils.ts | 14 + test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts} | 692 ++++-- test/onEvent.test.js | 96 - test/otaUpdate.test.js | 579 ----- test/{settings.test.js => settings.test.ts} | 300 +-- test/settingsMigration.test.ts | 920 ++++++++ test/stub/data.js | 302 --- test/stub/logger.js | 48 - test/stub/mqtt.js | 37 - test/stub/sleep.js | 10 - test/tsconfig.json | 10 + test/{utils.test.js => utils.test.ts} | 42 +- test/vitest.config.mts | 26 + tsconfig.json | 7 +- update.sh | 21 +- 109 files changed, 15933 insertions(+), 21861 deletions(-) delete mode 100644 babel.config.js delete mode 100644 data/configuration.yaml delete mode 100644 lib/extension/externalExtension.ts create mode 100644 lib/extension/externalExtensions.ts create mode 100644 lib/extension/externalJS.ts delete mode 100644 lib/extension/legacy/bridgeLegacy.ts delete mode 100644 lib/extension/legacy/deviceGroupMembership.ts delete mode 100644 lib/extension/legacy/report.ts delete mode 100644 lib/extension/legacy/softReset.ts create mode 100644 lib/types/api.ts delete mode 100644 lib/types/mkdir-recursive.ts create mode 100644 lib/util/settingsMigration.ts delete mode 100644 package-lock.json create mode 100644 pnpm-lock.yaml delete mode 100644 scripts/install.sh rename test/assets/{ => external_converters}/mock-external-converter-multiple.js (66%) rename test/assets/{ => external_converters}/mock-external-converter.js (100%) create mode 100644 test/assets/external_extensions/example2Extension.js rename test/assets/{ => external_extensions}/exampleExtension.js (61%) delete mode 100644 test/bind.test.js delete mode 100644 test/controller.test.js create mode 100644 test/controller.test.ts rename test/{data.test.js => data.test.ts} (83%) rename test/{availability.test.js => extensions/availability.test.ts} (56%) create mode 100644 test/extensions/bind.test.ts rename test/{bridge.test.js => extensions/bridge.test.ts} (75%) rename test/{configure.test.js => extensions/configure.test.ts} (52%) create mode 100644 test/extensions/externalConverters.test.ts create mode 100644 test/extensions/externalExtensions.test.ts create mode 100644 test/extensions/frontend.test.ts create mode 100644 test/extensions/groups.test.ts rename test/{homeassistant.test.js => extensions/homeassistant.test.ts} (61%) rename test/{networkMap.test.js => extensions/networkMap.test.ts} (68%) create mode 100644 test/extensions/onEvent.test.ts create mode 100644 test/extensions/otaUpdate.test.ts rename test/{publish.test.js => extensions/publish.test.ts} (51%) rename test/{receive.test.js => extensions/receive.test.ts} (51%) mode change 100755 => 100644 delete mode 100644 test/externalConverters.test.js delete mode 100644 test/externalExtension.test.js delete mode 100644 test/frontend.test.js delete mode 100644 test/group.test.js delete mode 100644 test/legacy/bridgeLegacy.test.js delete mode 100644 test/legacy/report.test.js delete mode 100644 test/lib/flushPromises.js rename test/{logger.test.js => logger.test.ts} (74%) create mode 100644 test/mocks/data.ts create mode 100644 test/mocks/debounce.ts create mode 100644 test/mocks/jszip.ts create mode 100644 test/mocks/logger.ts create mode 100644 test/mocks/mqtt.ts create mode 100644 test/mocks/sleep.ts create mode 100644 test/mocks/types.d.ts create mode 100644 test/mocks/utils.ts rename test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts} (55%) delete mode 100644 test/onEvent.test.js delete mode 100644 test/otaUpdate.test.js rename test/{settings.test.js => settings.test.ts} (79%) create mode 100644 test/settingsMigration.test.ts delete mode 100644 test/stub/data.js delete mode 100644 test/stub/logger.js delete mode 100644 test/stub/mqtt.js delete mode 100644 test/stub/sleep.js create mode 100644 test/tsconfig.json rename test/{utils.test.js => utils.test.ts} (67%) create mode 100644 test/vitest.config.mts Acquiring necessary components... npm error code EUSAGE npm error npm error The `npm ci` command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling] npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]] npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] npm error [--no-bin-links] [--no-fund] [--dry-run] npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] npm error [-ws|--workspaces] [--include-workspace-root] [--install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run "npm help ci" for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-04T07_24_13_379Z-debug-0.log Failed to install necessary components. ```
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

1 is enough please. We know this issue since 8 weeks

@MickLesk commented on GitHub (Jan 4, 2025): 1 is enough please. We know this issue since 8 weeks
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

need some testers, check PR

@MickLesk commented on GitHub (Jan 4, 2025): need some testers, check PR
Author
Owner

@daloki83 commented on GitHub (Jan 4, 2025):

Done as described, but...

Checking Zigbee2MQTT status...
Creating backup of configuration...
Checking out changes to package-lock.json...
Updated 1 path from the index
Updating...
remote: Enumerating objects: 1655, done.
remote: Counting objects: 100% (1234/1234), done.
remote: Compressing objects: 100% (526/526), done.
remote: Total 989 (delta 784), reused 631 (delta 461), pack-reused 0 (from 0)
Receiving objects: 100% (989/989), 475.70 KiB | 6.02 MiB/s, done.
Resolving deltas: 100% (784/784), completed with 67 local objects.
From https://github.com/Koenkk/zigbee2mqtt
   7dc92d4b..060ae99c  master     -> origin/master
 * [new tag]           2.0.0      -> 2.0.0
Updating 7dc92d4b..060ae99c
error: Your local changes to the following files would be overwritten by merge:
        data/configuration.example.yaml
        data/configuration.yaml
Please commit your changes or stash them before you merge.
Aborting
@daloki83 commented on GitHub (Jan 4, 2025): Done as described, but... ``` Checking Zigbee2MQTT status... Creating backup of configuration... Checking out changes to package-lock.json... Updated 1 path from the index Updating... remote: Enumerating objects: 1655, done. remote: Counting objects: 100% (1234/1234), done. remote: Compressing objects: 100% (526/526), done. remote: Total 989 (delta 784), reused 631 (delta 461), pack-reused 0 (from 0) Receiving objects: 100% (989/989), 475.70 KiB | 6.02 MiB/s, done. Resolving deltas: 100% (784/784), completed with 67 local objects. From https://github.com/Koenkk/zigbee2mqtt 7dc92d4b..060ae99c master -> origin/master * [new tag] 2.0.0 -> 2.0.0 Updating 7dc92d4b..060ae99c error: Your local changes to the following files would be overwritten by merge: data/configuration.example.yaml data/configuration.yaml Please commit your changes or stash them before you merge. Aborting ```
Author
Owner

@jodewee commented on GitHub (Jan 4, 2025):

Done as described, but...

Checking Zigbee2MQTT status...
Creating backup of configuration...
Checking out changes to package-lock.json...
Updated 1 path from the index
Updating...
remote: Enumerating objects: 1655, done.
remote: Counting objects: 100% (1234/1234), done.
remote: Compressing objects: 100% (526/526), done.
remote: Total 989 (delta 784), reused 631 (delta 461), pack-reused 0 (from 0)
Receiving objects: 100% (989/989), 475.70 KiB | 6.02 MiB/s, done.
Resolving deltas: 100% (784/784), completed with 67 local objects.
From https://github.com/Koenkk/zigbee2mqtt
   7dc92d4b..060ae99c  master     -> origin/master
 * [new tag]           2.0.0      -> 2.0.0
Updating 7dc92d4b..060ae99c
error: Your local changes to the following files would be overwritten by merge:
        data/configuration.example.yaml
        data/configuration.yaml
Please commit your changes or stash them before you merge.
Aborting

Same over here

@jodewee commented on GitHub (Jan 4, 2025): > Done as described, but... > > ``` > Checking Zigbee2MQTT status... > Creating backup of configuration... > Checking out changes to package-lock.json... > Updated 1 path from the index > Updating... > remote: Enumerating objects: 1655, done. > remote: Counting objects: 100% (1234/1234), done. > remote: Compressing objects: 100% (526/526), done. > remote: Total 989 (delta 784), reused 631 (delta 461), pack-reused 0 (from 0) > Receiving objects: 100% (989/989), 475.70 KiB | 6.02 MiB/s, done. > Resolving deltas: 100% (784/784), completed with 67 local objects. > From https://github.com/Koenkk/zigbee2mqtt > 7dc92d4b..060ae99c master -> origin/master > * [new tag] 2.0.0 -> 2.0.0 > Updating 7dc92d4b..060ae99c > error: Your local changes to the following files would be overwritten by merge: > data/configuration.example.yaml > data/configuration.yaml > Please commit your changes or stash them before you merge. > Aborting > ``` Same over here
Author
Owner

@tomfrenzel commented on GitHub (Jan 4, 2025):

@daloki83 an @jodewee you need to temporairly move the config file(s) as described over here:
https://github.com/Koenkk/zigbee2mqtt/discussions/24198#:~:text=Bare%2Dmetal%20installations

The issue is that git cannot pull the latest commits since this would ovveride your chages to the config file

@tomfrenzel commented on GitHub (Jan 4, 2025): @daloki83 an @jodewee you need to temporairly move the config file(s) as described over here: https://github.com/Koenkk/zigbee2mqtt/discussions/24198#:~:text=Bare%2Dmetal%20installations The issue is that git cannot pull the latest commits since this would ovveride your chages to the config file
Author
Owner

@daloki83 commented on GitHub (Jan 4, 2025):

good point but then i'm running into this:

Checking Zigbee2MQTT status...
Creating backup of configuration...
Checking out changes to package-lock.json...
Updated 1 path from the index
Updating...
remote: Enumerating objects: 1655, done.
remote: Counting objects: 100% (1234/1234), done.
remote: Compressing objects: 100% (521/521), done.
remote: Total 989 (delta 785), reused 637 (delta 466), pack-reused 0 (from 0)
Receiving objects: 100% (989/989), 475.95 KiB | 6.10 MiB/s, done.
Resolving deltas: 100% (785/785), completed with 67 local objects.
From https://github.com/Koenkk/zigbee2mqtt
   7dc92d4b..060ae99c  master     -> origin/master
 * [new tag]           2.0.0      -> 2.0.0
Updating 7dc92d4b..060ae99c
Fast-forward
 .github/workflows/ci.yml                                                  |  114 +-
 .github/workflows/release_please.yml                                      |    6 +-
 .github/workflows/stale.yml                                               |    8 +-
 .prettierignore                                                           |    2 +-
 .prettierrc                                                               |    1 +
 .release-please-manifest.json                                             |    2 +-
 CHANGELOG.md                                                              |   92 ++
 CODE_OF_CONDUCT.md                                                        |   30 +-
 CONTRIBUTING.md                                                           |    8 +-
 README.md                                                                 |   20 +-
 babel.config.js                                                           |    5 -
 data/configuration.example.yaml                                           |   29 +-
 data/configuration.yaml                                                   |   20 -
 docker/Dockerfile                                                         |   49 +-
 index.js                                                                  |   11 +-
 lib/controller.ts                                                         |  100 +-
 lib/eventBus.ts                                                           |    9 +-
 lib/extension/availability.ts                                             |   22 +-
 lib/extension/bind.ts                                                     |  322 +++---
 lib/extension/bridge.ts                                                   |  430 ++++----
 lib/extension/configure.ts                                                |   48 +-
 lib/extension/extension.ts                                                |    1 -
 lib/extension/externalConverters.ts                                       |   76 +-
 lib/extension/externalExtension.ts                                        |  120 ---
 lib/extension/externalExtensions.ts                                       |   59 ++
 lib/extension/externalJS.ts                                               |  191 ++++
 lib/extension/frontend.ts                                                 |   42 +-
 lib/extension/groups.ts                                                   |  374 ++-----
 lib/extension/homeassistant.ts                                            |  485 +++------
 lib/extension/legacy/bridgeLegacy.ts                                      |  424 --------
 lib/extension/legacy/deviceGroupMembership.ts                             |   67 --
 lib/extension/legacy/report.ts                                            |  204 ----
 lib/extension/legacy/softReset.ts                                         |   61 --
 lib/extension/networkMap.ts                                               |   90 +-
 lib/extension/otaUpdate.ts                                                |  213 ++--
 lib/extension/publish.ts                                                  |   81 +-
 lib/extension/receive.ts                                                  |   10 +-
 lib/model/device.ts                                                       |   17 +-
 lib/model/group.ts                                                        |    1 -
 lib/mqtt.ts                                                               |  134 +--
 lib/state.ts                                                              |    4 +-
 lib/types/api.ts                                                          |  687 ++++++++++++
 lib/types/mkdir-recursive.ts                                              |    3 -
 lib/types/types.d.ts                                                      |   78 +-
 lib/types/zigbee2mqtt-frontend.d.ts                                       |    2 +-
 lib/util/data.ts                                                          |    2 +-
 lib/util/logger.ts                                                        |   39 +-
 lib/util/settings.schema.json                                             |  433 +++-----
 lib/util/settings.ts                                                      |  341 ++----
 lib/util/settingsMigration.ts                                             |  586 +++++++++++
 lib/util/utils.ts                                                         |  186 ++--
 lib/util/yaml.ts                                                          |    6 +-
 lib/zigbee.ts                                                             |   49 +-
 package-lock.json                                                         | 8610 ----------------------------------------------------------------------------------------------------------------------------------------------------
 package.json                                                              |   59 +-
 pnpm-lock.yaml                                                            | 3530 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 scripts/install.sh                                                        |   75 --
 test/assets/{ => external_converters}/mock-external-converter-multiple.js |   12 -
 test/assets/{ => external_converters}/mock-external-converter.js          |    0
 test/assets/external_extensions/example2Extension.js                      |   16 +
 test/assets/{ => external_extensions}/exampleExtension.js                 |    6 +-
 test/bind.test.js                                                         |  943 -----------------
 test/controller.test.js                                                   | 1005 ------------------
 test/controller.test.ts                                                   | 1053 ++++++++++++++++++
 test/{data.test.js => data.test.ts}                                       |   10 +-
 test/{availability.test.js => extensions/availability.test.ts}            |  274 +++--
 test/extensions/bind.test.ts                                              |  774 ++++++++++++++
 test/{bridge.test.js => extensions/bridge.test.ts}                        | 1738 ++++++++++++++----------------
 test/{configure.test.js => extensions/configure.test.ts}                  |  197 ++--
 test/extensions/externalConverters.test.ts                                |  357 +++++++
 test/extensions/externalExtensions.test.ts                                |  207 ++++
 test/extensions/frontend.test.ts                                          |  437 ++++++++
 test/extensions/groups.test.ts                                            |  773 ++++++++++++++
 test/{homeassistant.test.js => extensions/homeassistant.test.ts}          | 1811 ++++++++++++++-----------------
 test/{networkMap.test.js => extensions/networkMap.test.ts}                |  662 +++++-------
 test/extensions/onEvent.test.ts                                           |   98 ++
 test/extensions/otaUpdate.test.ts                                         |  465 ++++++++
 test/{publish.test.js => extensions/publish.test.ts}                      | 1371 +++++++++++-------------
 test/{receive.test.js => extensions/receive.test.ts}                      |  514 +++++----
 test/externalConverters.test.js                                           |  167 ---
 test/externalExtension.test.js                                            |  149 ---
 test/frontend.test.js                                                     |  427 --------
 test/group.test.js                                                        | 1111 -------------------
 test/legacy/bridgeLegacy.test.js                                          |  538 ----------
 test/legacy/report.test.js                                                |  315 ------
 test/lib/flushPromises.js                                                 |    2 -
 test/{logger.test.js => logger.test.ts}                                   |  153 +--
 test/mocks/data.ts                                                        |  305 ++++++
 test/mocks/debounce.ts                                                    |    5 +
 test/mocks/jszip.ts                                                       |   11 +
 test/mocks/logger.ts                                                      |   55 +
 test/mocks/mqtt.ts                                                        |   35 +
 test/mocks/sleep.ts                                                       |   11 +
 test/mocks/types.d.ts                                                     |   15 +
 test/mocks/utils.ts                                                       |   14 +
 test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts}                  |  692 ++++++++----
 test/onEvent.test.js                                                      |   96 --
 test/otaUpdate.test.js                                                    |  579 ----------
 test/{settings.test.js => settings.test.ts}                               |  300 ++----
 test/settingsMigration.test.ts                                            |  920 ++++++++++++++++
 test/stub/data.js                                                         |  302 ------
 test/stub/logger.js                                                       |   48 -
 test/stub/mqtt.js                                                         |   37 -
 test/stub/sleep.js                                                        |   10 -
 test/tsconfig.json                                                        |   10 +
 test/{utils.test.js => utils.test.ts}                                     |   42 +-
 test/vitest.config.mts                                                    |   26 +
 tsconfig.json                                                             |    7 +-
 update.sh                                                                 |   21 +-
 109 files changed, 15933 insertions(+), 21861 deletions(-)
 delete mode 100644 babel.config.js
 delete mode 100644 data/configuration.yaml
 delete mode 100644 lib/extension/externalExtension.ts
 create mode 100644 lib/extension/externalExtensions.ts
 create mode 100644 lib/extension/externalJS.ts
 delete mode 100644 lib/extension/legacy/bridgeLegacy.ts
 delete mode 100644 lib/extension/legacy/deviceGroupMembership.ts
 delete mode 100644 lib/extension/legacy/report.ts
 delete mode 100644 lib/extension/legacy/softReset.ts
 create mode 100644 lib/types/api.ts
 delete mode 100644 lib/types/mkdir-recursive.ts
 create mode 100644 lib/util/settingsMigration.ts
 delete mode 100644 package-lock.json
 create mode 100644 pnpm-lock.yaml
 delete mode 100644 scripts/install.sh
 rename test/assets/{ => external_converters}/mock-external-converter-multiple.js (66%)
 rename test/assets/{ => external_converters}/mock-external-converter.js (100%)
 create mode 100644 test/assets/external_extensions/example2Extension.js
 rename test/assets/{ => external_extensions}/exampleExtension.js (61%)
 delete mode 100644 test/bind.test.js
 delete mode 100644 test/controller.test.js
 create mode 100644 test/controller.test.ts
 rename test/{data.test.js => data.test.ts} (83%)
 rename test/{availability.test.js => extensions/availability.test.ts} (56%)
 create mode 100644 test/extensions/bind.test.ts
 rename test/{bridge.test.js => extensions/bridge.test.ts} (75%)
 rename test/{configure.test.js => extensions/configure.test.ts} (52%)
 create mode 100644 test/extensions/externalConverters.test.ts
 create mode 100644 test/extensions/externalExtensions.test.ts
 create mode 100644 test/extensions/frontend.test.ts
 create mode 100644 test/extensions/groups.test.ts
 rename test/{homeassistant.test.js => extensions/homeassistant.test.ts} (61%)
 rename test/{networkMap.test.js => extensions/networkMap.test.ts} (68%)
 create mode 100644 test/extensions/onEvent.test.ts
 create mode 100644 test/extensions/otaUpdate.test.ts
 rename test/{publish.test.js => extensions/publish.test.ts} (51%)
 rename test/{receive.test.js => extensions/receive.test.ts} (51%)
 mode change 100755 => 100644
 delete mode 100644 test/externalConverters.test.js
 delete mode 100644 test/externalExtension.test.js
 delete mode 100644 test/frontend.test.js
 delete mode 100644 test/group.test.js
 delete mode 100644 test/legacy/bridgeLegacy.test.js
 delete mode 100644 test/legacy/report.test.js
 delete mode 100644 test/lib/flushPromises.js
 rename test/{logger.test.js => logger.test.ts} (74%)
 create mode 100644 test/mocks/data.ts
 create mode 100644 test/mocks/debounce.ts
 create mode 100644 test/mocks/jszip.ts
 create mode 100644 test/mocks/logger.ts
 create mode 100644 test/mocks/mqtt.ts
 create mode 100644 test/mocks/sleep.ts
 create mode 100644 test/mocks/types.d.ts
 create mode 100644 test/mocks/utils.ts
 rename test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts} (55%)
 delete mode 100644 test/onEvent.test.js
 delete mode 100644 test/otaUpdate.test.js
 rename test/{settings.test.js => settings.test.ts} (79%)
 create mode 100644 test/settingsMigration.test.ts
 delete mode 100644 test/stub/data.js
 delete mode 100644 test/stub/logger.js
 delete mode 100644 test/stub/mqtt.js
 delete mode 100644 test/stub/sleep.js
 create mode 100644 test/tsconfig.json
 rename test/{utils.test.js => utils.test.ts} (67%)
 create mode 100644 test/vitest.config.mts
Installing dependencies...
npm error code EUSAGE
npm error
npm error The `npm ci` command can only install with an existing package-lock.json or
npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm error later to generate a package-lock.json file, then try again.
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info

npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-04T11_05_38_923Z-debug-0.log
@daloki83 commented on GitHub (Jan 4, 2025): good point but then i'm running into this: ``` Checking Zigbee2MQTT status... Creating backup of configuration... Checking out changes to package-lock.json... Updated 1 path from the index Updating... remote: Enumerating objects: 1655, done. remote: Counting objects: 100% (1234/1234), done. remote: Compressing objects: 100% (521/521), done. remote: Total 989 (delta 785), reused 637 (delta 466), pack-reused 0 (from 0) Receiving objects: 100% (989/989), 475.95 KiB | 6.10 MiB/s, done. Resolving deltas: 100% (785/785), completed with 67 local objects. From https://github.com/Koenkk/zigbee2mqtt 7dc92d4b..060ae99c master -> origin/master * [new tag] 2.0.0 -> 2.0.0 Updating 7dc92d4b..060ae99c Fast-forward .github/workflows/ci.yml | 114 +- .github/workflows/release_please.yml | 6 +- .github/workflows/stale.yml | 8 +- .prettierignore | 2 +- .prettierrc | 1 + .release-please-manifest.json | 2 +- CHANGELOG.md | 92 ++ CODE_OF_CONDUCT.md | 30 +- CONTRIBUTING.md | 8 +- README.md | 20 +- babel.config.js | 5 - data/configuration.example.yaml | 29 +- data/configuration.yaml | 20 - docker/Dockerfile | 49 +- index.js | 11 +- lib/controller.ts | 100 +- lib/eventBus.ts | 9 +- lib/extension/availability.ts | 22 +- lib/extension/bind.ts | 322 +++--- lib/extension/bridge.ts | 430 ++++---- lib/extension/configure.ts | 48 +- lib/extension/extension.ts | 1 - lib/extension/externalConverters.ts | 76 +- lib/extension/externalExtension.ts | 120 --- lib/extension/externalExtensions.ts | 59 ++ lib/extension/externalJS.ts | 191 ++++ lib/extension/frontend.ts | 42 +- lib/extension/groups.ts | 374 ++----- lib/extension/homeassistant.ts | 485 +++------ lib/extension/legacy/bridgeLegacy.ts | 424 -------- lib/extension/legacy/deviceGroupMembership.ts | 67 -- lib/extension/legacy/report.ts | 204 ---- lib/extension/legacy/softReset.ts | 61 -- lib/extension/networkMap.ts | 90 +- lib/extension/otaUpdate.ts | 213 ++-- lib/extension/publish.ts | 81 +- lib/extension/receive.ts | 10 +- lib/model/device.ts | 17 +- lib/model/group.ts | 1 - lib/mqtt.ts | 134 +-- lib/state.ts | 4 +- lib/types/api.ts | 687 ++++++++++++ lib/types/mkdir-recursive.ts | 3 - lib/types/types.d.ts | 78 +- lib/types/zigbee2mqtt-frontend.d.ts | 2 +- lib/util/data.ts | 2 +- lib/util/logger.ts | 39 +- lib/util/settings.schema.json | 433 +++----- lib/util/settings.ts | 341 ++---- lib/util/settingsMigration.ts | 586 +++++++++++ lib/util/utils.ts | 186 ++-- lib/util/yaml.ts | 6 +- lib/zigbee.ts | 49 +- package-lock.json | 8610 ---------------------------------------------------------------------------------------------------------------------------------------------------- package.json | 59 +- pnpm-lock.yaml | 3530 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/install.sh | 75 -- test/assets/{ => external_converters}/mock-external-converter-multiple.js | 12 - test/assets/{ => external_converters}/mock-external-converter.js | 0 test/assets/external_extensions/example2Extension.js | 16 + test/assets/{ => external_extensions}/exampleExtension.js | 6 +- test/bind.test.js | 943 ----------------- test/controller.test.js | 1005 ------------------ test/controller.test.ts | 1053 ++++++++++++++++++ test/{data.test.js => data.test.ts} | 10 +- test/{availability.test.js => extensions/availability.test.ts} | 274 +++-- test/extensions/bind.test.ts | 774 ++++++++++++++ test/{bridge.test.js => extensions/bridge.test.ts} | 1738 ++++++++++++++---------------- test/{configure.test.js => extensions/configure.test.ts} | 197 ++-- test/extensions/externalConverters.test.ts | 357 +++++++ test/extensions/externalExtensions.test.ts | 207 ++++ test/extensions/frontend.test.ts | 437 ++++++++ test/extensions/groups.test.ts | 773 ++++++++++++++ test/{homeassistant.test.js => extensions/homeassistant.test.ts} | 1811 ++++++++++++++----------------- test/{networkMap.test.js => extensions/networkMap.test.ts} | 662 +++++------- test/extensions/onEvent.test.ts | 98 ++ test/extensions/otaUpdate.test.ts | 465 ++++++++ test/{publish.test.js => extensions/publish.test.ts} | 1371 +++++++++++------------- test/{receive.test.js => extensions/receive.test.ts} | 514 +++++---- test/externalConverters.test.js | 167 --- test/externalExtension.test.js | 149 --- test/frontend.test.js | 427 -------- test/group.test.js | 1111 ------------------- test/legacy/bridgeLegacy.test.js | 538 ---------- test/legacy/report.test.js | 315 ------ test/lib/flushPromises.js | 2 - test/{logger.test.js => logger.test.ts} | 153 +-- test/mocks/data.ts | 305 ++++++ test/mocks/debounce.ts | 5 + test/mocks/jszip.ts | 11 + test/mocks/logger.ts | 55 + test/mocks/mqtt.ts | 35 + test/mocks/sleep.ts | 11 + test/mocks/types.d.ts | 15 + test/mocks/utils.ts | 14 + test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts} | 692 ++++++++---- test/onEvent.test.js | 96 -- test/otaUpdate.test.js | 579 ---------- test/{settings.test.js => settings.test.ts} | 300 ++---- test/settingsMigration.test.ts | 920 ++++++++++++++++ test/stub/data.js | 302 ------ test/stub/logger.js | 48 - test/stub/mqtt.js | 37 - test/stub/sleep.js | 10 - test/tsconfig.json | 10 + test/{utils.test.js => utils.test.ts} | 42 +- test/vitest.config.mts | 26 + tsconfig.json | 7 +- update.sh | 21 +- 109 files changed, 15933 insertions(+), 21861 deletions(-) delete mode 100644 babel.config.js delete mode 100644 data/configuration.yaml delete mode 100644 lib/extension/externalExtension.ts create mode 100644 lib/extension/externalExtensions.ts create mode 100644 lib/extension/externalJS.ts delete mode 100644 lib/extension/legacy/bridgeLegacy.ts delete mode 100644 lib/extension/legacy/deviceGroupMembership.ts delete mode 100644 lib/extension/legacy/report.ts delete mode 100644 lib/extension/legacy/softReset.ts create mode 100644 lib/types/api.ts delete mode 100644 lib/types/mkdir-recursive.ts create mode 100644 lib/util/settingsMigration.ts delete mode 100644 package-lock.json create mode 100644 pnpm-lock.yaml delete mode 100644 scripts/install.sh rename test/assets/{ => external_converters}/mock-external-converter-multiple.js (66%) rename test/assets/{ => external_converters}/mock-external-converter.js (100%) create mode 100644 test/assets/external_extensions/example2Extension.js rename test/assets/{ => external_extensions}/exampleExtension.js (61%) delete mode 100644 test/bind.test.js delete mode 100644 test/controller.test.js create mode 100644 test/controller.test.ts rename test/{data.test.js => data.test.ts} (83%) rename test/{availability.test.js => extensions/availability.test.ts} (56%) create mode 100644 test/extensions/bind.test.ts rename test/{bridge.test.js => extensions/bridge.test.ts} (75%) rename test/{configure.test.js => extensions/configure.test.ts} (52%) create mode 100644 test/extensions/externalConverters.test.ts create mode 100644 test/extensions/externalExtensions.test.ts create mode 100644 test/extensions/frontend.test.ts create mode 100644 test/extensions/groups.test.ts rename test/{homeassistant.test.js => extensions/homeassistant.test.ts} (61%) rename test/{networkMap.test.js => extensions/networkMap.test.ts} (68%) create mode 100644 test/extensions/onEvent.test.ts create mode 100644 test/extensions/otaUpdate.test.ts rename test/{publish.test.js => extensions/publish.test.ts} (51%) rename test/{receive.test.js => extensions/receive.test.ts} (51%) mode change 100755 => 100644 delete mode 100644 test/externalConverters.test.js delete mode 100644 test/externalExtension.test.js delete mode 100644 test/frontend.test.js delete mode 100644 test/group.test.js delete mode 100644 test/legacy/bridgeLegacy.test.js delete mode 100644 test/legacy/report.test.js delete mode 100644 test/lib/flushPromises.js rename test/{logger.test.js => logger.test.ts} (74%) create mode 100644 test/mocks/data.ts create mode 100644 test/mocks/debounce.ts create mode 100644 test/mocks/jszip.ts create mode 100644 test/mocks/logger.ts create mode 100644 test/mocks/mqtt.ts create mode 100644 test/mocks/sleep.ts create mode 100644 test/mocks/types.d.ts create mode 100644 test/mocks/utils.ts rename test/{stub/zigbeeHerdsman.js => mocks/zigbeeHerdsman.ts} (55%) delete mode 100644 test/onEvent.test.js delete mode 100644 test/otaUpdate.test.js rename test/{settings.test.js => settings.test.ts} (79%) create mode 100644 test/settingsMigration.test.ts delete mode 100644 test/stub/data.js delete mode 100644 test/stub/logger.js delete mode 100644 test/stub/mqtt.js delete mode 100644 test/stub/sleep.js create mode 100644 test/tsconfig.json rename test/{utils.test.js => utils.test.ts} (67%) create mode 100644 test/vitest.config.mts Installing dependencies... npm error code EUSAGE npm error npm error The `npm ci` command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling] npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]] npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] npm error [--no-bin-links] [--no-fund] [--dry-run] npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] npm error [-ws|--workspaces] [--include-workspace-root] [--install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run "npm help ci" for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-04T11_05_38_923Z-debug-0.log ```
Author
Owner

@tomfrenzel commented on GitHub (Jan 4, 2025):

Just run the update script again. Not sure why this is happening but it worked for me 👍🏽

@tomfrenzel commented on GitHub (Jan 4, 2025): Just run the update script again. Not sure why this is happening but it worked for me 👍🏽
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

Yes. Update Script fix this finally. because the Update Script wont updated, and run with npm

@MickLesk commented on GitHub (Jan 4, 2025): Yes. Update Script fix this finally. because the Update Script wont updated, and run with npm
Author
Owner

@snippem commented on GitHub (Jan 4, 2025):

Yes. Update Script fix this finally. because the Update Script wont updated, and run with npm

Hey, here also the same update problems to 2.0. Is it possible that you list the exact steps so that the transition to the new version goes a bit smoother?

@snippem commented on GitHub (Jan 4, 2025): > Yes. Update Script fix this finally. because the Update Script wont updated, and run with npm Hey, here also the same update problems to 2.0. Is it possible that you list the exact steps so that the transition to the new version goes a bit smoother?
Author
Owner

@tomfrenzel commented on GitHub (Jan 4, 2025):

Yup makes sense. When execution the update script, it pulls the new files including the new update script which uses the pnpm command instead of the npm command. But since the old script is still running, it tries to execute the npm command after the git pull

@tomfrenzel commented on GitHub (Jan 4, 2025): Yup makes sense. When execution the update script, it pulls the new files including the new update script which uses the pnpm command instead of the npm command. But since the old script is still running, it tries to execute the npm command after the git pull
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

Yes. Update Script fix this finally. because the Update Script wont updated, and run with npm

Hey, here also the same update problems to 2.0. Is it possible that you list the exact steps so that the transition to the new version goes a bit smoother?

Look at linked PR, there are all steps

@MickLesk commented on GitHub (Jan 4, 2025): > > Yes. Update Script fix this finally. because the Update Script wont updated, and run with npm > > Hey, here also the same update problems to 2.0. Is it possible that you list the exact steps so that the transition to the new version goes a bit smoother? Look at linked PR, there are all steps
Author
Owner

@tomfrenzel commented on GitHub (Jan 4, 2025):

@snippem The steps are listed here: #660 but before step 5 rename to configuration.yaml to configuration.yaml.bak und rename it back after the update script ran.

@tomfrenzel commented on GitHub (Jan 4, 2025): @snippem The steps are listed here: #660 but before step 5 rename to configuration.yaml to configuration.yaml.bak und rename it back after the update script ran.
Author
Owner

@daloki83 commented on GitHub (Jan 4, 2025):

@tomfrenzel @MickLesk confirmed. Update finally done

@snippem
follow:
https://github.com/community-scripts/ProxmoxVE/discussions/660
after step 4
mv your configuration.yaml and configuration.example.yaml to .bak
step 5
run the updater two times
after that mv your configuration.yaml.bak and configuration.example.yaml.bak

@daloki83 commented on GitHub (Jan 4, 2025): @tomfrenzel @MickLesk confirmed. Update finally done @snippem follow: https://github.com/community-scripts/ProxmoxVE/discussions/660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak
Author
Owner

@JBakers commented on GitHub (Jan 4, 2025):

@tomfrenzel @MickLesk confirmed. Update finally done

@snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak

Confirmed working now.
Not using USB but a PoE gateway, but that doesnt change anything really regarding this.

@JBakers commented on GitHub (Jan 4, 2025): > @tomfrenzel @MickLesk confirmed. Update finally done > > @snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak Confirmed working now. Not using USB but a PoE gateway, but that doesnt change anything really regarding this.
Author
Owner

@snippem commented on GitHub (Jan 4, 2025):

@tomfrenzel @MickLesk confirmed. Update finally done

@snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak

Running 2.0 now on the first instance i have of Z2M :-)

Followed the instruction and made some changes notes see:

1.) Install pnpm

npm install -g pnpm
2.) Do an Update of your config

systemctl stop zigbee2mqtt
mkdir -p /opt/z2m_backup
cp -r /opt/zigbee2mqtt/data/* /opt/z2m_backup
3.) Change Configuration of configuration yaml

nano /opt/zigbee2mqtt/data/configuration.yaml
add here in the right sections:

advanced:
homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: fals
device_options:
legacy: false
4.) Check if your Adapter is correct configured (i had the same issue)

nano /opt/zigbee2mqtt/data/configuration.yaml
check this part:

serial:
port: /dev/ttyACM0
adapter: zstack # <-- Add this line
ive used zstack, you can check it here: Koenkk/zigbee2mqtt#24364

Also this still works as a port:

⚙️ Determine the location of your adapter

ls -l /dev/serial/by-id

Example Output: lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0

5.) mv your configuration.yaml and configuration.example.yaml to .bak

mv /opt/zigbee2mqtt/data/configuration.yaml /opt/zigbee2mqtt/data/configuration.yaml.bak
mv /opt/zigbee2mqtt/data/configuration.example.yaml /opt/zigbee2mqtt/data/configuration.example.yaml.bak

6.) go into main path and enter "cd"

cd /opt/zigbee2mqtt
./update.sh

run the updater two times

Note when complaining about data-backup allready avaible delete it and run update command again.
rm -r /opt/zigbee2mqtt/data-backup

run ./update.sh again

7.) Move back old configuration files.

mv /opt/zigbee2mqtt/data/configuration.yaml.bak /opt/zigbee2mqtt/data/configuration.yaml
mv /opt/zigbee2mqtt/data/configuration.example.yaml.bak /opt/zigbee2mqtt/data/configuration.example.yaml

8.) if all is correctly deployed, you can do an testrun

cd /opt/zigbee2mqtt && pnpm start
=> if it works, fine, update done

9.) Edit Service for Zigbee2MQTT

nano /etc/systemd/system/zigbee2mqtt.service
change "/usr/bin/npm start" to "/usr/bin/pnpm start" In ExecStart and start the service

systemctl daemon-reload
systemctl start zigbee2mqtt
10.) Create an App_version.txt for next updates

touch /opt/zigbee2mqtt_version.txt
nano /opt/zigbee2mqtt_version.txt
=> add 2.0.0 in file and save

The only thing i run into fornow is normally i run update in the root but i get an error:

Shutting down Zigbee2MQTT...
Generating a backup of the configuration...
Checking if any changes were made to package-lock.json...
error: pathspec 'package-lock.json' did not match any file(s) known to git
Failed to check package-lock.json.

@snippem commented on GitHub (Jan 4, 2025): > @tomfrenzel @MickLesk confirmed. Update finally done > > @snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak Running 2.0 now on the first instance i have of Z2M :-) Followed the instruction and made some changes notes see: 1.) Install pnpm npm install -g pnpm 2.) Do an Update of your config systemctl stop zigbee2mqtt mkdir -p /opt/z2m_backup cp -r /opt/zigbee2mqtt/data/* /opt/z2m_backup 3.) Change Configuration of configuration yaml nano /opt/zigbee2mqtt/data/configuration.yaml add here in the right sections: advanced: homeassistant_legacy_entity_attributes: false homeassistant_legacy_triggers: false legacy_api: false legacy_availability_payload: fals device_options: legacy: false 4.) Check if your Adapter is correct configured (i had the same issue) nano /opt/zigbee2mqtt/data/configuration.yaml check this part: serial: port: /dev/ttyACM0 adapter: zstack # <-- Add this line ive used zstack, you can check it here: Koenkk/zigbee2mqtt#24364 Also this still works as a port: ⚙️ Determine the location of your adapter ls -l /dev/serial/by-id Example Output: lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0 5.) mv your configuration.yaml and configuration.example.yaml to .bak mv /opt/zigbee2mqtt/data/configuration.yaml /opt/zigbee2mqtt/data/configuration.yaml.bak mv /opt/zigbee2mqtt/data/configuration.example.yaml /opt/zigbee2mqtt/data/configuration.example.yaml.bak 6.) go into main path and enter "cd" cd /opt/zigbee2mqtt ./update.sh run the updater two times Note when complaining about data-backup allready avaible delete it and run update command again. rm -r /opt/zigbee2mqtt/data-backup run ./update.sh again 7.) Move back old configuration files. mv /opt/zigbee2mqtt/data/configuration.yaml.bak /opt/zigbee2mqtt/data/configuration.yaml mv /opt/zigbee2mqtt/data/configuration.example.yaml.bak /opt/zigbee2mqtt/data/configuration.example.yaml 8.) if all is correctly deployed, you can do an testrun cd /opt/zigbee2mqtt && pnpm start => if it works, fine, update done 9.) Edit Service for Zigbee2MQTT nano /etc/systemd/system/zigbee2mqtt.service change "/usr/bin/npm start" to "/usr/bin/pnpm start" In ExecStart and start the service systemctl daemon-reload systemctl start zigbee2mqtt 10.) Create an App_version.txt for next updates touch /opt/zigbee2mqtt_version.txt nano /opt/zigbee2mqtt_version.txt => add 2.0.0 in file and save The only thing i run into fornow is normally i run update in the root but i get an error: Shutting down Zigbee2MQTT... Generating a backup of the configuration... Checking if any changes were made to package-lock.json... error: pathspec 'package-lock.json' did not match any file(s) known to git Failed to check package-lock.json.
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

You need the bash of PR, its for now only in Develop Branch. Only the "update" function is against the Main Branch

@MickLesk commented on GitHub (Jan 4, 2025): You need the bash of PR, its for now only in Develop Branch. Only the "update" function is against the Main Branch
Author
Owner

@snippem commented on GitHub (Jan 4, 2025):

You need the bash of PR, its for now only in Develop Branch. Only the "update" function is against the Main Branch

I don't quite understand what you mean I guess. I'm running the production version of zigbee2mqtt not the development version. Shouldn't I get the error now? Or do you mean that the manual installation of Z2M 2.00 only works now and not the standard update command? until the update script is updated to Z2M 2.00?

@snippem commented on GitHub (Jan 4, 2025): > You need the bash of PR, its for now only in Develop Branch. Only the "update" function is against the Main Branch I don't quite understand what you mean I guess. I'm running the production version of zigbee2mqtt not the development version. Shouldn't I get the error now? Or do you mean that the manual installation of Z2M 2.00 only works now and not the standard update command? until the update script is updated to Z2M 2.00?
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

You need the bash of PR, its for now only in Develop Branch. Only the "update" function is against the Main Branch

I don't quite understand what you mean I guess. I'm running the production version of zigbee2mqtt not the development version. Shouldn't I get the error now? Or do you mean that the manual installation of Z2M 2.00 only works now and not the standard update command? until the update script is updated to Z2M 2.00?

Read this and execute this bash
https://github.com/community-scripts/ProxmoxVE/pull/1221

@MickLesk commented on GitHub (Jan 4, 2025): > > You need the bash of PR, its for now only in Develop Branch. Only the "update" function is against the Main Branch > > I don't quite understand what you mean I guess. I'm running the production version of zigbee2mqtt not the development version. Shouldn't I get the error now? Or do you mean that the manual installation of Z2M 2.00 only works now and not the standard update command? until the update script is updated to Z2M 2.00? Read this and execute this bash https://github.com/community-scripts/ProxmoxVE/pull/1221
Author
Owner

@DirkTas67 commented on GitHub (Jan 4, 2025):

Can somebody post the zigbee2mqqt.service here, I installed it today but it failed during the installation and I don't have a zigbee2mqqt.service

@DirkTas67 commented on GitHub (Jan 4, 2025): Can somebody post the zigbee2mqqt.service here, I installed it today but it failed during the installation and I don't have a zigbee2mqqt.service
Author
Owner

@MickLesk commented on GitHub (Jan 4, 2025):

how do you start zigbee2mqtt? ^^

@MickLesk commented on GitHub (Jan 4, 2025): how do you start zigbee2mqtt? ^^
Author
Owner

@DirkTas67 commented on GitHub (Jan 5, 2025):

how do you start zigbee2mqtt? ^^

I can't start zigbee2mqtt, I just reinstalled it, the installation does not finish. I make the config file, follow the instructions from above here until I reach the edit of the .service file (and everything goes well, zigbee2mqtt starts manually) but then I can't edit the zigbee2mqtt.service file (technically I can edit it, but it is empty, since it didn't exist). So if anyone can give me the file I then can make it like it should be. Second option for me is to restore a backup from a version of august 2024 and then store it, delete the lxc, install the new one that fails to install, go thru all this stuff again and take the restored .service file. It's easier to just ask it I guess.

@DirkTas67 commented on GitHub (Jan 5, 2025): > how do you start zigbee2mqtt? ^^ I can't start zigbee2mqtt, I just reinstalled it, the installation does not finish. I make the config file, follow the instructions from above here until I reach the edit of the .service file (and everything goes well, zigbee2mqtt starts manually) but then I can't edit the zigbee2mqtt.service file (technically I can edit it, but it is empty, since it didn't exist). So if anyone can give me the file I then can make it like it should be. Second option for me is to restore a backup from a version of august 2024 and then store it, delete the lxc, install the new one that fails to install, go thru all this stuff again and take the restored .service file. It's easier to just ask it I guess.
Author
Owner

@MickLesk commented on GitHub (Jan 5, 2025):

Oh man...

@MickLesk commented on GitHub (Jan 5, 2025): Oh man...
Author
Owner

@DittmannCz commented on GitHub (Jan 5, 2025):

Sorry if I duplicate it.
Running Z2M as LXC in PVE (bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt.sh)"
).
When I hit "update" i get this:

Acquiring necessary components...
npm error code EUSAGE
npm error
npm error The npm ci command can only install with an existing package-lock.json or
npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm error later to generate a package-lock.json file, then try again.
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace [-w|--workspace ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-05T09_49_48_569Z-debug-0.log
Failed to install necessary components.

When I start new instance from this link (https://community-scripts.github.io/ProxmoxVE/scripts?id=zigbee2mqtt) I get this.

🚀 Creating a Zigbee2MQTT LXC using the above advanced settings
✔️ Using local for Template Storage.
✔️ Using local-lvm for Container Storage.
✔️ Updated LXC Template List
✔️ LXC Container 110 was successfully created.
✔️ Started LXC Container
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
✔️ Set up Container OS
✔️ Network Connected: 192.168.11.103
✔️ IPv4 Internet Connected
✖️ IPv6 Internet Not Connected
✔️ DNS Resolved github.com to 140.82.121.4
✔️ Updated Container OS
✔️ Installed Dependencies
✔️ Set up Node.js Repository
✔️ Installed Node.js
✔️ Set up Zigbee2MQTT Repository
⠸ Installing Zigbee2MQTT
[ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1

what is recommended to proceed?

@DittmannCz commented on GitHub (Jan 5, 2025): Sorry if I duplicate it. Running Z2M as LXC in PVE (bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt.sh)" ). When I hit "update" i get this: Acquiring necessary components... npm error code EUSAGE npm error npm error The `npm ci` command can only install with an existing package-lock.json or npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or npm error later to generate a package-lock.json file, then try again. npm error npm error Clean install a project npm error npm error Usage: npm error npm ci npm error npm error Options: npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling] npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]] npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] npm error [--no-bin-links] [--no-fund] [--dry-run] npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] npm error [-ws|--workspaces] [--include-workspace-root] [--install-links] npm error npm error aliases: clean-install, ic, install-clean, isntall-clean npm error npm error Run "npm help ci" for more info npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-05T09_49_48_569Z-debug-0.log Failed to install necessary components. When I start new instance from this link (https://community-scripts.github.io/ProxmoxVE/scripts?id=zigbee2mqtt) I get this. 🚀 Creating a Zigbee2MQTT LXC using the above advanced settings ✔️ Using local for Template Storage. ✔️ Using local-lvm for Container Storage. ✔️ Updated LXC Template List ✔️ LXC Container 110 was successfully created. ✔️ Started LXC Container bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) ✔️ Set up Container OS ✔️ Network Connected: 192.168.11.103 ✔️ IPv4 Internet Connected ✖️ IPv6 Internet Not Connected ✔️ DNS Resolved github.com to 140.82.121.4 ✔️ Updated Container OS ✔️ Installed Dependencies ✔️ Set up Node.js Repository ✔️ Installed Node.js ✔️ Set up Zigbee2MQTT Repository ⠸ Installing Zigbee2MQTT [ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1 what is recommended to proceed?
Author
Owner

@MickLesk commented on GitHub (Jan 5, 2025):

Sorry if I duplicate it.
Running Z2M as LXC in PVE (bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt.sh)"
).
When I hit "update" i get this:

Acquiring necessary components...
npm error code EUSAGE
npm error
npm error The npm ci command can only install with an existing package-lock.json or
npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
npm error later to generate a package-lock.json file, then try again.
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace [-w|--workspace ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-05T09_49_48_569Z-debug-0.log
Failed to install necessary components.

When I start new instance from this link (https://community-scripts.github.io/ProxmoxVE/scripts?id=zigbee2mqtt) I get this.

🚀 Creating a Zigbee2MQTT LXC using the above advanced settings
✔️ Using local for Template Storage.
✔️ Using local-lvm for Container Storage.
✔️ Updated LXC Template List
✔️ LXC Container 110 was successfully created.
✔️ Started LXC Container
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
✔️ Set up Container OS
✔️ Network Connected: 192.168.11.103
✔️ IPv4 Internet Connected
✖️ IPv6 Internet Not Connected
✔️ DNS Resolved github.com to 140.82.121.4
✔️ Updated Container OS
✔️ Installed Dependencies
✔️ Set up Node.js Repository
✔️ Installed Node.js
✔️ Set up Zigbee2MQTT Repository
⠸ Installing Zigbee2MQTT
[ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1

what is recommended to proceed?

You see the wrong Repo, right? And you see the instruction above, right?

@MickLesk commented on GitHub (Jan 5, 2025): > Sorry if I duplicate it. > Running Z2M as LXC in PVE (bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/zigbee2mqtt.sh)" > ). > When I hit "update" i get this: > > > Acquiring necessary components... > npm error code EUSAGE > npm error > npm error The `npm ci` command can only install with an existing package-lock.json or > npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or > npm error later to generate a package-lock.json file, then try again. > npm error > npm error Clean install a project > npm error > npm error Usage: > npm error npm ci > npm error > npm error Options: > npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling] > npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] > npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]] > npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit] > npm error [--no-bin-links] [--no-fund] [--dry-run] > npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] > npm error [-ws|--workspaces] [--include-workspace-root] [--install-links] > npm error > npm error aliases: clean-install, ic, install-clean, isntall-clean > npm error > npm error Run "npm help ci" for more info > npm error A complete log of this run can be found in: /root/.npm/_logs/2025-01-05T09_49_48_569Z-debug-0.log > Failed to install necessary components. > > When I start new instance from this link (https://community-scripts.github.io/ProxmoxVE/scripts?id=zigbee2mqtt) I get this. > > 🚀 Creating a Zigbee2MQTT LXC using the above advanced settings > ✔️ Using local for Template Storage. > ✔️ Using local-lvm for Container Storage. > ✔️ Updated LXC Template List > ✔️ LXC Container 110 was successfully created. > ✔️ Started LXC Container > bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) > ✔️ Set up Container OS > ✔️ Network Connected: 192.168.11.103 > ✔️ IPv4 Internet Connected > ✖️ IPv6 Internet Not Connected > ✔️ DNS Resolved github.com to 140.82.121.4 > ✔️ Updated Container OS > ✔️ Installed Dependencies > ✔️ Set up Node.js Repository > ✔️ Installed Node.js > ✔️ Set up Zigbee2MQTT Repository > ⠸ Installing Zigbee2MQTT > [ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1 > > > > > what is recommended to proceed? You see the wrong Repo, right? And you see the instruction above, right?
Author
Owner

@DittmannCz commented on GitHub (Jan 5, 2025):

clear, so shortly: how can I create new container from this proper repo when I get [ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1 ?
I know that first repo is different, thus I want new installation

@DittmannCz commented on GitHub (Jan 5, 2025): clear, so shortly: how can I create new container from this proper repo when I get [ERROR] in line 44: exit code 0: while executing command "$@" > /dev/null 2>&1 ? I know that first repo is different, thus I want new installation
Author
Owner

@jodewee commented on GitHub (Jan 5, 2025):

@tomfrenzel @MickLesk confirmed. Update finally done
@snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak

Running 2.0 now on the first instance i have of Z2M :-)

Followed the instruction and made some changes notes see:

1.) Install pnpm

npm install -g pnpm 2.) Do an Update of your config

systemctl stop zigbee2mqtt mkdir -p /opt/z2m_backup cp -r /opt/zigbee2mqtt/data/* /opt/z2m_backup 3.) Change Configuration of configuration yaml

nano /opt/zigbee2mqtt/data/configuration.yaml add here in the right sections:

advanced: homeassistant_legacy_entity_attributes: false homeassistant_legacy_triggers: false legacy_api: false legacy_availability_payload: fals device_options: legacy: false 4.) Check if your Adapter is correct configured (i had the same issue)

nano /opt/zigbee2mqtt/data/configuration.yaml check this part:

serial: port: /dev/ttyACM0 adapter: zstack # <-- Add this line ive used zstack, you can check it here: Koenkk/zigbee2mqtt#24364

Also this still works as a port:

⚙️ Determine the location of your adapter

ls -l /dev/serial/by-id

Example Output: lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0

5.) mv your configuration.yaml and configuration.example.yaml to .bak

mv /opt/zigbee2mqtt/data/configuration.yaml /opt/zigbee2mqtt/data/configuration.yaml.bak mv /opt/zigbee2mqtt/data/configuration.example.yaml /opt/zigbee2mqtt/data/configuration.example.yaml.bak

6.) go into main path and enter "cd"

cd /opt/zigbee2mqtt ./update.sh

run the updater two times

Note when complaining about data-backup allready avaible delete it and run update command again. rm -r /opt/zigbee2mqtt/data-backup

run ./update.sh again

7.) Move back old configuration files.

mv /opt/zigbee2mqtt/data/configuration.yaml.bak /opt/zigbee2mqtt/data/configuration.yaml mv /opt/zigbee2mqtt/data/configuration.example.yaml.bak /opt/zigbee2mqtt/data/configuration.example.yaml

8.) if all is correctly deployed, you can do an testrun

cd /opt/zigbee2mqtt && pnpm start => if it works, fine, update done

9.) Edit Service for Zigbee2MQTT

nano /etc/systemd/system/zigbee2mqtt.service change "/usr/bin/npm start" to "/usr/bin/pnpm start" In ExecStart and start the service

systemctl daemon-reload systemctl start zigbee2mqtt 10.) Create an App_version.txt for next updates

touch /opt/zigbee2mqtt_version.txt nano /opt/zigbee2mqtt_version.txt => add 2.0.0 in file and save

The only thing i run into fornow is normally i run update in the root but i get an error:

Shutting down Zigbee2MQTT... Generating a backup of the configuration... Checking if any changes were made to package-lock.json... error: pathspec 'package-lock.json' did not match any file(s) known to git Failed to check package-lock.json.

Thanks, upgrade successfull !!

@jodewee commented on GitHub (Jan 5, 2025): > > @tomfrenzel @MickLesk confirmed. Update finally done > > @snippem follow: #660 after step 4 mv your configuration.yaml and configuration.example.yaml to .bak step 5 run the updater two times after that mv your configuration.yaml.bak and configuration.example.yaml.bak > > Running 2.0 now on the first instance i have of Z2M :-) > > Followed the instruction and made some changes notes see: > > 1.) Install pnpm > > npm install -g pnpm 2.) Do an Update of your config > > systemctl stop zigbee2mqtt mkdir -p /opt/z2m_backup cp -r /opt/zigbee2mqtt/data/* /opt/z2m_backup 3.) Change Configuration of configuration yaml > > nano /opt/zigbee2mqtt/data/configuration.yaml add here in the right sections: > > advanced: homeassistant_legacy_entity_attributes: false homeassistant_legacy_triggers: false legacy_api: false legacy_availability_payload: fals device_options: legacy: false 4.) Check if your Adapter is correct configured (i had the same issue) > > nano /opt/zigbee2mqtt/data/configuration.yaml check this part: > > serial: port: /dev/ttyACM0 adapter: zstack # <-- Add this line ive used zstack, you can check it here: [Koenkk/zigbee2mqtt#24364](https://github.com/Koenkk/zigbee2mqtt/discussions/24364) > > Also this still works as a port: > > ⚙️ Determine the location of your adapter > > ls -l /dev/serial/by-id > > Example Output: lrwxrwxrwx 1 root root 13 Jun 19 17:30 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0 > > 5.) mv your configuration.yaml and configuration.example.yaml to .bak > > mv /opt/zigbee2mqtt/data/configuration.yaml /opt/zigbee2mqtt/data/configuration.yaml.bak mv /opt/zigbee2mqtt/data/configuration.example.yaml /opt/zigbee2mqtt/data/configuration.example.yaml.bak > > 6.) go into main path and enter "cd" > > cd /opt/zigbee2mqtt ./update.sh > > run the updater two times > > Note when complaining about data-backup allready avaible delete it and run update command again. rm -r /opt/zigbee2mqtt/data-backup > > run ./update.sh again > > 7.) Move back old configuration files. > > mv /opt/zigbee2mqtt/data/configuration.yaml.bak /opt/zigbee2mqtt/data/configuration.yaml mv /opt/zigbee2mqtt/data/configuration.example.yaml.bak /opt/zigbee2mqtt/data/configuration.example.yaml > > 8.) if all is correctly deployed, you can do an testrun > > cd /opt/zigbee2mqtt && pnpm start => if it works, fine, update done > > 9.) Edit Service for Zigbee2MQTT > > nano /etc/systemd/system/zigbee2mqtt.service change "/usr/bin/npm start" to "/usr/bin/pnpm start" In ExecStart and start the service > > systemctl daemon-reload systemctl start zigbee2mqtt 10.) Create an App_version.txt for next updates > > touch /opt/zigbee2mqtt_version.txt nano /opt/zigbee2mqtt_version.txt => add 2.0.0 in file and save > > The only thing i run into fornow is normally i run update in the root but i get an error: > > Shutting down Zigbee2MQTT... Generating a backup of the configuration... Checking if any changes were made to package-lock.json... error: pathspec 'package-lock.json' did not match any file(s) known to git Failed to check package-lock.json. Thanks, upgrade successfull !!
Author
Owner

@sammyke007 commented on GitHub (Jan 5, 2025):

I had to edit it a little bit different:

9.) Edit Service for Zigbee2MQTT

nano /etc/systemd/system/zigbee2mqtt.service

change "/usr/bin/npm start" to "pnpm start" In ExecStart and start the service

Service wouldn't start with /usr/bin
Just FYI

@sammyke007 commented on GitHub (Jan 5, 2025): I had to edit it a little bit different: 9.) Edit Service for Zigbee2MQTT **nano /etc/systemd/system/zigbee2mqtt.service** change "/usr/bin/npm start" to **"pnpm start"** In ExecStart and start the service Service wouldn't start with /usr/bin Just FYI
Author
Owner

@tomfrenzel commented on GitHub (Jan 5, 2025):

@MickLesk there seems to be a bug in the new install script:
image
The script hangs at "Setting up Zigbee2MQTT" since at some point user input is required. Typing "y" and enter makes the script proceed

@tomfrenzel commented on GitHub (Jan 5, 2025): @MickLesk there seems to be a bug in the new install script: ![image](https://github.com/user-attachments/assets/b3533125-40b8-496b-8fcd-47a51df0f894) The script hangs at "Setting up Zigbee2MQTT" since at some point user input is required. Typing "y" and enter makes the script proceed
Author
Owner

@tomfrenzel commented on GitHub (Jan 5, 2025):

And the service won't start automatically and looks like something is wrong
image

Altrough it works when i manually start the service, it can't be enabled
image

@tomfrenzel commented on GitHub (Jan 5, 2025): And the service won't start automatically and looks like something is wrong ![image](https://github.com/user-attachments/assets/b2ea1422-0c18-4324-85c6-965090f35a73) Altrough it works when i manually start the service, it can't be enabled ![image](https://github.com/user-attachments/assets/1b644339-b651-4c81-a561-8b8c5116d29f)
Author
Owner

@MickLesk commented on GitHub (Jan 5, 2025):

Fixed

@MickLesk commented on GitHub (Jan 5, 2025): Fixed
Author
Owner

@tomfrenzel commented on GitHub (Jan 5, 2025):

Fixed

The echo " is now gone but the WantedBy=multi-user.target is still missing after [Install]

@tomfrenzel commented on GitHub (Jan 5, 2025): > Fixed The `echo "` is now gone but the `WantedBy=multi-user.target` is still missing after `[Install]`
Author
Owner

@tomfrenzel commented on GitHub (Jan 5, 2025):

Now both are fixed 👍🏽 Thanks!

@tomfrenzel commented on GitHub (Jan 5, 2025): Now both are fixed 👍🏽 Thanks!
Author
Owner

@manelrodero commented on GitHub (Jan 5, 2025):

I had seen on a Home Assistant channel that the update to version 2.0 is problematic if you don't take into account that there are changes that can break things.

According to what they explain here https://youtu.be/MBlAwQ2eBVg you have to make some changes in the configuration file.

But I have seen this whole thread about the LXC update and I'm going to wait a while to do it ;-)

At the moment, I have a question that I don't know if it has to do with the change to version 2.0 or if it was there before.

I have Zigbee2MQTT working perfectly on an unprivileged LXC and without any additional features like nesting or keyctl.

image

Why do you use a privileged LXC?

@manelrodero commented on GitHub (Jan 5, 2025): I had seen on a Home Assistant channel that the update to version 2.0 is problematic if you don't take into account that there are changes that can break things. According to what they explain here https://youtu.be/MBlAwQ2eBVg you have to make some changes in the configuration file. But I have seen this whole thread about the LXC update and I'm going to wait a while to do it ;-) At the moment, I have a question that I don't know if it has to do with the change to version 2.0 or if it was there before. I have Zigbee2MQTT working perfectly on an unprivileged LXC and without any additional features like nesting or keyctl. ![image](https://github.com/user-attachments/assets/5cf9ec2c-d8dc-40f4-940b-7e5ff426ae5b) Why do you use a privileged LXC?
Author
Owner

@82sevo commented on GitHub (Jan 5, 2025):

I'm doing a fresh install and receive this message. Am I lacking a resource?

image

@82sevo commented on GitHub (Jan 5, 2025): I'm doing a fresh install and receive this message. Am I lacking a resource? ![image](https://github.com/user-attachments/assets/e9c0c35e-a129-4d99-b8e9-e1e39071299b)
Author
Owner

@snippem commented on GitHub (Jan 5, 2025):

I had seen on a Home Assistant channel that the update to version 2.0 is problematic if you don't take into account that there are changes that can break things.

According to what they explain here https://youtu.be/MBlAwQ2eBVg you have to make some changes in the configuration file.

But I have seen this whole thread about the LXC update and I'm going to wait a while to do it ;-)

At the moment, I have a question that I don't know if it has to do with the change to version 2.0 or if it was there before.

I have Zigbee2MQTT working perfectly on an unprivileged LXC and without any additional features like nesting or keyctl.

image

Why do you use a privileged LXC?

Maybe something you thought about but why not clone your existing z2m and update the cloned copy.
This is the way i do my trials 🙂

@snippem commented on GitHub (Jan 5, 2025): > I had seen on a Home Assistant channel that the update to version 2.0 is problematic if you don't take into account that there are changes that can break things. > > According to what they explain here https://youtu.be/MBlAwQ2eBVg you have to make some changes in the configuration file. > > But I have seen this whole thread about the LXC update and I'm going to wait a while to do it ;-) > > At the moment, I have a question that I don't know if it has to do with the change to version 2.0 or if it was there before. > > I have Zigbee2MQTT working perfectly on an unprivileged LXC and without any additional features like nesting or keyctl. > > ![image](https://private-user-images.githubusercontent.com/26098260/400247983-5cf9ec2c-d8dc-40f4-940b-7e5ff426ae5b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYxMTAwMTcsIm5iZiI6MTczNjEwOTcxNywicGF0aCI6Ii8yNjA5ODI2MC80MDAyNDc5ODMtNWNmOWVjMmMtZDhkYy00MGY0LTk0MGItN2U1ZmY0MjZhZTViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDIwNDE1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZhYmZmY2Q0MGJjNWZhMDgxMzI2ZWJkNjJkODg0N2RhODNkNjM4ODE2OWU2OTZmMjQ2ODY3M2JmODRkMDdmZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-reVFJA1dpZQq_IArxLy4W4cQRlv4H08Ufm4xNpPmmA) > > Why do you use a privileged LXC? Maybe something you thought about but why not clone your existing z2m and update the cloned copy. This is the way i do my trials 🙂
Author
Owner

@manelrodero commented on GitHub (Jan 5, 2025):

Maybe something you thought about but why not clone your existing z2m and update the cloned copy. This is the way i do my trials 🙂

Yes, I'm sure that when I upgrade I'll make a backup or use a clone first so as not to ruin the LXC that's running right now.

Anyway, I'm not in a hurry to upgrade because I don't think there are any major security issues (I still need to finish reading the notes for this release).

I'm more concerned about the privileged LXC issue that the script creates when doing a new installation.

@manelrodero commented on GitHub (Jan 5, 2025): > Maybe something you thought about but why not clone your existing z2m and update the cloned copy. This is the way i do my trials 🙂 Yes, I'm sure that when I upgrade I'll make a backup or use a clone first so as not to ruin the LXC that's running right now. Anyway, I'm not in a hurry to upgrade because I don't think there are any major security issues (I still need to finish reading the notes for this release). I'm more concerned about the privileged LXC issue that the script creates when doing a new installation.
Author
Owner

@MickLesk commented on GitHub (Jan 6, 2025):

I'm doing a fresh install and receive this message. Am I lacking a resource?

image

DNS issue. You cant reach Github

@MickLesk commented on GitHub (Jan 6, 2025): > I'm doing a fresh install and receive this message. Am I lacking a resource? > > ![image](https://github.com/user-attachments/assets/e9c0c35e-a129-4d99-b8e9-e1e39071299b) > DNS issue. You cant reach Github
Author
Owner

@MickLesk commented on GitHub (Jan 6, 2025):

I'm more concerned about the privileged LXC issue that the script creates when doing a new installation.

Because you need an USB Passthrough. If you dont have an privileged Script, you as "normal" User cant this.

@MickLesk commented on GitHub (Jan 6, 2025): >> I'm more concerned about the privileged LXC issue that the script creates when doing a new installation. Because you need an USB Passthrough. If you dont have an privileged Script, you as "normal" User cant this.
Author
Owner

@manelrodero commented on GitHub (Jan 6, 2025):

Not entirely true.
You can pass the USB without the LXC having to be privileged.
Check out the description of my LXC:

root@pve:/etc/pve/lxc# cat 309.conf 
#<div align='center'><a href='https%3A//Helper-Scripts.com' target='_blank' rel='noopener noreferrer'><img src='https%3A//raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo-81x112.png'/></a>
#
#  # Zigbee2MQTT LXC
#
#  <a href='https%3A//ko-fi.com/proxmoxhelperscripts'><img src='https%3A//img.shields.io/badge/&#x2615;-Buy me a coffee-blue' /></a>
#  </div>
# Passthrough USB
# lxc.cgroup2.devices.allow%3A a
# lxc.cap.drop%3A
# lxc.cgroup2.devices.allow%3A c 189%3A* rwm
# lxc.mount.entry%3A /dev/ttyUSB1       dev/ttyUSB1       none bind,optional,create=file
# lxc.mount.entry%3A /dev/ttyACM0       dev/ttyACM0       none bind,optional,create=file
# lxc.mount.entry%3A /dev/ttyACM1       dev/ttyACM1       none bind,optional,create=file
arch: amd64
cores: 2
hostname: zigbee2mqtt
memory: 1024
nameserver: 1.1.1.1
net0: name=eth0,bridge=vmbr0,gw=192.168.1.1,hwaddr=XX:XX:XX:XX:XX:XX,ip=192.168.1.86/24,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-309-disk-0,size=4G
searchdomain: home
swap: 512
tags: debian-12;proxmox-helper-scripts
unprivileged: 1
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/serial/by-id  dev/serial/by-id  none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0       dev/ttyUSB0       none bind,optional,create=file

Actually, many of the LXCs that are created by Helper Scripts could be non-privileged and we gain some security with that host isolation.

But I'm probably straying from the topic of this issue and this would lead to a more general discussion ;-)

@manelrodero commented on GitHub (Jan 6, 2025): Not entirely true. You can pass the USB without the LXC having to be privileged. Check out the description of my LXC: ``` root@pve:/etc/pve/lxc# cat 309.conf #<div align='center'><a href='https%3A//Helper-Scripts.com' target='_blank' rel='noopener noreferrer'><img src='https%3A//raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo-81x112.png'/></a> # # # Zigbee2MQTT LXC # # <a href='https%3A//ko-fi.com/proxmoxhelperscripts'><img src='https%3A//img.shields.io/badge/&#x2615;-Buy me a coffee-blue' /></a> # </div> # Passthrough USB # lxc.cgroup2.devices.allow%3A a # lxc.cap.drop%3A # lxc.cgroup2.devices.allow%3A c 189%3A* rwm # lxc.mount.entry%3A /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file # lxc.mount.entry%3A /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file # lxc.mount.entry%3A /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file arch: amd64 cores: 2 hostname: zigbee2mqtt memory: 1024 nameserver: 1.1.1.1 net0: name=eth0,bridge=vmbr0,gw=192.168.1.1,hwaddr=XX:XX:XX:XX:XX:XX,ip=192.168.1.86/24,type=veth onboot: 1 ostype: debian rootfs: local-lvm:vm-309-disk-0,size=4G searchdomain: home swap: 512 tags: debian-12;proxmox-helper-scripts unprivileged: 1 lxc.cgroup2.devices.allow: c 188:* rwm lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file ``` Actually, many of the LXCs that are created by Helper Scripts could be non-privileged and we gain some security with that host isolation. But I'm probably straying from the topic of this issue and this would lead to a more general discussion ;-)
Author
Owner

@MickLesk commented on GitHub (Jan 6, 2025):

And this can be Done by every user? Think bigger, not only for you.

@MickLesk commented on GitHub (Jan 6, 2025): And this can be Done by every user? Think bigger, not only for you.
Author
Owner

@manelrodero commented on GitHub (Jan 6, 2025):

I agree with you there. Not everyone edits configuration files.

But those who don't edit files are precisely those who don't know that a problem in a privileged LXC could affect their Proxmox host.

In that sense, I think it might be a good idea to try to make sure that LXCs have the minimum configuration necessary for their operation and that they are as secure as possible.

But as I said, I'm sorry to have strayed from the initial topic. This topic of LXC privileges would be enough for another new thread ;-)

@manelrodero commented on GitHub (Jan 6, 2025): I agree with you there. Not everyone edits configuration files. But those who don't edit files are precisely those who don't know that a problem in a privileged LXC could affect their Proxmox host. In that sense, I think it might be a good idea to try to make sure that LXCs have the minimum configuration necessary for their operation and that they are as secure as possible. But as I said, I'm sorry to have strayed from the initial topic. This topic of LXC privileges would be enough for another new thread ;-)
Author
Owner

@elad-bar commented on GitHub (Jan 7, 2025):

will join to that question about LXC being privileged,
i'm using ethernet zigbee router, i don't need the USB passthrough, why do i need to set it up as privileged?

got to this thread because the upgrade didn't work for me as well, failed on pnpm missing, fixed it locally, failed on dupliucate folder of zigbee2mqtt-2.0.0 folder, removed it and ran it again, failed on data folder is not exists (although it is),
will try installing new one and set it up from scratch, but before doing it - getting back to the question about the privileged LXC container script

thanks

@elad-bar commented on GitHub (Jan 7, 2025): will join to that question about LXC being privileged, i'm using ethernet zigbee router, i don't need the USB passthrough, why do i need to set it up as privileged? got to this thread because the upgrade didn't work for me as well, failed on pnpm missing, fixed it locally, failed on dupliucate folder of zigbee2mqtt-2.0.0 folder, removed it and ran it again, failed on data folder is not exists (although it is), will try installing new one and set it up from scratch, but before doing it - getting back to the question about the privileged LXC container script thanks
Author
Owner

@MickLesk commented on GitHub (Jan 7, 2025):

Same answer: And this can be Done by every user? Think bigger, not only for you

I close this for now, all merged and im Not answer for any Feature Request

If anyone need unprivilegeted==> use Advanced Settings

@MickLesk commented on GitHub (Jan 7, 2025): Same answer: And this can be Done by every user? Think bigger, not only for you I close this for now, all merged and im Not answer for any Feature Request If anyone need unprivilegeted==> use Advanced Settings
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#266