Yurik72 / ESPHap

ESP32/ESP8266 Arduino library for native Apple Homekit Accessory Protocol (HAP)
MIT License
265 stars 60 forks source link

Quick question - not an issue #134

Open HSkul opened 1 year ago

HSkul commented 1 year ago

First, thanks a lot of a great library and set of examples. Being able to use Arduino IDE for ESP32/8266 Homekit devices is really helpful. Now my question may already have been answered here in the forum but it was a long time ago and I'm not sure if something has changed. Is it possible to define custom characteristics? Someone asked about that before and the answer was no. But when I was looking through the types.h file, I found this definition: #define HOMEKIT_DECLARE_CHARACTERISTIC_CUSTOM(...) Apple left the door open to do this and under Homebridge this is possible (but can only be viewed in Eve, not the Home app although automation is able to utilize custom characteristics).

If the answer is yes, how would I use the macro above? Is it possible to define for example custom units? I'm trying to figure out if I can define Radon concentration as a custom characteristic (with unit Bq/m3) and then add it to a sensor accessory.

Thanks,

H