Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z2M Addon randomly stops with error messages #650

Closed
eldudemeister opened this issue Oct 28, 2024 · 4 comments
Closed

Z2M Addon randomly stops with error messages #650

eldudemeister opened this issue Oct 28, 2024 · 4 comments
Labels

Comments

@eldudemeister
Copy link

eldudemeister commented Oct 28, 2024

Description of the issue

Following a power cut, I've had issues with Z2M peridocally crashing. It will run for a while then crash again. Restarting the addon brings it back for a bit then it will drop again. Running Z2M as a HA addon with a SLZB-06 running over POE, I've tried using different network cables and different ports in the network switch.

Addon version

1.40.2-1

Platform

Core 2024.10.4
Supervisor 2024.10.3
Operating System 13.2
Frontend 20241002.3

Addon Config

This is my addon config as well

socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt: {}
serial:
  serial:
    port: tcp://10.10.10.116:6638
    baudrate: 115200
    adapter: zstack
    disable_led: false
  advanced:
    transmit_power: 20
    disable_led: false
watchdog: default

Logs of the issue (if applicable)

    at Socket.emit (node:events:529:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[07:53:19] INFO: Preparing to start...
[07:53:19] INFO: Socat not enabled
[07:53:19] INFO: Enabled Zigbee2MQTT watchdog with value 'default'
[07:53:20] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 07:53:21] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-28 07:53:21] error: 	z2m: Failed to start zigbee
[2024-10-28 07:53:21] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-28 07:53:21] error: 	z2m: Exiting...
[2024-10-28 07:53:21] error: 	z2m: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:166:24)
    at Socket.emit (node:events:529:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
[08:20:52] INFO: Preparing to start...
[08:20:52] INFO: Socat not enabled
[08:20:52] INFO: Enabled Zigbee2MQTT watchdog with value 'default'
[08:20:52] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:20:54] error: 	zh:zstack:znp: Error while parsing to ZpiObject 'TypeError: Cannot read properties of undefined (reading 'execute')'
[2024-10-28 08:21:10] error: 	z2m: Adapter disconnected, stopping
WATCHDOG: Waiting 0.03333333333333333min before next start try.
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:21:12] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-28 08:21:12] error: 	z2m: Failed to start zigbee
[2024-10-28 08:21:12] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-28 08:21:12] error: 	z2m: Exiting...
[2024-10-28 08:21:12] error: 	z2m: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:166:24)
    at Socket.emit (node:events:529:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
WATCHDOG: Waiting 1min before next start try.
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:22:12] error: 	zh:zstack:znp: Error while parsing to ZpiObject 'TypeError: Cannot read properties of undefined (reading 'execute')'
[2024-10-28 08:24:21] error: 	zh:controller: Failed to keep permit join alive: Error: SRSP - ZDO - mgmtPermitJoinReq after 6000ms
[2024-10-28 08:27:41] error: 	zh:controller: Failed to keep permit join alive: Error: SRSP - ZDO - mgmtPermitJoinReq after 6000ms
[2024-10-28 08:30:33] error: 	z2m: Adapter disconnected, stopping
WATCHDOG: Waiting 0.03333333333333333min before next start try.
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:30:35] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-28 08:30:35] error: 	z2m: Failed to start zigbee
[2024-10-28 08:30:35] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-28 08:30:35] error: 	z2m: Exiting...
[2024-10-28 08:30:35] error: 	z2m: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:166:24)
    at Socket.emit (node:events:529:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
WATCHDOG: Waiting 1min before next start try.

/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
  var er = new ERR_STREAM_WRITE_AFTER_END();
           ^
Error: write after end
    at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
    at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
    at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
    at Logger.log (/app/lib/util/logger.ts:198:25)
    at Logger.error (/app/lib/util/logger.ts:203:14)
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:299:28)
[08:31:02] INFO: Preparing to start...
[08:31:02] INFO: Socat not enabled
[08:31:02] INFO: Enabled Zigbee2MQTT watchdog with value 'default'
[08:31:02] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:31:20] error: 	z2m: Adapter disconnected, stopping
WATCHDOG: Waiting 0.03333333333333333min before next start try.
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:31:23] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-28 08:31:23] error: 	z2m: Failed to start zigbee
[2024-10-28 08:31:23] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-28 08:31:23] error: 	z2m: Exiting...
[2024-10-28 08:31:23] error: 	z2m: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:166:24)
    at Socket.emit (node:events:529:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
WATCHDOG: Waiting 1min before next start try.
Starting Zigbee2MQTT with watchdog (2000,60000,300000,900000,1800000,3600000).
[2024-10-28 08:32:23] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-28 08:32:23] error: 	z2m: Failed to start zigbee
[2024-10-28 08:32:23] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-28 08:32:23] error: 	z2m: Exiting...
[2024-10-28 08:32:23] error: 	z2m: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:166:24)
    at Socket.emit (node:events:529:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
WATCHDOG: Waiting 5min before next start try```
@BGuldhammer
Copy link

BGuldhammer commented Oct 30, 2024

It might be related.

My Z2M throws this error

error 2024-10-30 15:45:22z2m: Publish 'set' 'state' to 'Pære Forgang' failed: 'Error: ZCL command 0x0017880104cbeb71/11 genOnOff.on({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'

And it pretty much beeing unresopnsive, it fixes it by restaring Z2M and it will run for a while, and stops working again.
It started in the weekend, and have not changed my config for month.

Have rolled back to an earlier hass backup an deactivated auto update addon for now.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Nov 30, 2024
@Nosnahc
Copy link

Nosnahc commented Dec 3, 2024

Did you desactivate "Zigbee Home Automation" ?

@eldudemeister
Copy link
Author

Thanks for the reply, I didn’t have it activated intially. I think the issue was with my zigbee coordinator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants