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

After hard resetting a controller, the integration page lists "no devices or entities" #3

Open
marcelveldt opened this issue Jul 13, 2023 · 6 comments
Labels
backend This bug or request (primary) involves the Home Assistant backend/integration (and its dependencies) bug Something isn't working but should by design frontend This bug or request (primary) involves the Home Assistant frontend

Comments

@marcelveldt
Copy link
Collaborator

marcelveldt commented Jul 13, 2023

After hard resetting the Z-Wave controller, e.g. by sending

{ "command": "driver.hard_reset" }

to zwave-js-server, the integration page shows "no devices or entities" for that instance, although the controller should be listed as a device.

The information does not come back when reloading the integration.
It does however come back when:

  • reloading the browser window
  • disabling and re-enabling the integration
reload_integration.mp4

Describe the behavior you expected

The device information should be up to date after reconnecting to zwave-js-server.

Steps to reproduce the issue

  1. Have an instance of zwave-js-server running in a way that you can send it custom commands, ideally from the repository on a dev machine.
  2. Set up a Z-Wave integration, do not use the supervisor addon, enter the path to your dev machine in the following dialog
  3. Make sure it shows the devices in the integration overview
  4. Send { "command": "driver.hard_reset" } to the server, e.g. by putting this file in the zwave-js-server repo as src/bin/hard_reset.ts, then execute it using ts-node src/bin/hard_reset.ts.
@marcelveldt marcelveldt added the bug Something isn't working but should by design label Jul 13, 2023
@marcelveldt marcelveldt changed the title Z-Wave JS: after hard resetting a controller, the integration page lists "no devices or entities" After hard resetting a controller, the integration page lists "no devices or entities" Jul 13, 2023
@raman325
Copy link
Collaborator

raman325 commented Oct 4, 2023

We call this when we get the hard reset request before we initiate the hard reset: https://github.com/zwave-js/zwave-js-server/blob/master/src/lib/server.ts#L595C1-L625. I am unclear why this issue is happening, when we close the websocket server in zwave-js-server, the HA client should disconnect and the config entry should reload until the server is up again.

Either that destroy logic isn't working correctly, or when the server starts up again, the Z-Wave network is in a weird state that we don't know how to handle downstream. I will try to test this behavior but if you have any other ideas I am all ears

@marcelveldt marcelveldt moved this from Later to TBD in Z-Wave JS: Road to Certification Jul 4, 2024
@marcelveldt marcelveldt added the frontend This bug or request (primary) involves the Home Assistant frontend label Jul 4, 2024
@marcelveldt marcelveldt moved this from TBD to Later in Z-Wave JS: Road to Certification Jul 4, 2024
@AlCalzone
Copy link
Member

Related to zwave-js/zwave-js-server#1216

@AlCalzone AlCalzone added the backend This bug or request (primary) involves the Home Assistant backend/integration (and its dependencies) label Jul 4, 2024
@MartinHjelmare
Copy link
Collaborator

MartinHjelmare commented Sep 2, 2024

What's the status? We've changed things around this in the server during August I believe. What's left to do?

@AlCalzone
Copy link
Member

AlCalzone commented Sep 2, 2024

After the recent server change, HA no longer notices when the controller is hard reset. Also prior to that change, the flow was very awkward. Considering it gets executed about 200-300 times during certification by hand, we should make sure it is smooth.

  • Figure out how to detect hard reset is done
  • React accordingly - Reload integration? Something better?
  • After a hard reset, navigate back to the Z-Wave "hub" configuration page:
    grafik
  • Make sure the information there is updated

@MartinHjelmare
Copy link
Collaborator

I think we should find out what to do, ie how to react to the hard reset, before the Hackaton. What messages are sent from the server to the client after the hard reset?

@AlCalzone
Copy link
Member

@raman325 Can you answer that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This bug or request (primary) involves the Home Assistant backend/integration (and its dependencies) bug Something isn't working but should by design frontend This bug or request (primary) involves the Home Assistant frontend
Projects
Development

No branches or pull requests

4 participants