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

Getting error when requesting diagnostics #45

Closed
fragglehunter opened this issue Jun 21, 2021 · 6 comments
Closed

Getting error when requesting diagnostics #45

fragglehunter opened this issue Jun 21, 2021 · 6 comments

Comments

@fragglehunter
Copy link

Not sure what the issue could be, but it started happening Saturday night/Sunday morning:

onstar2mqtt@1.2.3 start /app
node src/index.js
info: OnStar Config {"onstarConfig":{"deviceId":"OMMITED","vin":"OMMITED","username":"OMMITED","password":"OMMITED","onStarPin":"OMMITED","checkRequestStatus":true,"refreshInterval":1800000,"allowCommands":true}}
info: MQTT Config {"mqttConfig":{"host":"OMMITED","username":"OMMITED","password":"OMMITED","port":1883,"tls":false,"prefix":"OMMITED"}}
info: Requesting vehicles
info: Vehicle request status {"status":"success"}
info: Connecting to MQTT {"url":"mqtt://OMITTED:1883","config":{"username":"OMMITED","will":{"topic":"OMMITED/available","payload":"false","retain":true}}}
info: Connected to MQTT
info: Subscribed to command topic {"topic":"OMMITED/OMMITED/command"}
info: Requesting diagnostics
error: Error {"error":{"response":{"status":202,"statusText":"Accepted","headers":{"gccx-transactionid":"0000017a292f0f15-1184de","content-type":"application/json;charset=UTF-8","content-length":"180","date":"Mon, 21 Jun 2021 15:25:57 GMT","server":"Layer7-API-Gateway"},"config":{"url":"https://api.gm.com/api/v1/account/vehicles/OMMITED/commands/connect","method":"post","data":"{}","headers":{"Accept":"application/json","Content-Type":"application/json; charset=UTF-8","Accept-Language":"en-US","Host":"api.gm.com","Connection":"keep-alive","Accept-Encoding":"br, gzip, deflate","User-Agent":"Mozilla/5.0 (Linux; U; Android 9; en-US; Google Pixel 2 Build/PI)","Authorization":"Bearer OMMITED","Content-Length":2},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1},"request":{"_events":{},"_eventsCount":7,"outputData":[],"outputSize":0,"writable":true,"_last":true,"chunkedEncoding":false,"shouldKeepAlive":true,"_defaultKeepAlive":true,"useChunkedEncodingByDefault":true,"sendDate":false,"_removedConnection":false,"_removedContLen":false,"_removedTE":false,"_contentLength":null,"_hasBody":true,"_trailer":"","finished":true,"_headerSent":true,"socket":{"_tlsOptions":{"pipe":false,"secureContext":{"context":null,"singleUse":true},"isServer":false,"requestCert":true,"rejectUnauthorized":true,"session":

Logs are not giving much information on what issue could be. Its odd, when I'm restarting the docker image the sensors in HA go to unavailable, but once docker image is up it reflects old values before issue started.

@michaelwoods
Copy link
Owner

If the container goes down (restart) the sensors go unavailable until it's back up. The values are retained on the next start, even though they're not updated because of the failed call. I'm also seeing similar errors on a 2xx status code today. Won't have time to look into this for a while however.

@fragglehunter
Copy link
Author

No worries. I know I've had to pick your ear on your app often, so I apologize but I really do appreciate your work on it.

Glad you're seeing similar issues so I know its just not me. Weird thing, I do see the stats at the very end of the error message now after going to onstarjs 2.2.2 but nothing is updating in the broker so I know its grabbing the values from Onstar just fine, even the hotspot info.

If there is any info you need from me to help provide resolution please let me know. i will be glad to assist in anyway I can.

@fragglehunter
Copy link
Author

Hello, wanted to follow up on this and see if there has ben any movement.

I saw that there was a new docker image, and tried it but getting new error now:

error: Main function error. {"error":{"code":5}}

Am I the only one having issues? Is it something I need to check on my side?

@michaelwoods
Copy link
Owner

@phildh it seems so, mine's been working without issue. I've found that API failures are generally expected especially after the car's been sitting for >12hrs but they eventually come back.

Post the full logs and I may be able to point something out.

@fragglehunter
Copy link
Author

This is currently what the docker logs out out:

info: Requesting vehicles
info: Vehicle request status {"status":"success"}
info: Connecting to MQTT {"url":"mqtt://10.5.10.9:1883","config":{"username":"homeassistant","will":{"topic":"homeassistant/VIN_OMMITED/available","payload":"false","retain":true}}}
error: Main function error. {"error":{"code":5}}

@fragglehunter
Copy link
Author

Issues were resolved on my end. Not sure what original issue was related to, but Main function error was MQTT issues on home assistant side. Had to remove add-on and reconfigure it. Ruled out app by pointing to fresh MQTT that i set up on stand a lone server. Thanks for all your help, as always.

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