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

zigbee2mqtt is not compatible with node V11 #552

Closed
borpin opened this Issue Oct 30, 2018 · 18 comments

Comments

Projects
None yet
6 participants
@borpin
Copy link

borpin commented Oct 30, 2018

Device IKEA TRADFRI LED bulb

Bug report

  • First make sure your on the latest version of zigbee2mqtt. yes
  • Make sure you are running the latest CC253X firmware from https://github.com/koenkk/z-stack-firmware. yes - flashed this week
  • Provide a clear description of the problem.

Installed on a RPi Zero - some bluetooth activity.

Starting zigbee2mqtt as a service. One device connected (although it says 2 for some reason - no other zigbee devices in house). Able to switch light on / off a couple of times via the set MQTT topic then bridge hangs and eventually reports zigbee2mqtt/bridge/state offline (nothing in log).

Process node index.js goes to 100%

[edit] further checking and I am finding zigbee2mqtt just hangs / goes offline after a few minutes even without any other intervention and nothing in logs [\edit]

Restart service and repeat.

MQTT activity during period of log - note last 3 set commands unreported.

zigbee2mqtt/bridge/state online
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp/set {"state": "off"}
zigbee2mqtt/Standing Lamp {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp/set {"state": "on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp/set {"state": "off"}
zigbee2mqtt/Standing Lamp {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp/set {"state": "on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp/set {"state": "off"}
zigbee2mqtt/Standing Lamp/set {"state": "off"}
zigbee2mqtt/Standing Lamp/set {"state": "off"}
zigbee2mqtt/bridge/state offline
@Koenkk

This comment has been minimized.

Copy link
Owner

Koenkk commented Oct 31, 2018

Can you try if this issue also happens when running on a different device?

@borpin

This comment has been minimized.

Copy link
Author

borpin commented Oct 31, 2018

Hi, not really. It is the only RPiW I have.

@Koenkk

This comment has been minimized.

Copy link
Owner

Koenkk commented Oct 31, 2018

Can you provide the log when running with DEBUG=* npm start?

@borpin

This comment has been minimized.

Copy link
Author

borpin commented Oct 31, 2018

https://gist.github.com/borpin/cebcfe3bfea3c8dd8987f8dc226fc086

MQTT messages published from another device and the published messages published from a third machine.

Note log stops after last mqtt message is sent by zigbee2mqtt.

Found this in my mqtt log (on a different run)

1541012406: Client mqttjs_2869dda5 has exceeded timeout, disconnecting.
1541012406: Socket error on client mqttjs_2869dda5, disconnecting.

Up till then there were PINGREQ but difficult to tell properly.

zigbee2mqtt/bridge/state online
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp/set {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp/set {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp/set {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp/set {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp/set {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"off"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp {"state":"OFF"}
zigbee2mqtt/Standing Lamp/set {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"on"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp {"state":"ON"}
zigbee2mqtt/Standing Lamp/set {"state":"off"}
zigbee2mqtt/Standing Lamp/set {"state":"off"}
zigbee2mqtt/Standing Lamp/set {"state":"off"}
zigbee2mqtt/bridge/state offline
@Koenkk

This comment has been minimized.

Copy link
Owner

Koenkk commented Oct 31, 2018

Which nodejs version do you have?

@borpin

This comment has been minimized.

Copy link
Author

borpin commented Oct 31, 2018

node -v
v11.0.0
@Koenkk

This comment has been minimized.

Copy link
Owner

Koenkk commented Nov 1, 2018

Can you try with nodejs 8? That is the recommended version: https://github.com/Koenkk/zigbee2mqtt/wiki/Running-the-bridge#2-installing

@borpin borpin changed the title zigbee2mqtt hangs zigbee2mqtt is not compatible with node V11 Nov 2, 2018

@borpin

This comment has been minimized.

Copy link
Author

borpin commented Nov 2, 2018

Can you try with nodejs 8?

Hi @Koenkk, I can confirm it works with node V11. I have edited the title appropriately.

Cheers

@sehraf

This comment has been minimized.

Copy link

sehraf commented Nov 3, 2018

Hi, i can confirm the described behavior. Running v11 and process hangs at ~100% CPU shortly after starting.

node -v       
v11.0.0

used hardware: Phillips Hue White + Dimmer

@Koenkk

This comment has been minimized.

Copy link
Owner

Koenkk commented Nov 3, 2018

@borpin thanks!

@Koenkk Koenkk added the bug label Nov 3, 2018

@aktentasche

This comment has been minimized.

Copy link

aktentasche commented Nov 4, 2018

I just did my first install using node 11 on an Orange Pi PC running armbain mainline and I cannot confirm. If I can be of help let me know.

@sehraf

This comment has been minimized.

Copy link

sehraf commented Nov 4, 2018

@aktentasche v11 or v11.1?
@borpin can you try out version v11.1?
I've played around with it yesterday and it seems to be running fine now using v11.1 (it still rarely hangs sometimes though).

(EDIT: clarified used version)

@aktentasche

This comment has been minimized.

Copy link

aktentasche commented Nov 4, 2018

@sehraf node v11.1.0

@alex-voigt

This comment has been minimized.

Copy link

alex-voigt commented Nov 4, 2018

I also had problems with Osram smart plugs using version v11.0. After updating to v11.1.0 it seems to work fine so far

@xoxys

This comment has been minimized.

Copy link

xoxys commented Nov 5, 2018

Ok got it. You should run npm install as non-root user... My fault sorry. Maybe add this info to the doc?

Can you try with nodejs 8? That is the recommended version: https://github.com/Koenkk/zigbee2mqtt/wiki/Running-the-bridge#2-installing

@Koenkk Really? WIth nodejs 8.12 i get:

3652 verbose stack Error: serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
3652 verbose stack Exit status 1
3652 verbose stack     at EventEmitter.<anonymous> (/opt/nodejs/node-v8.12.0-linux-armv6l/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
3652 verbose stack     at emitTwo (events.js:126:13)
3652 verbose stack     at EventEmitter.emit (events.js:214:7)
3652 verbose stack     at ChildProcess.<anonymous> (/opt/nodejs/node-v8.12.0-linux-armv6l/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3652 verbose stack     at emitTwo (events.js:126:13)
3652 verbose stack     at ChildProcess.emit (events.js:214:7)
3652 verbose stack     at maybeClose (internal/child_process.js:915:16)
3652 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
3653 verbose pkgid serialport@6.2.2
3654 verbose cwd /opt/zigbee2mqtt
3655 verbose Linux 4.14.27-v7.1.el7
3656 verbose argv "/opt/nodejs/node-v8.12.0-linux-armv6l/bin/node" "/opt/nodejs/latest/bin/npm" "install"
3657 verbose node v8.12.0
3658 verbose npm  v6.4.1
3659 error code ELIFECYCLE
3660 error errno 1
3661 error serialport@6.2.2 install: `prebuild-install || node-gyp rebuild`
3661 error Exit status 1
3662 error Failed at the serialport@6.2.2 install script.
3662 error This is probably not a problem with npm. There is likely additional logging output above.
3663 verbose exit [ 1, true ]
@Koenkk

This comment has been minimized.

Copy link
Owner

Koenkk commented Nov 6, 2018

@xoxys what system are you running it on? What happens after rm -rf node_modules && npm install.

@xoxys

This comment has been minimized.

Copy link

xoxys commented Nov 6, 2018

@Koenkk CentOS7 ARM on a RPi. I have updated my comment. It works now after running npm install as non-root user... Seems to be a requirement of serialport

Koenkk added a commit that referenced this issue Nov 7, 2018

@stale

This comment has been minimized.

Copy link

stale bot commented Jan 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 5, 2019

@stale stale bot closed this Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.