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

Error to restart and refresh the zigbee device, when i was adding the new device. #236

Closed
ansonf opened this issue Mar 31, 2022 · 5 comments · Fixed by #238
Closed

Error to restart and refresh the zigbee device, when i was adding the new device. #236

ansonf opened this issue Mar 31, 2022 · 5 comments · Fixed by #238

Comments

@ansonf
Copy link

ansonf commented Mar 31, 2022

Error to restart and refresh the zigbee device, when i was adding the new device.

TypeError: Cannot read properties of null (reading 'ota')
at ZigBeeClient.hasOTA (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/zigbee/zig-bee-client.ts:518:39)
at /usr/local/lib/node_modules/homebridge-zigbee-nt/src/web/api/devices.ts:29:56
at Generator.next ()
at /usr/local/lib/node_modules/homebridge-zigbee-nt/dist/web/api/devices.js:27:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/homebridge-zigbee-nt/dist/web/api/devices.js:23:12)
at /usr/local/lib/node_modules/homebridge-zigbee-nt/src/web/api/devices.ts:25:60
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/express/lib/router/route.js:112:3)

@ansonf
Copy link
Author

ansonf commented Mar 31, 2022

More detail here:
I think the problem is caused by Xiaomi QBKG03LM.

[31/03/2022, 19:02:55] [ZigBee] Reading KEY 'state' from '0x00158d000243cf66'
[31/03/2022, 19:02:55] [ZigBee] Reading KEY 'state' from '0x00158d000243cf66'
[31/03/2022, 19:02:55] Error: This callback function has already been called by someone else; it can only be called one time.
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:7:13
at SwitchServiceBuilder. (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/builders/switch-service-builder.ts:45:9)
at Generator.next ()
at /usr/local/lib/node_modules/homebridge-zigbee-nt/dist/builders/switch-service-builder.js:8:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/homebridge-zigbee-nt/dist/builders/switch-service-builder.js:4:12)
at On. (/usr/local/lib/node_modules/homebridge-zigbee-nt/src/builders/switch-service-builder.ts:43:87)
at On.emit (node:events:532:35)
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14
at new Promise ()
[31/03/2022, 19:02:55] Got SIGTERM, shutting down Homebridge...
[31/03/2022, 19:02:55] [ZigBee] Stopping zigbee service
[31/03/2022, 19:02:55] [ZigBee] Zigbee: disabling joining new devices.
[31/03/2022, 19:02:55] [Homebridge UI] Failed to refresh characteristics for Homebridge 7B56 104A: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:55] [Homebridge UI] Failed to refresh characteristics for 吧枱燈: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 吧枱燈: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for ZigBee Permit Join: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for ZigBee Touchlink: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 工作室房吸頂燈: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 客廳燈制: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 客廳燈制: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 工作室冷氣: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for Shelly motion: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for Shelly motion: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for Shelly motion: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 0x00158d000243cf66: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for 0x00158d000243cf66: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for LEFT: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for RIGHT: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [Homebridge UI] Failed to refresh characteristics for BOTH: connect ECONNREFUSED 192.168.0.65:51146
[31/03/2022, 19:02:56] [ZigBee] Stopping http server
[31/03/2022, 19:03:00] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[31/03/2022, 19:03:05] [HB Supervisor] Restarting Homebridge...
[31/03/2022, 19:03:05] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[31/03/2022, 19:03:05] [HB Supervisor] Started Homebridge v1.4.0 with PID: 3742
[31/03/2022, 19:03:09] Loaded config.json with 0 accessories and 4 platforms.
[31/03/2022, 19:03:09] Loaded 10 cached accessories from cachedAccessories.
[31/03/2022, 19:03:09] ---
[31/03/2022, 19:03:12] Loaded plug

@madchicken
Copy link
Owner

I will take a look. Thanks for reporting

@Stevethebeef
Copy link

seems to be related to the Xiaomi/Aqara Switches. I am getting the same error with the Xiaomi aqara WXKG02LM

@ansonf
Copy link
Author

ansonf commented Apr 19, 2022

seems to be related to the Xiaomi/Aqara Switches. I am getting the same error with the Xiaomi aqara WXKG02LM

I have tried the other plugin - z2m with zigbeetomqtt. The switch is working fine.

@madchicken
Copy link
Owner

I have probably to update the dependency with the zigbee library...it has been a while I don't update it

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

Successfully merging a pull request may close this issue.

3 participants