BUG: Temp SetPoint is 1 bytes, buffer overread

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
bdaradt2
Posts: 1
Joined: 19 Oct 2019 21:28

BUG: Temp SetPoint is 1 bytes, buffer overread

Post by bdaradt2 »

Hi there,

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];
                }
Debug output:
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...
User avatar
PoltoS
Posts: 7594
Joined: 26 Jan 2011 19:36

Re: BUG: Temp SetPoint is 1 bytes, buffer overread

Post by PoltoS »

According to our spec and to ThermostatSetpoint CapabilitiesReport the size is 2 bytes. It is a bug in HS I suppose.

Please report it to HS support team
Post Reply