Yurik72/ESPHap

Quick question - not an issue

Opened this issue · 0 comments

HSkul commented

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