michaelwoods/onstar2mqtt

Stuck on requesting diagnostic

Closed this issue · 2 comments

Hello,

For the last days, nothing get updated from the onstar2mqtt docker.

> onstar2mqtt@1.5.2 start
> node src/index.js

info: OnStar Config {"onstarConfig":{"allowCommands":true,"checkRequestStatus":true,"deviceId":"###","onStarPin":"###","password":"###","refreshInterval":1800000,"requestPollingIntervalSeconds":6,"requestPollingTimeoutSeconds":60,"username":"###","vin":"###"}}
info: MQTT Config {"mqttConfig":{"host":"####","namePrefix":"","password":"####","port":1883,"prefix":"homeassistant","tls":false,"username":"###"}}
info: Requesting vehicles
info: Vehicle request status {"status":"success"}
info: Connecting to MQTT {"config":{"username":"###","will":{"payload":"false","retain":true,"topic":"homeassistant/######/available"}},"url":"mqtt://#####:1883"}
info: Connected to MQTT
info: Subscribed to command topic {"topic":"homeassistant/#######/command"}
info: Requesting diagnostics
info: Requesting diagnostics
info: Requesting diagnostics
info: Requesting diagnostics
info: Requesting diagnostics
(...)
info: Requesting diagnostics
info: Requesting diagnostics

Thank you

edit: unsure if it's related but the library onstarjs was updated a week ago with a new secret key
https://github.com/samrum/OnStarJS/releases/tag/v2.3.14

edit 2: Got an error
error: Error {"error":{"message":"Request Failed with status 401 - Unauthorized","request":{"method":"POST"},"response":{"data":{"error":"invalid_token"},"headers":{"cache-control":"\"no-store\"","connection":"keep-alive","content-length":"32","content-type":"\"application/json; charset=UTF-8\"","date":"Mon, 09 Jan 2023 05:01:44 GMT","pragma":"\"no-cache\"","request-context":"appId=cid-v1:a7e19842-5b19-4b47-a9cf-85cc6e87a746"},"status":401,"statusText":"Unauthorized"},"stack":"Error: Request Failed with status 401 - Unauthorized\n at RequestService.<anonymous> (/app/node_modules/onstarjs/dist/index.js:594:32)\n at Generator.throw (<anonymous>)\n at rejected (/app/node_modules/onstarjs/dist/index.js:33:65)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"}}

duplicate of #243