Hey! I recently bought a Philio Tech PSK01 (Entry control keypad), and discovered that it has some issues with ZwaveJsUI and the Z-wave integration. When entry control events are passed from ZwaveJsUI to the integration, there is some conversion of an empty data field that results in a crash of the library used by the integration. I have previously filed an issue at github here: https://github.com/home-assistant/core/issues/134172 and gotten some hints as to what might be wrong, but have not been able to find a solution. Has anyone had similar issues before, or know if I might have misconfigured something?
#Unparseable value {'0': 0} in Zwave integration
1 messages · Page 1 of 1 (latest)
I understood that it might from that comment, yes. But do you know if there is a way to disable the Entry Control-notification (since I get what I want from another notification that is generated at the same time)? Also, do you know who is code-owner for this integration since "@home-assistant/z-wave" is listed as owner in the codeowners-file, and this seems to not have tagged anyone in the github issue?
There's not a single code owner. Mostly developed by volunteers.
If there's a way to disable the notification it would be a config parameter, see if there's anything in the manual
If you aren't using the add-on, the easiest would be to downgrade ZUI
That part I am up to speed with 🙂 I was rather wondering if there was meant to be a group of people tagged when this list (https://github.com/home-assistant/core/blob/dev/CODEOWNERS) said @home-assistant/z-wave.
No such parameter exists, but I am unfortunately using the add-on as well. Thanks for the help, I guess I will simply have to wait until someone (maybe me..) gets the time to look at the code changes needed..
If there are individuals associated with that group, I don't know, either way it doesn't mean anyone's going to respond.
I know it doesn't. But since the github bot tried to tag that tag, and it did not work (it is not a valid group/account), I wondered if that was something that might be worth filing another issue over (regarding the github bot)
There might be a group. Not sure you can see it without proper project permissions. Doesn't really matter.
You could submit another issue if you want at https://github.com/zwave-js/zwave-js-server/issues, although both projects are handled by the same people.
Bytes not serialized to Buffer
Could be a driver problem though, maybe it should support serializing to JSON
Thank you!
I'd still post a discussion in node-zwave-js, about returning the eventData
Driver in zwave_js_ui?
It's quite possible that would be fixed before the rest of the stack.
I'll have a look at it tomorrow, it's currently about two am here. Thanks for the help, will get back to you tomorrow
I'm not an expert on the server code (typescript), but one way would be to handle it in this code: https://github.com/zwave-js/zwave-js-server/blob/f47d5341aee1e884b5b37438b04e7ec94d4bc040/src/lib/forward.ts#L396-L430
When the notification has ccId == CommandClasses["Entry Control"], and args.eventData is a Uint8Array type, convert it to a Buffer. As a Buffer, the JSON serialization will be correct.
That doesn't solve the general problem
Yes, Z-Wave driver which is node-zwave-js, responsible for sending the entry control notification to the application (zwave-js-server in this case).
Zwave-js-server needs to handle the conversion to JSON. Seems that was missed on the upgrade to v14
Nice, figured there must be an elegant way to do it. 🙂
nodejs question, is that solution to manually create the "Buffer" object less work than simply Buffer.from(value).toJSON()?
Or just return Buffer.from(value) ? I guess it keeps the API compatible if for some reason nodejs changed.
Hmm I didn't think of that. Just Buffer.from(...) didn't work.
toJSON is definitely better
Wow, thank you both so much for the help!
Would this be why?
❯ node
Welcome to Node.js v22.12.0.
Type ".help" for more information.
> const { isUint8Array } = await import("node:util/types");
undefined
> let value = Uint8Array.from([1,2,3])
undefined
> isUint8Array(value)
true
> isUint8Array(Buffer.from(value))
true
> value
Uint8Array(3) [ 1, 2, 3 ]
> Buffer.from(value)
<Buffer 01 02 03>