BigThunderSR / homeassistant-addons-onstar2mqtt

OnStarJS wrapper for MQTT as a Home Assistant Add-on
Apache License 2.0
24 stars 3 forks source link

Invalid VIN #679

Closed crigel closed 2 months ago

crigel commented 2 months ago

I am using the onstar2mqtt Home Assistant add-on. I'm trying to connect my 2019 Chevy Silverado. I know I am probably missing something and hoping someone can help me figure it out. Note, I currently use the mychevorlet app and have a connected plan that allows me to remotely start my truck, get diagnostics, tracking, etc.. I haven't been able to get as far as anything past the below configuration for the addon as it keeps crashing. FYI I have checked the VIN and unless there is some formatting requirements, it is correct with no spaces before or after. Below is some additional information. Thank you in advance for any assistance anyone can provide

HA Add-on:

Version: OnStar2MQTT Home Assistant Add-on (BigThunderSR) for Vehicle 1 / Current version: 1.18.8

Home Assistant:

Core: 2024.8.3 Supervisor: 2024.08.0 Operating System: 13.1 Frontend: 20240809.0

My configuration:

Vehicle Name: Silverado OnStar Device ID: OnStar VIN: 3**5 OnStar User Name: c@gmail.com OnStar Password: ••••••••••••••••• OnStar PIN: •••• OnStar URL: https://api.gm.com OnStar Refresh Period: 1800000 OnStar Poll Interval: 6 OnStar Poll Timeout: 90 MQTT Host: 192.168.XXX.XXX MQTT Username: homeassistant MQTT Password: •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• MQTT Port: 1883 MQTT Prefix: homeassistant MQTT OnSTAR Polling Status Topic: MQTT List All Sensors Together: false MQTT TLS: false MQTT Reject Unauthorized: false CA File: Certificate File: Key File:

The Error:

s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [14:50:54] INFO: Starting OnStar2MQTT for Silverado...

onstar2mqtt@1.18.8 start node src/index.js

/app/src/index.js:44 throw new Error('Invalid VIN. Please check the value entered for VIN in ONSTAR_VIN.'); ^

Error: Invalid VIN. Please check the value entered for VIN in ONSTAR_VIN. at Object. (/app/src/index.js:44:11) at Module._compile (node:internal/modules/cjs/loader:1364:14) at Module._extensions..js (node:internal/modules/cjs/loader:1422:10) at Module.load (node:internal/modules/cjs/loader:1203:32) at Module._load (node:internal/modules/cjs/loader:1019:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) at node:internal/main/run_main_module:28:49

Node.js v18.20.1 s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [14:51:07] INFO: Starting OnStar2MQTT for Silverado...

BigThunderSR commented 2 months ago

@crigel, did you verify the VIN as noted in the error message? Many times, folks mix up 0 and O etc. which is why I added the VIN format validation check in the first place.

Also your "OnStar Device ID:" doesn't show anything. Did you enter a V4 UUID for this field?

crigel commented 2 months ago

yes I did. I even copy and pasted directly from the maintenence email they send me. I did notice that I was using the latest version so I installed 1.5.11. Now I'm getting this error. I tried recreate my uuid, but that didn't seem to do anything.

error: Main function error. {"error":{"message":"Request Failed with status 400 - Bad Request","request":{"_closed":true,"_contentLength":"457","_defaultKeepAlive":true,"_ended":true,"_events":{},"_eventsCount":7,"_hasBody":true,"_header":"POST /api/v1/oauth/token HTTP/1.1\r\nAccept: application/json\r\nContent-Type: text/plain\r\nAccept-Language: en\r\nHost: api.gm.com\r\nConnection: keep-alive\r\nAccept-Encoding: br, gzip, deflate\r\nUser-Agent: myChevrolet/118 CFNetwork/1408.0.4 Darwin/22.5.0\r\nContent-Length:

BigThunderSR commented 2 months ago

@crigel, it looks like you are mixing a couple of different things here. The currently maintained version of the add-on is indeed 1.18.8 (which is higher than 1.5.x, so I'm not sure why you noted that 1.5.x is newer than 1.18.x?). The 1.5.x versions are from the original author of the onstar2mqtt program and he is no longer actively maintaining his project.

Please use the add-on that says: "OnStar2MQTT Home Assistant Add-on (BigThunderSR) for Vehicle 1".

Please go back to that version and try again.

crigel commented 2 months ago

yup thats my mistake. After reinstalling I'm just getting this. Not very descriptive...

error: Main function error: {"error":{"code":5},"timestamp":"2024-09-01 17:51:18"}. I'm going to restart and then double check everything.

crigel commented 2 months ago

I just got it. Looks like there was an issue with my Matt. Thank you so much for the help!