samrum/homebridge-onstar

Feature Request - Ability to lock/unlock car and flash lights

Closed this issue · 8 comments

Feature of adding additional buttons/switches that would allow to lock/unlock the car and see the current state to show what status the doors are currently in as well as the ability to enable and disable the flash/horn option.

The main issue with these additional features is that there's no way to read the current state of them via the OnStar API (that I know of).

So we can know when a feature is activated via homebridge, but changes made from outside of it wouldn't be reflected in the switch. I.e. you manually lock the doors after unlocking them via homebridge and the switch would still be in the unlocked state.

One possible stateless solution would be to have separate switches for lock/unlock, start/cancel, and alert/stop (similar to the implementation of the myChevrolet app if you've used that).
This seems like it'd be pretty janky to use via Siri which is why I haven't tried it.

Personally, I would be ok with just having a momentary button the same way that the remote start works now. If I just wanted to double check that I locked my car, in the MyChevy app I just click lock again and wait for the confirmation. An option similar to that with the other options would be beneficial to me. I think it would be good to even have those as optional buttons and you have to enable them with a true/false config statement. I would probably be OK with just having "lock" as a button, and having the unlock option disabled.

Ok, when I have some free time I'll take another look at integrating them, but it's probably not going be a super high priority for me.

No problem with it not being a priority. Do you know what the API links are?

Yup! The library OnStarJS that homebridge-onstar uses actually supports all of these features already. So it's just a matter of adding switches to call the methods for them.

That's awesome! I didn't realize it was that well documented already. If I have any free time, I may be able to tinker. If I do and get it working, I'll do a pull. Thanks for the info!

The latest release (v1.3.0) adds functionality for charge override, alert, and door lock/unlock.
Check the updated Readme for more information and how to enable and configure them.
Feel free to give it a try and let me know what you think!

Your update worked like a charm! Thanks for taking the time to add those features!