Git Product home page Git Product logo

Comments (4)

simkard69 avatar simkard69 commented on June 2, 2024

Is it just a matter of solving my problem using these lines ?

homekit_characteristic_t * ch_temp = homekit_service_characteristic_by_type(Thermostat, HOMEKIT_CHARACTERISTIC_CURRENT_TEMPERATURE);
ch_temp->min_value.float_value=18.0;
ch_temp->max_value.float_value=32.0;
ch_temp->min_step.float_value=0.5;

I have a doubt regarding the ".float_value" ...

from esphap.

simkard69 avatar simkard69 commented on June 2, 2024

Found these lines in example "EspHap_HeaterControl.ino" :

  • hap_set_charachteristic_validrange_by_type(heater,HOMEKIT_CHARACTERISTIC_CURRENT_TEMPERATURE,-20.0,110.0);
  • HAP_NOTIFY_CHANGES_WITHCONSTRAIN(float,ch_temp,DeviceData.temp,0.1);

Are these the ones I'm looking for ?

from esphap.

simkard69 avatar simkard69 commented on June 2, 2024

I managed to get something working in THERMOSTAT with HEAT or COOL modes :

  • hap_set_charachteristic_validrange_by_type(HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_TARGET_TEMPERATURE, 16.0, 31.0);

But when defining these 2 for AUTO mode, they seem to avoid the pairing procedure in IOS :

  • hap_set_charachteristic_validrange_by_type(HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_HEATING_THRESHOLD_TEMPERATURE, 16.0, 31.0);
  • hap_set_charachteristic_validrange_by_type(HomeKit_Svc_HVAC, HOMEKIT_CHARACTERISTIC_COOLING_THRESHOLD_TEMPERATURE, 16.0, 31.0);

Any idea ?

from esphap.

simkard69 avatar simkard69 commented on June 2, 2024

Manage to solve my problem using these lines :

INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_1, HOMEKIT_CHARACTERISTIC_CURRENT_POSITION, 50);
INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_1, HOMEKIT_CHARACTERISTIC_TARGET_POSITION, 50);
INIT_CHARACHTERISTIC_VAL_BY_TYPE(int, HomeKit_Svc_1, HOMEKIT_CHARACTERISTIC_POSITION_STATE, 2);

from esphap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.