Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add Status return value for char setter callback #120

Open
d4rkmen opened this issue Dec 24, 2019 · 2 comments
Open

Please add Status return value for char setter callback #120

d4rkmen opened this issue Dec 24, 2019 · 2 comments

Comments

@d4rkmen
Copy link

d4rkmen commented Dec 24, 2019

In order to control operation status from setter. For example can send No answer status when sensor\anything else is unreachable. Or can return invalid value status for unsupported mode set
Thanks

@maximkulkin
Copy link
Owner

maximkulkin commented Dec 24, 2019

How this is supposed to work?

What’s the use case?

@d4rkmen
Copy link
Author

d4rkmen commented Dec 24, 2019

process_characteristics_update:
HAPStatus status = HAPStatus_Success;
...
if (ch->setter_ex) {
status = ch->setter_ex(ch, h_value);
...
return status;

Usecase is very important: when user made an action, which cannot be completed on device side, setter can return error status and (Siri) will report - cant access your device. Othervise it will be success (but actually its not)
Lets say: your thermostat not supports cooling. User selected COOL and got success status.
Or an actor device is connected by some interface (serial/network/spi/i2c) which not responds - same problem.
For bridged acessories lost connection - same problem
Etc etc. Thanks for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants