Hi,
It is not necessary to change this header, it is used by our preprocessor. How exactly the preprocessor converts the data can be seen in the build directory zunopreproc/ZUNO_AutoSetup.c. The handler specified by ZUNO_SETUP_CFGPARAMETER_HANDLER will work ONLY with static channel creation. When dynamically setting channels, use zunoAttachSysHandle.
Here are 2 examples.
1. Static definition:
Code: Select all
ZUNO_ENABLE(LOGGING_DBG);
ZUNO_SETUP_CFGPARAMETER_HANDLER(onNewCfgParamValue);
void onNewCfgParamValue(byte param_number, dword value){
Serial0.print("CFG Param#");
Serial0.print(param_number);
Serial0.print(" value:");
Serial0.println(value);
}
void setup(){
Serial0.begin(115200);
}
void loop(){
Serial0.print("loop millis:");
Serial0.println(millis());
delay(10000);
}
2. Dynamic definition:
Code: Select all
ZUNO_ENABLE(LOGGING_DBG WITH_CC_CONFIGURATION);
void onNewCfgParamValue(byte param_number, dword value){
Serial0.print("CFG Param#");
Serial0.print(param_number);
Serial0.print(" value:");
Serial0.println(value);
}
void setup(){
Serial0.begin(115200);
zunoAttachSysHandler(ZUNO_HANDLER_ZW_CFG, 0, (void*)&onNewCfgParamValue);
}
void loop(){
Serial0.print("loop millis:");
Serial0.println(millis());
delay(10000);
}
It seems that you like to explore everything deeply. It's wonderful! You can try, as I already wrote, to enable logging on TX0 (see LOGGING_DBG,
https://z-uno.z-wave.me/Reference/ZUNO_ENABLE/)-there you can see incoming packets and understand whether the parameter values are coming to the device.
I also advise you to try our Razberry board as a controller, you can even add it as a second controller to your existing network. It will give you much more information about what is happening on the Z-Wave network.
With respect,
Alex.