# Проблема с zigbee2mqtt

**URL:** <https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096>\
**Category:** Без категории\
**Created:** [January 11, 2022, 10:56am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096 "2022-01-11T10:56:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evgeniy072](https://avatars.discourse-cdn.com/v2/letter/e/e95f7d/32.png) [@Evgeniy072](https://support.wirenboard.com/u/Evgeniy072)\
**Post date:** [January 11, 2022, 10:56am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/1 "2022-01-11T10:56:31Z")

</div>

Добрый день!

Подскажите пожалуйста, куда копать?  
Модуль стоит. Просто перестала отвечать вебморда.

# Системный журнал

| 11-01-2022 15:30:13.154 | Started zigbee2mqtt. |
| --- | --- |
| 11-01-2022 15:30:13.122 | Stopped zigbee2mqtt. |
| 11-01-2022 15:30:13.112 | zigbee2mqtt.service: Service hold-off time over, scheduling restart. |
| 11-01-2022 15:30:12.877 | zigbee2mqtt.service: Failed with result ‘exit-code’. |
| 11-01-2022 15:30:12.866 | zigbee2mqtt.service: Unit entered failed state. |
| 11-01-2022 15:30:12.806 | zigbee2mqtt.service: Main process exited, code=exited, status=1/FAILURE |
| 11-01-2022 15:30:12.724 | npm ERR! /root/.npm/\_logs/2022-01-11T10\_30\_12\_462Z-debug.log |
| 11-01-2022 15:30:12.705 | npm ERR! A complete log of this run can be found in: |
| 11-01-2022 15:30:12.417 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. |
| 11-01-2022 15:30:12.406 | npm ERR! Failed at the zigbee2mqtt@1.18.1 start script. |
| 11-01-2022 15:30:12.397 | npm ERR! |
| 11-01-2022 15:30:12.380 | npm ERR! Exit status 1 |
| 11-01-2022 15:30:12.370 | npm ERR! zigbee2mqtt@1.18.1 start: `node index.js` |
| 11-01-2022 15:30:12.016 | npm ERR! errno 1 |
| 11-01-2022 15:30:12.006 | npm ERR! code ELIFECYCLE |
| 11-01-2022 15:30:10.827 | } |
| 11-01-2022 15:30:10.827 | requireStack: [‘/mnt/data/root/zigbee2mqtt/index.js’] |
| 11-01-2022 15:30:10.827 | code: ‘MODULE\_NOT\_FOUND’, |
| 11-01-2022 15:30:10.827 | at Function.executeUserEntryPoint [as runMain] (internal/modules/run\_main.js:60:12) { |
| 11-01-2022 15:30:10.827 | at Function.Module.\_load (internal/modules/cjs/loader.js:724:14) |
| 11-01-2022 15:30:10.827 | at Module.load (internal/modules/cjs/loader.js:879:32) |
| 11-01-2022 15:30:10.827 | at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1035:10) |
| 11-01-2022 15:30:10.827 | at Module.\_compile (internal/modules/cjs/loader.js:1015:30) |
| 11-01-2022 15:30:10.827 | at Object. (/mnt/data/root/zigbee2mqtt/index.js:1:16) |
| 11-01-2022 15:30:10.827 | at require (internal/modules/cjs/helpers.js:74:18) |
| 11-01-2022 15:30:10.827 | at Module.require (internal/modules/cjs/loader.js:903:19) |
| 11-01-2022 15:30:10.827 | at Function.Module.\_load (internal/modules/cjs/loader.js:687:27) |
| 11-01-2022 15:30:10.827 | at Function.Module.\_resolveFilename (internal/modules/cjs/loader.js:831:15) |
| 11-01-2022 15:30:10.827 | - /mnt/data/root/zigbee2mqtt/index.js |
| 11-01-2022 15:30:10.827 | Require stack: |
| 11-01-2022 15:30:10.827 | Error: Cannot find module ‘semver’ |
| 11-01-2022 15:30:10.827 | ^ |
| 11-01-2022 15:30:10.827 | throw err; |
| 11-01-2022 15:30:10.827 | internal/modules/cjs/loader.js:834 |
| 11-01-2022 15:30:05.331 | \> node index.js |
| 11-01-2022 15:30:05.331 | \> zigbee2mqtt@1.18.1 start /mnt/data/root/zigbee2mqtt |
| 11-01-2022 15:29:42.674 | Started zigbee2mqtt. |

