Mixiaoxiao / Arduino-HomeKit-ESP8266

Native Apple HomeKit accessory implementation for the ESP8266 Arduino core.
MIT License
1.51k stars 277 forks source link

ac state strange Got value #173

Closed LouisLee985 closed 2 years ago

LouisLee985 commented 2 years ago

It's from https://github.com/joshspicer/keystone-AC-homekit-esp8266 in: my_accessory.c, line 45:

homekit_characteristic_t target_state = HOMEKIT_CHARACTERISTIC_(TARGET_HEATER_COOLER_STATE, 0);// 0: auto, 1: heat, 2:cool

in airconditioner.ino, line 93:

void target_state_setter(const homekit_value_t value) {
    LOG_D("NO_OP: target_state_setter. Got value %d", value.int_value);
}

When change target_state in ios home app between heat and cool, LOG_D Got value must be 1 or 2 in {0,1,2},1: heat, 2:cool. like heat: NO_OP: target_state_setter. Got value 1, cool: NO_OP: target_state_setter. Got value 2,

But sometimes strange Got value like heat: FNO_OP: target_state_setter. Got value 1073684481, cool: NO_OP: target_state_setter. Got value 1073683202 or FNO_OP: target_state_setter. Got value 1073684482.

Debug.txt