zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
987 stars 201 forks source link

Issues with inclusion #2746

Closed bolderbast closed 2 years ago

bolderbast commented 2 years ago

Checklist

Deploy method

Docker

Z-Wave JS UI version

8.1.0

ZwaveJS version

10.3.0

Describe the bug

Node inclusion is only completed after restart of Zwave-JS-UI.

To Reproduce

  1. I start the inclusion process (no encryption)
  2. The countdown time (30 sec) starts
  3. I press the include button on the device
  4. After some time (before the countdown reaches 0), the countdown "hangs"
  5. When I refresh the GUI, nothing seems to have changed
  6. When I restart Zwave-JS-UI, all of a sudden the new node is added and being interviewed (and working fine)

Expected behavior

When the inclusion is completed, I expect the wizard to close and the interview to start, without having to first restart ZWave-JS-UI.

Additional context

I'm having this issues for at least a few months (and a couple of releases) already. It has worked perfectly fine before.

The stick is a Aeotec Gen5 (without +) with firmware 1.1. This happens with different types of nodes which I add.

To me it seems that at the point where the countdown "hangs", the actual inclusion is completed, but Zwave-JS(-UI) does not progress to the next step and needs a restart.

During log collection, I was unable to include/exclude a node (did try), but I had the wizard "hanging" multiple times during these attempts. Possibly the logs still show a clue of what is going on?

I know I have a lot of "Illumination" updates going on. But not to the extent where I would expect issues like this.

zwave-js-ui-store (4).zip

bolderbast commented 2 years ago

Hmmm, today I decided to power cycle the Aeotec Gen5 stick, and afterwards I was able to complete the inclusion wizard successfully. So it seems it may have been something with the stick. It was already powered-on for many months, and the power cycle may have fixed the issue. Do the logs support that theory?

robertsLando commented 2 years ago

Hi @bolderbast, I checked your logs and I also checked code, this could happen when for some reason I don't receive the node added event so the wizard waits indeterminately to receive that event (and hangs). On my side I wxactly see this except one time that I correctly get the node added event, on zwave-js I see this:

2022-10-20T13:06:58.156Z DRIVER « [REQ] [AddNodeToNetwork]
                                    status:      NodeFound
                                    callback id: 148
2022-10-20T13:06:58.162Z DRIVER   handling request AddNodeToNetwork (74)
2022-10-20T13:06:58.163Z DRIVER     1 handler registered!
2022-10-20T13:06:58.164Z DRIVER     invoking handler #0
2022-10-20T13:06:58.169Z CNTRLR   handling add node request (status = NodeFound)

That is actually happening only 1/4 of your inclusion tries. So I cannot say what's the root cause of this but this is the reason why you see the inclusion hanging on UI. @AlCalzone maybe can say more about but I have a feel it's a stick issue

To prevent this anyway I will add a timeout on wizard that at least shows something if nothing happens instead of hanging