SONOFF-SNZB-02-Temperature-and-humidity-sensor icon indicating copy to clipboard operation
SONOFF-SNZB-02-Temperature-and-humidity-sensor copied to clipboard

Humidity Control does not work a expected

Open obrain17 opened this issue 1 year ago • 0 comments

I have installed SNZB-02_EFEKTA_H.hex and am just doing some tests. Control of temperature works as expected but there seems to be an issue with humidity control. My settings:

  • enable_hum: on
  • high_hum:55
  • low_hum: 45

Now I am alternately breathing or blowing to the sensor so the humidity changes between 40 and 60 what is also shown in the measured humidity value. But the linked (cluster on/off) zigbee device does not react accordingly.

I took a look to the code which however seems to be for the old version but there is a wrong statement in line 426:

if(zclApp_Config.EnableHum == 1){
      if(zclApp_HumiditySensor_MeasuredValue >= zclApp_Config.HighHum*100){
      zclGeneral_SendOnOff_CmdOn(zclApp_FirstEP.EndPoint, &inderect_DstAddr, TRUE, bdb_getZCLFrameCounter());
    }else if(zclApp_HumiditySensor_MeasuredValue <= zclApp_Config.HighHum*100){
      zclGeneral_SendOnOff_CmdOff(zclApp_FirstEP.EndPoint, &inderect_DstAddr, TRUE, bdb_getZCLFrameCounter());
    }
   }
}

both "if statements" compare with zclApp_Config.HighHum but in line 426 it should be zclApp_Config.LowHum in my opinion. Maybe this is still in the new version. Do you mind to check it and fix it if so?

obrain17 avatar Jul 22 '23 10:07 obrain17