Cooler + Heater : How to ?
Closed this issue · 1 comments
Hello,
I tried to create a sketch with a Heat-Pump that can do these modes :
- AUTO
- HEAT
- COOL
- DRY
- FAN
So far, the sketch works but after pairing, I can only see the following options at the bottom of the rounded range temperature selector :
- Auto
- Heat
- Off
I tried to initialize the HAP server with these lines :
hap_setbase_accessorytype(homekit_accessory_category_air_conditioner); // tried with value "homekit_accessory_category_heater", but got same results
hap_initbase_accessory_service("host","Yurik72","0","EspHapSwitch","1.0");
HomeKit_Svc_HVAC = hap_add_heater_service("HVAC", HAP_HVAC_update, 0);
hap_set_charachteristic_validrange_by_type(HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_CURRENT_TEMPERATURE, -20.0, 110.0);
INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_TARGET_HEATER_COOLER_STATE, HEATER_COOLER_STATE_AUTO);
INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_CURRENT_HEATER_COOLER_STATE, HEATER_COOLER_STATE_AUTO);
INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_HEATING_THRESHOLD_TEMPERATURE, 23.0); // >>> OUTPUTS ERROR >>> !!! HomeKit: Wrong default value
INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_COOLING_THRESHOLD_TEMPERATURE, 21.0); // >>> OUTPUTS ERROR >>> !!! HomeKit: Wrong default value
hap_init_homekit_server();
Thanks for helping
Well, this can be closed, I switched my code to use this category :
- hap_setbase_accessorytype(homekit_accessory_category_thermostat);
So far so good 👍