Z-Uno2 user defined configuration parameters

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
principia
Posts: 14
Joined: 28 Sep 2021 19:33

Z-Uno2 user defined configuration parameters

Post by principia »

I'm using Z-Uno2 with 3.0.8. I am looking to define and use custom Z-Wave configuration parameters. i looked at the Z-Uno reference and tried to build and run the Z-Uno2 sample but it didn't work. Looking at the source code it seems that I have to define the data structure for each parameter and add an accessor function that replaces the default __attribute__ ((weak) function. An extract of my code is below. This all works perfectly with both the SiLabs Simplicity Studio network tools and my Z-Wave application. Can you please confirm that this is the correct approach for the Z-Uno2 (or will there be a macro to replace the code)?

Code: Select all

/ LockButtonInterval
const ZunoCFGParameter_t userParam67 =
{
  .name = "LockButtonInterval",
  .info = "Lock button LED display time in seconds",
  .minValue = 1,
  .maxValue = 20,
  .defaultValue = 2,
  .size = ZUNO_CFG_PARAMETER_SIZE_16BIT,
  .format = ZUNO_CFG_PARAMETER_FORMAT_UNSIGNED,
  .readOnly = false,
  .altering = false
};

// Search available user configuration definitions and return if found
const ZunoCFGParameter_t *zunoCFGParameter(size_t param) {
  (void)param;
  switch (param) {
  case 64: return &userParam64;
  case 65: return &userParam65;
  case 66: return &userParam66;
  case 67: return &userParam67;
  }
  return (ZUNO_CFG_PARAMETER_UNKNOWN);
}
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Z-Uno2 user defined configuration parameters

Post by PoltoS »

We are reworking (simplifying) this API. If you can wait for the next release, would be perfect. Otherwise our engineers will help you with the current API.

This is how it will look like: https://z-uno.z-wave.me/reference_test/ ... index.html - check ZUNO_SETUP_CONFIGPARAMETERS.

And this is how it looked before (on the version you use): https://github.com/Z-Wave-Me/Z-Uno-Refe ... 588a278R82
principia
Posts: 14
Joined: 28 Sep 2021 19:33

Re: Z-Uno2 user defined configuration parameters

Post by principia »

Thanks for the update and the offer of engineer support. I can work with my code at the moment using the information on GitHub and the certification reference. The new macro approach looks nice and easy. i'll wait for that to be released and then update my code.
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Z-Uno2 user defined configuration parameters

Post by PoltoS »

We have a new beta out today (3.0.8 beta4, http://z-uno.z-wave.me/files/z-uno2/pac ... index.json). You can use the new style of config parameters
principia
Posts: 14
Joined: 28 Sep 2021 19:33

Re: Z-Uno2 user defined configuration parameters

Post by principia »

Thanks for the link to the 3.0.8 beta4. I've replaced my code with the macros and all is working. I'm using the "2B" version for my parameters.
Post Reply