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

On update to 9.27.1, all devices show unknown manufacturer, product, product code #4003

Closed
3 tasks done
luckyjay opened this issue Nov 13, 2024 · 18 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@luckyjay
Copy link
Contributor

Checklist

  • I am not using Home Assistant. Or: a developer has told me to come here.
  • I have checked the troubleshooting section and my problem is not described there.
  • I have read the changelog and my problem is not mentioned there.

Deploy method

PKG executable

Z-Wave JS UI version

9.27.1

ZwaveJS version

14.3.2

Describe the bug

I hope I didn't do something stupid, but after upgrading from 9.26.0 to 9.27.1, all my zwave devices are listed in the UI with unknown manufacturer, product, product code
image

To Reproduce

Update from 9.26.0 to 9.27.1.

Expected behavior

No unknowns in manufacturer, product, product code columns

Additional context

Falling back to 9.26.0 no longer shows unknowns.

Re-interviewing on 9.27.1 will complete, but does not correct the unknowns even after restarting the service.

Environment is Ubuntu 24 LTS x64 VM, fully patched/updated running on Proxmox.

@luckyjay luckyjay added the bug Something isn't working label Nov 13, 2024
@luckyjay
Copy link
Contributor Author

@kpine
Copy link
Contributor

kpine commented Nov 13, 2024

Are you setting environment variables STORE_DIR and ZWAVEJS_EXTERNAL_CONFIG?

@luckyjay
Copy link
Contributor Author

Are you setting environment variables STORE_DIR and ZWAVEJS_EXTERNAL_CONFIG?

I don't believe so. I can try if there's some guidance on what to set them to. I assume STORE_DIR is the path to the storage directory. But not sure about the external config.

Looking at logs, I saw this in the zwavejs log for 9.27.1 (not happening in 9.26.0)

image

@kpine
Copy link
Contributor

kpine commented Nov 13, 2024

@kpine
Copy link
Contributor

kpine commented Nov 13, 2024

ZUI has the deviceConfigPriorityDir setting, that should have the same effect as the environment variable, so if that's set correctly there's more to it. That's a different directory. Try setting the env var ZWAVEJS_EXTERNAL_CONFIG.

@luckyjay
Copy link
Contributor Author

I've been using the linux executable in the releases at https://github.com/zwave-js/zwave-js-ui/releases/, with no special env vars set in the past. Willing to try something but not sure what to set ZWAVEJS_EXTERNAL_CONFIG to.

@kpine
Copy link
Contributor

kpine commented Nov 13, 2024

There's an example at https://zwave-js.github.io/zwave-js-ui/#/getting-started/other-methods?id=npm. Put it anywhere that is persistent, e.g. the STORE directory.

@kpine
Copy link
Contributor

kpine commented Nov 13, 2024

@robertsLando I'd suggest some documentation updates to indicate that ZWAVEJS_EXTERNAL_CONFIG is required for all installations now, or you could add a UI setting that allows configuration of driver option deviceConfigExternalDir, and pre-configures a sensible default in the store directory, much like the deviceConfigPriorityDir option does.

Although, I'm not sure if this observed behavior was the intended side effect or not, or if the driver should have operated correctly without it.

@luckyjay
Copy link
Contributor Author

Okay, sorry for being a bonehead on that - I thought the env var was looking for a path to an existing file :(

I set the env var and I don't have unknowns now, when running from command line.

Now just need to incorporate that to apply when running as a service.

@luckyjay
Copy link
Contributor Author

Okay, looks like adding Environment to the systemd service definition works. But something automagic would be nice :)
image

@luckyjay
Copy link
Contributor Author

@robertsLando I'd suggest some documentation updates to indicate that ZWAVEJS_EXTERNAL_CONFIG is required for all installations now, or you could add a UI setting that allows configuration of driver option deviceConfigExternalDir, and pre-configures a sensible default in the store directory, much like the deviceConfigPriorityDir option does.

+1 for sensible default

@robertsLando
Copy link
Member

@kpine not sure if latest driver version changed something but I'm wondering why it wasn't needed before 🤔

I'm wondering if it could make sense to set default store folder and external db to homedir()/.zwave-js-ui. @AlCalzone thoughts? Of course this only when there are no env vars set

@kpine
Copy link
Contributor

kpine commented Nov 13, 2024

not sure if latest driver version changed something but I'm wondering why it wasn't needed before 🤔

It's a new requirement for v14: https://zwave-js.github.io/node-zwave-js/#/getting-started/migrating/v14?id=configuration-db-updates-require-an-external-config-directory

I'm wondering if it could make sense to set default store folder and external db to homedir()/.zwave-js-ui.

How about make it an option and default it to storeDir + "/.config-db" like deviceConfigPriorityDir and Docker containers?

@AlCalzone
Copy link
Member

AlCalzone commented Nov 13, 2024

Nevermind - I thought the cache files could not be loaded, but that's not the issue here.
Agree with @kpine - Use ${storeDir}/.config-db as the default and make it configurable.

@AlCalzone
Copy link
Member

Hmmm... At least the embedded config should get loaded, so I think this is still a bug in the bundling process.

@robertsLando
Copy link
Member

Hmmm... At least the embedded config should get loaded, so I think this is still a bug in the bundling process.

Yeah this is what I mean, if this issue never happened before it means this is related to something else

@AlCalzone
Copy link
Member

I've narrowed it down to zwave-js not being able to find the bundled config files in the executable created by pkg

@robertsLando
Copy link
Member

Wow it's not driver or zui issue, the issue is in pkg: yao-pkg/pkg#124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants