Merge pull request #204 from chakal/main

Added a definition for the API URL for users in Canada
This commit is contained in:
Michael Woods
2022-09-30 11:28:33 -04:00
committed by GitHub
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -48,6 +48,10 @@ ONSTAR_PASSWORD=
ONSTAR_PIN=
MQTT_USERNAME=
MQTT_PASSWORD=
#For Canadian users, specify the canadian end-point as well:
ONSTAR_URL=https://api.gm.ca
```
### Node.js
It's a typical node.js application, define the same environment values as described in the docker sections and run with:
+1
View File
@@ -15,6 +15,7 @@ const onstarConfig = {
username: process.env.ONSTAR_USERNAME,
password: process.env.ONSTAR_PASSWORD,
onStarPin: process.env.ONSTAR_PIN,
serviceUrl: process.env.ONSTAR_URL || "https://api.gm.com",
checkRequestStatus: process.env.ONSTAR_SYNC === "true" || true,
refreshInterval: parseInt(process.env.ONSTAR_REFRESH) || (30 * 60 * 1000), // 30 min
allowCommands: _.toLower(_.get(process, 'env.ONSTAR_ALLOW_COMMANDS', 'true')) === 'true'