[Request] myChevrolet drivers

Hey @mkhan01 the link in my first post has an implementation in HomeAssistant as well as a github link to some more details about the protocols used by Chevrolet. That’s all I’ve been able to find so far.

BTW, looking through the code posted on HomeAssistant site, the dev did a python cli interface to mychevrolet.. I dont see anything HomeAssistant side. Also the python cli code uses web browser libs to mimic a user browsing the web to login and pull info from the mychevrolet web site... I am not sure this is possible in Hubitat?

I'm not a Chevy driver, but I do use Home Assistant to control a couple of devices that won't likely ever show up in Hubitat. It's a pretty easy task to get these devices to Hubitat even for non-programmers. Once you have your device working in HA you can use Node-RED (can set it up within HA or on its own) to bridge between HA and Hubitat. You can set up 2-way control or just status updates to Hubitat if you just want to see status in a dashboard.

I don't have HomeAssistant set up, and I'd rather not layer on another system. Just hoping someone would have the time/desire to port over what someone else already built.

I think for this to be done, one would have to stand up their own.. most likely cloud instance polling the mychevy site.. or perhaps use a service like this: https://smartcar.com/

i also found this: GitHub - q39JzrRa/GM-Vehicle-API: Remote API for supported General Motors vehicles

and this: The URL of the charging data is https://my.chevrolet.com/api/vehicleProfile/<YOUR VIN>/<YOUR MYCHEVY ACCOUNT NUMBER>/evstats/false.

if i login manually to mychevrolet and then hit the url above w/ my VIN and acct number.. i do see the stats!

Next step i am going to look at the c# code at GM-Vehicle-API and see if it can be ported to do a login via groovy..

1 Like

Just curious where you got the account number. I pulled a 9 digit number from one of the “your vehicle maintenance report” emails that we get which had a number in the format XXX-XXXX-XXX Is that what you used? Or something else. I just get a server error when I try it with or without the dashes in the url above.

hi - i found the acct # by clicking on OnStar and Connected Devices on the top bar, to the right of vehicle health, and then selecting Payment history...

update: just found it another way... looking at the python code by Sean Dague... after logging in, go to this url in same browser session: https://my.chevrolet.com/api/init/loginSuccessData

it is listed in the data as onstarAccountNumber and onStarAcctId

1 Like

found this code: GitHub - mikenemat/gm-onstar-probe: A reverse-engineered python library for remote starting GM/Onstar vehicles, and maybe more some day - this allows full programmatic login - they sample code does a vehicle start... i am going to see if i can borrow from the other codeset to do vehicle data dump... we are getting there slowly..

1 Like

ok, nice, successfully got my account number from that second link you found.

Unfortunately still getting the same error at https://my.chevrolet.com/api/vehicleProfile/<YOUR VIN>/<YOUR MYCHEVY ACCOUNT NUMBER>/evstats/false

{"messages":["Unknown error"],"serverErrorMsgs":["Unknown error"],"data":"SERVER ERROR"}

Do you by chance pay for OnStar? just curious if that's a differentiating factor...

Apparently I do pay for onstar! I didn't realize I was till I went looking for that account number! I am going to call and cancel b/c I never use it...

Meanwhile, update: I got Sean Dague's mychevy python code working... it doesn't require the chevy account number... I had to change a couple of things pertaining to how json was being handled to get that code to work... I am now working on learning groovy and porting Sean's code to groovy... once this happens I will need to learn a bit more about ST / Hubitat and how they use groovy to try to get this in our platform.

1 Like

wondering if it'll still work when your OnStar expires? the basic MyChevy states work for me, in the app even without OnStar, but not the URLs that you posted, would be really annoying if this only worked for OnStar Subscribers...

Do you want to try my python code? to see if you get a result? groovy learning is going slow.. between my day job, my business and my other hobby pursuits!

Not sure if I would know how to set it up…

If you are on windows, just download python from www.python.org..
then open the file in the IDLE app which will be installed by python and run it...

If you are on mac osx, you already have python... on open a terminal and run the file, by typing something like $ python file.py

in both cases (you have to edit the file and add your username and password) - it is a text file - can be opened in notepad, wordpad or any other text editor.

ChromeOS and I don’t have (or plan to install) Linux on it.

Aaah - ok - not sure how to handle ChromeOS!

1 Like

I'd like to help out if I can. 3 Chevy cars with Onstar on each. Would love to be able to star the car and open the garage at the push of a button. :grinning:

1 Like

@mkhan01 Were you able to make any progress after getting settled with Hubitat?

Interested on seeing this work with hubitat too. I have a Chevy Spark EV and would love to see things like charging status/level/etc.

I am interested is well. Not sure if this helps but found this on the webs.