samrum / homebridge-onstar

Homebridge plugin for managing cars via OnStar
MIT License
34 stars 0 forks source link

Enhancement - add battery % for EV #63

Open ukypayne opened 3 years ago

ukypayne commented 3 years ago

Currently have a new EV and can see the charge percentage in the my chevy app but not with the homebridge plugin. It’d be cool to see that percentage as some type of sensor.

samrum commented 3 years ago

Should be possible! The charge info is already exposed via the diagnostics method in OnStarJS, so should be able to add a service like https://github.com/WonkiDonk/homebridge-jlr-incontrol/blob/master/src/services/battery.ts.

Would need to add support for toggling waiting for requests to fully complete in OnStarJS though. Right now it's either always off or on and in homebridge-onstar it's always off because I was seeing HomeKit time out on requests to my Volt.

I'll look into this.

flyer888 commented 2 years ago

Hi Samrum, Do you still think this will be possible to add?

Thank you!

samrum commented 2 years ago

It should be possible, though I'm still not sure exactly how best to implement it. See #67 to see my first attempt that I abandoned.

I actually sold my Volt, so I wouldn't be able to try again, unfortunately.

Nordictrack commented 2 years ago

It should be possible, though I'm still not sure exactly how best to implement it. See #67 to see my first attempt that I abandoned.

I actually sold my Volt, so I wouldn't be able to try again, unfortunately.

If you're ever up for it, I'm in Vegas and own an Bolt EUV, so I can help out with the venture.

samrum commented 2 years ago

I’ve seen that https://github.com/SteffeyDev/homebridge-hyundai-bluelink gets around the same issues I ran into before by having the plugin refresh vehicle information automatically every hour. That might be the way to go. Maybe allow configuring the refresh rate, though I’m not sure what rate limits the OnStar api may have.