Closed densh1k closed 1 year ago
Solved the problem, it was necessary to "ACTIVE"
Hi densh1k, I’m tryin to “ACTIVE”, but it was’nt work. Can you help me? I’d like to do a HOMEKIT_SERICE_THERMOSTAT to control a old air conditioning, I belive that you exemplo can help me.
bool thermo_power = false; //true or flase
homekit_value_t thermo_on_get() {
return HOMEKIT_BOOL(thermo_power);
}
void cha_current_humidity_cur_on_set(homekit_value_t value) {
if (value.format != homekit_format_bool) {
printf("Invalid on-value format: %d\n", value.format);
return;
}
thermo_power = value.bool_value;
cha_current_humidity_cur_update();
}
void cha_current_humidity_cur_update() {
if (thermo_power) {
printf("ON\n");
digitalWrite(PORTA, LOW);
} else {
printf("OFF\n");
digitalWrite(PORTA, HIGH);
}
After the firmware and connection. Homekit shows a constant update of the device. The port monitor does not display any changes. Where did I make a mistake?
accessory