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

Rework the definition process for value IDs #552

Closed
AlCalzone opened this issue Jan 8, 2020 · 3 comments · Fixed by #4662
Closed

Rework the definition process for value IDs #552

AlCalzone opened this issue Jan 8, 2020 · 3 comments · Fixed by #4662
Assignees
Labels
Effort: huge ⛰ Complicated changes, should know Z-Wave and the codebase by heart, might require a larger refactor enhancement New feature or request

Comments

@AlCalzone
Copy link
Member

Some thoughts:

  • There should be a central property of each CC that provides named access to all defined value IDs (or functions that return a value ID) as well as metadata
  • If possible, this property should be used in the decorators (think about this)
  • It should be possible to define if this value is always accessible (e.g. writeonly values Add writeonly value IDs to some CCs that just send an "on" command #532) and/or private
  • This should replace or improve registerValue.
@robertsLando
Copy link
Member

What about using msg-pack-lite to decode the valueId json and encode it back to valueId? We could use it's encoding as unique Id. Also we could provide a public getId(ValueID valueId) : String method to calcolate a the valueId unique id

@robertsLando
Copy link
Member

Based on our slack conversation:

Is there a file where I can find all properties/ propertiesKeys of all command classes?

We could create a file with all properties/properties keys that actually are hardcoded in protected [SET_VALUE]:

Like https://github.com/zwave-js/node-zwave-js/blob/master/packages/zwave-js/src/lib/commandclass/MultilevelSwitchCC.ts#L249

@raman325
Copy link
Contributor

As discussed in Discord, this could be used to auto generate CC documentation. Once you get there, please include whether the CC has stateless values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort: huge ⛰ Complicated changes, should know Z-Wave and the codebase by heart, might require a larger refactor enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants