HAP icon indicating copy to clipboard operation
HAP copied to clipboard

Async get characteristic

Open makleso6 opened this issue 6 years ago • 5 comments

Hi! Is it possible to notify that accessory characteristic will/did get and async return new characteristic value (trying to remove overhead with update characteristic by timer)

makleso6 avatar Feb 18 '20 21:02 makleso6

I think what you want is tracked by #13. There’s currently no support for that, but I would welcome a PR for that!

Bouke avatar Feb 19 '20 18:02 Bouke

I'll try to add it

makleso6 avatar Feb 20 '20 10:02 makleso6

This is implemented in Pull request #55

gbrooker avatar May 16 '20 05:05 gbrooker

Beware that updating the characteristic async will return stale data until a refresh is performed. Also if there's no periodic update, any defined triggers based on value thresholds will not fire. So I'd advice to still perform a periodic update with a certain frequency to match your use-case.

Bouke avatar Jun 06 '20 08:06 Bouke

Yes, periodic update sometimes needed.

makleso6 avatar Jul 03 '20 12:07 makleso6