Spent hours debugging why I was getting garbage values in my setter callback. Apparently, the packets sent when doing a Set Setpoint in Homeseer is only 1 byte long for the data, and the code expect two. Is it 1) a bug in homeseer, 2) a bug in the GetCapabilities callback or 3) a bug in the Setpoint callback?
More info:
Z-Uno bootloader version:2.1.5
Security:none
Frequency:us
Device included:yes/
Device included securely by controller:no
Controller:Homeseer
Connected peripherals:
Mostly, a DS18B20 with the sample code from the ShieldConfigurator.
Code:
I tweaked the code in ZWSupport.ucxt to make it work, and demonstrate the problem:
Code: Select all
case ZUNO_CALLBACK_COMMANDHANDLER_THERMOSTAT_SETPOINT_SET:
LOGGING_UART.println("SetPoint set");
if(!mapThermoMode())
break;
// Temperature
if (callback_data.param1.bParam == 5){
LOGGING_UART.println("One Byte"); // THIS IS WHAT IS BEING HIT!
g_channel_value.buffParam[0] = g_cmd[4];
g_channel_value.buffParam[1] = 0;
}
else {
LOGGING_UART.println("Two bytes");
g_channel_value.buffParam[0] = g_cmd[5];
g_channel_value.buffParam[1] = g_cmd[4];
}
callback_data.param1.bParam is 5, so I get "One Byte" in the output, and it works with the code below, but I'm limited to one byte... which is odd, because the temperature sensor itself it working fine with two bytes, and if I set the value manually in code the Get_Setpoint will successfully send two bytes in the result. But Homeseer sends only one byte...