SSH

root@wirenboard-A2TSB4LR:~# systemctl status zigbee2mqtt  
● zigbee2mqtt.service - zigbee2mqtt  
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)  
Active: active (running) since Tue 2022-01-11 10:54:46 UTC; 29s ago  
Main PID: 10212 (node)  
CGroup: /system.slice/zigbee2mqtt.service  
├─10212 npm  
├─10259 /usr/bin/node /usr/lib/node\_modules/npm/node\_modules/update-notifier/check.js {“pkg”:{  
├─10282 sh -c node index.js  
└─10283 node index.js

Jan 11 10:54:46 wirenboard-A2TSB4LR systemd[1]: zigbee2mqtt.service: Unit entered failed state.  
Jan 11 10:54:46 wirenboard-A2TSB4LR systemd[1]: zigbee2mqtt.service: Failed with result ‘exit-code’.  
Jan 11 10:54:46 wirenboard-A2TSB4LR systemd[1]: zigbee2mqtt.service: Service hold-off time over, scheduli  
Jan 11 10:54:46 wirenboard-A2TSB4LR systemd[1]: Stopped zigbee2mqtt.  
Jan 11 10:54:46 wirenboard-A2TSB4LR systemd[1]: Started zigbee2mqtt.  
Jan 11 10:55:11 wirenboard-A2TSB4LR npm[10212]: \> zigbee2mqtt@1.18.1 start /mnt/data/root/zigbee2mqtt  
Jan 11 10:55:11 wirenboard-A2TSB4LR npm[10212]: \> node index.js

---

<div class="post-metadata">

**Author:** ![BrainRoot](https://avatars.discourse-cdn.com/v2/letter/b/c2a13f/32.png) [@BrainRoot](https://support.wirenboard.com/u/BrainRoot)\
**Post date:** [January 11, 2022, 12:10pm UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/3 "2022-01-11T12:10:29Z")

</div>

Добрый день. А что в создаваемом “debug” файле, путь к коотрому выводит сервис?

---

<div class="post-metadata">

**Author:** ![Evgeniy072](https://avatars.discourse-cdn.com/v2/letter/e/e95f7d/32.png) [@Evgeniy072](https://support.wirenboard.com/u/Evgeniy072)\
**Post date:** [January 11, 2022, 1:02pm UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/4 "2022-01-11T13:02:33Z")

</div>

> [@Evgeniy072](#):
>
> npm ERR! /root/.npm/\_logs/2022-01-11T10\_30\_12\_462Z-debug.log

как понимаю речь идет об этом дебаге…?

его нет…

---

<div class="post-metadata">

**Author:** ![BrainRoot](https://avatars.discourse-cdn.com/v2/letter/b/c2a13f/32.png) [@BrainRoot](https://support.wirenboard.com/u/BrainRoot)\
**Post date:** [January 12, 2022, 7:00am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/5 "2022-01-12T07:00:59Z")

</div>

Выполните запуск вручную:

```auto
systemctl stop zigbee2mqtt
cd /mnt/data/root/zigbee2mqtt && node index.js

```

Ну и покажите результат

---

<div class="post-metadata">

**Author:** ![Evgeniy072](https://avatars.discourse-cdn.com/v2/letter/e/e95f7d/32.png) [@Evgeniy072](https://support.wirenboard.com/u/Evgeniy072)\
**Post date:** [January 12, 2022, 7:07am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/6 "2022-01-12T07:07:22Z")

</div>

> [@BrainRoot](#):
>
> `cd /mnt/data/root/zigbee2mqtt && node index.js`

 ![image](https://support.wirenboard.com/uploads/default/original/2X/e/ed9147aee6c28db1b500e5e337a01ca698f00c8e.png)

---

<div class="post-metadata">

**Author:** ![Evgeniy072](https://avatars.discourse-cdn.com/v2/letter/e/e95f7d/32.png) [@Evgeniy072](https://support.wirenboard.com/u/Evgeniy072)\
**Post date:** [January 12, 2022, 7:53am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/7 "2022-01-12T07:53:09Z")

</div>

/mnt/data/root/zigbee2mqtt/index.js

–

const semver = require(‘semver’);  
const engines = require(’./package.json’).engines;  
const indexJsRestart = ‘indexjs.restart’;

let controller;  
let stopping = false;

async function restart() {  
await stop(indexJsRestart);  
await start();  
}

async function exit(code, reason) {  
if (reason !== indexJsRestart) {  
process.exit(code);  
}  
}

async function start() {  
const version = engines.node;  
if (!semver.satisfies(process.version, version)) {  
console.log(`\t\tZigbee2MQTT requires node version ${version}, you are running ${process.version}!\n`); // eslint-disable-line  
}

```
// Validate settings
const settings = require('./lib/util/settings');
const errors = settings.validate();
if (errors.length > 0) {
    console.log(`\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!`);
    console.log(' READ THIS CAREFULLY\n');
    console.log(`Refusing to start because configuration is not valid, found the following errors:`);
    for (const error of errors) {
        console.log(`- ${error}`);
    }
    console.log(`\nIf you don't know how to solve this, read https://www.zigbee2mqtt.io/information/configuration.html`); // eslint-disable-line
    console.log(`\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n`);
    exit(1);
}

const Controller = require('./lib/controller');
controller = new Controller(restart, exit);
await controller.start();

```

}

async function stop(reason=null) {  
await controller.stop(reason);  
}

async function handleQuit() {  
if (!stopping && controller) {  
stopping = true;  
await stop();  
}  
}

process.on(‘SIGINT’, handleQuit);  
process.on(‘SIGTERM’, handleQuit);

start();

---

<div class="post-metadata">

**Author:** ![BrainRoot](https://avatars.discourse-cdn.com/v2/letter/b/c2a13f/32.png) [@BrainRoot](https://support.wirenboard.com/u/BrainRoot)\
**Post date:** [January 12, 2022, 8:01am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/8 "2022-01-12T08:01:10Z")

</div>

> **[semver](https://www.npmjs.com/package/semver)**
>
> The semantic version parser used by npm.

```auto
npm install semver

```

---

<div class="post-metadata">

**Author:** ![Evgeniy072](https://avatars.discourse-cdn.com/v2/letter/e/e95f7d/32.png) [@Evgeniy072](https://support.wirenboard.com/u/Evgeniy072)\
**Post date:** [January 12, 2022, 9:52am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/9 "2022-01-12T09:52:26Z")

</div>

Last login: Wed Jan 12 08:44:32 2022 from 192.168.0.16  
root@wirenboard-A2TSB4LR:~# npm install semver  
npm WARN saveError ENOENT: no such file or directory, open ‘/mnt/data/root/package.json’  
npm WARN enoent ENOENT: no such file or directory, open ‘/mnt/data/root/package.json’  
npm WARN root No description  
npm WARN root No repository field.  
npm WARN root No README data  
npm WARN root No license field.

- semver@7.3.5  
updated 1 package and audited 4 packages in 26.113s  
found 0 vulnerabilities

- semver@7.3.5  
updated 1 package and audited 4 packages in 24.961s  
found 0 vulnerabilities

> 

root@wirenboard-A2TSB4LR:~# npm install semver  
npm WARN root No description  
npm WARN root No repository field.  
npm WARN root No license field.

- semver@7.3.5  
updated 1 package and audited 3 packages in 32.686s  
found 0 vulnerabilities

# Системный журнал

| 12-01-2022 14:52:39.544 | Started zigbee2mqtt. |
| --- | --- |
| 12-01-2022 14:52:39.362 | Stopped zigbee2mqtt. |
| 12-01-2022 14:52:39.178 | zigbee2mqtt.service: Service hold-off time over, scheduling restart. |
| 12-01-2022 14:52:38.969 | (node:23040) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. |
| 12-01-2022 14:52:38.740 | (node:23040) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see [Command-line API | Node.js v25.2.1 Documentation](https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode)). (rejection id: 1) |
| 12-01-2022 14:52:38.740 | at Module.require (internal/modules/cjs/loader.js:903:19) |
| 12-01-2022 14:52:38.740 | at Function.Module.\_load (internal/modules/cjs/loader.js:724:14) |
| 12-01-2022 14:52:38.740 | at Module.load (internal/modules/cjs/loader.js:879:32) |
| 12-01-2022 14:52:38.740 | at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:1035:10) |
| 12-01-2022 14:52:38.740 | at Module.\_compile (internal/modules/cjs/loader.js:1015:30) |
| 12-01-2022 14:52:38.740 | at Object. (/mnt/data/root/zigbee2mqtt/lib/util/utils.js:1:16) |
| 12-01-2022 14:52:38.740 | at require (internal/modules/cjs/helpers.js:74:18) |
| 12-01-2022 14:52:38.740 | at Module.require (internal/modules/cjs/loader.js:903:19) |
| 12-01-2022 14:52:38.740 | at Function.Module.\_load (internal/modules/cjs/loader.js:687:27) |
| 12-01-2022 14:52:38.740 | at Function.Module.\_resolveFilename (internal/modules/cjs/loader.js:831:15) |
| 12-01-2022 14:52:38.740 | - /mnt/data/root/zigbee2mqtt/index.js |
| 12-01-2022 14:52:38.740 | - /mnt/data/root/zigbee2mqtt/lib/util/settings.js |
| 12-01-2022 14:52:38.740 | - /mnt/data/root/zigbee2mqtt/lib/util/utils.js |
| 12-01-2022 14:52:38.740 | Require stack: |
| 12-01-2022 14:52:38.740 | (node:23040) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘fast-deep-equal/es6’ |
| 12-01-2022 14:52:32.663 | \> node index.js |
| 12-01-2022 14:52:32.663 | \> zigbee2mqtt@1.18.1 start /mnt/data/root/zigbee2mqtt |
| 12-01-2022 14:52:21.497 | Started zigbee2mqtt. |

---

<div class="post-metadata">

**Author:** ![BrainRoot](https://avatars.discourse-cdn.com/v2/letter/b/c2a13f/32.png) [@BrainRoot](https://support.wirenboard.com/u/BrainRoot)\
**Post date:** [January 12, 2022, 11:02am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/10 "2022-01-12T11:02:51Z")

</div>

То есть не хватает не только одного модуля. Советую удалить nodejs и поставить снова.

---

<div class="post-metadata">

**Author:** ![Evgeniy072](https://avatars.discourse-cdn.com/v2/letter/e/e95f7d/32.png) [@Evgeniy072](https://support.wirenboard.com/u/Evgeniy072)\
**Post date:** [January 14, 2022, 4:55am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/11 "2022-01-14T04:55:30Z")

</div>

> [@Рабочая инструкция по подключению и настройке zigbee модуля](https://support.wirenboard.com/t/rabochaya-instrukcziya-po-podklyucheniyu-i-nastrojke-zigbee-modulya/5713/13):
>
> У меня такое было, когда глючил node.js, сбрасывал вайрон полностью, factory reset делал, ну и по новой ставил его

wb6\_update\_FACTORYRESET

[https://wirenboard.com/wiki/Wiren\_Board\_Firmware\_Update#Обновление\_с\_USB-накопителя\_и\_сброс\_к\_заводским\_настройкам](https://wirenboard.com/wiki/Wiren_Board_Firmware_Update#%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D1%81_USB-%D0%BD%D0%B0%D0%BA%D0%BE%D0%BF%D0%B8%D1%82%D0%B5%D0%BB%D1%8F_%D0%B8_%D1%81%D0%B1%D1%80%D0%BE%D1%81_%D0%BA_%D0%B7%D0%B0%D0%B2%D0%BE%D0%B4%D1%81%D0%BA%D0%B8%D0%BC_%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0%D0%BC)

---

<div class="post-metadata">

**Author:** ![system](https://support.wirenboard.com/uploads/default/original/2X/5/5ac90dc8a7bdff486d3494a19ec6aaa6f6cc5d36.png) [@system](https://support.wirenboard.com/u/system)\
**Post date:** [January 21, 2022, 4:56am UTC](https://support.wirenboard.com/t/problema-s-zigbee2mqtt/10096/12 "2022-01-21T04:56:04Z")

</div>

Эта тема была автоматически закрыта через 7 дней после последнего ответа. В ней больше нельзя отвечать.
