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

Show "No Response" in HomeKit when vehicle is not responding #39

Open
drakkhen opened this issue Feb 23, 2023 · 1 comment
Open

Show "No Response" in HomeKit when vehicle is not responding #39

drakkhen opened this issue Feb 23, 2023 · 1 comment

Comments

@drakkhen
Copy link
Contributor

drakkhen commented Feb 23, 2023

We were recently on vacation and after a few days the accessories exposed by homebridge-volvo showed "on" statuses, unexpectedly. According into the API docs "When the car has not been used for more than 3-5 days, the invocation command request may not be able to perform because is set in standby mode", and includes a table of the possible error status values here: https://developer.volvocars.com/apis/connected-vehicle/details/#vehicle-sleep-and-error-modes

I'm still super new to homebridge plugin development, but I believe we could throw this error in accessories' onGet (and onSet?) methods to immediately cause HomeKit to show accessories as "No Response", which I think would be the best and most accurate status since the vehicle's communication equipment is temporarily disabled.

throw new HapStatusError(HAPStatus.SERVICE_COMMUNICATION_FAILURE);
@trympet
Copy link
Owner

trympet commented Feb 24, 2023

Good suggestion! Have you tried it out on a local build on your instance?

If you submit a PR, I'd be happy to review it.

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