michaelwoods/onstar2mqtt

Error 500 with Canada API

Closed this issue · 4 comments

Hello,

I'm trying to use the new canada api since the usa doesn't work and I'm getting this error at beginning. It seems that even though the variable is passed, it still try to use the gm.com

https://pastebin.com/pp1S889V

I'm also unsure api.gm.ca existe because when I try to ping that, I don't get any DNS resolve either on my local DNS or using public DNS.

Thank you

I'm not sure how that ever worked, the underlying library doesn't load the url from the config but a static json file.

https://github.com/samrum/OnStarJS/blob/master/src/RequestService.ts#L24
https://github.com/samrum/OnStarJS/blob/master/src/RequestService.ts#L231

You may request they allow URL override there, however if the domain doesn't even exist that won't help. A teardown of the android apk may reveal some strings that could point you in the right direction.

I just checked on my pihole service and when I start the chevrolet app and get the status, these are all the url that are queried:

generalmotorscorporation.sc.omtrdc.net
galileo-api.ext.gm.com
na-mobile-api.gm.com
apim.gm.com
www.chevrolet.com
omnibus.gm.com

Your best bet is opening an issue on OnstarJS to debug the difference for the Canadian APIs. Though I know I've seen reports of Canadians using the defaults.

I found the problem!!! Turns out, Error 500 means there's no car connected to your account. Which is true, because I only have a shared car. I had to use my girlfriend account (she own the car) and her pin code. If you enter no pin code, error 400. If wrong pin code, error 401.