#Unparseable value {'0': 0} in Zwave integration

1 messages · Page 1 of 1 (latest)

bitter shadow
#

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?

GitHub

The problem The connection to the zwave js server crashes upon receiving a notification with an empty eventData field due to parsing it as a dictionary. What version of Home Assistant Core has the ...

hollow field
#

Requires code changes

bitter shadow
#

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?

hollow field
#

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

bitter shadow
bitter shadow
hollow field
#

If there are individuals associated with that group, I don't know, either way it doesn't mean anyone's going to respond.

bitter shadow
#

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)

hollow field
#

There might be a group. Not sure you can see it without proper project permissions. Doesn't really matter.

#

Bytes not serialized to Buffer

#

Could be a driver problem though, maybe it should support serializing to JSON

bitter shadow
#

Thank you!

hollow field
#

I'd still post a discussion in node-zwave-js, about returning the eventData

hollow field
#

It's quite possible that would be fixed before the rest of the stack.

bitter shadow
#

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

hollow field
#

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

hollow field
fierce silo
#

Zwave-js-server needs to handle the conversion to JSON. Seems that was missed on the upgrade to v14

hollow field
#

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.

fierce silo
#

toJSON is definitely better

bitter shadow
#

Wow, thank you both so much for the help!

hollow field
# fierce silo Hmm I didn't think of that. Just `Buffer.from(...)` didn't work.

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>