Update README.md
This commit is contained in:
parent
56d8213aba
commit
313069dc02
30
README.md
30
README.md
@ -18,30 +18,30 @@ Collect the following information:
|
|||||||
It's a typical node.js application, but I am unfamiliar on how to pass ENV vars, so if someone wants to create a PR to explain how to do that, be my guest.
|
It's a typical node.js application, but I am unfamiliar on how to pass ENV vars, so if someone wants to create a PR to explain how to do that, be my guest.
|
||||||
To install and run do the following commands.
|
To install and run do the following commands.
|
||||||
`sudo wget https://www.github.com/bennydabee/onstar2mqtt
|
`sudo wget https://www.github.com/bennydabee/onstar2mqtt
|
||||||
cd onstar2mqtt
|
cd onstar2mqtt
|
||||||
npm install
|
npm install
|
||||||
`
|
`
|
||||||
The following is required as I am unfamilar with the ENV vars for NPM.
|
The following is required as I am unfamilar with the ENV vars for NPM.
|
||||||
`
|
`
|
||||||
cd src
|
cd src
|
||||||
sudo nano index.js
|
sudo nano index.js
|
||||||
`
|
`
|
||||||
Make the following lines similar to this
|
Make the following lines similar to this
|
||||||
`deviceId: process.env.ONSTAR_DEVICEID || 'uuidhere',
|
`deviceId: process.env.ONSTAR_DEVICEID || 'uuidhere',
|
||||||
vin: process.env.ONSTAR_VIN || 'vinhere',
|
vin: process.env.ONSTAR_VIN || 'vinhere',
|
||||||
username: process.env.ONSTAR_USERNAME 'usernamehere',
|
username: process.env.ONSTAR_USERNAME 'usernamehere',
|
||||||
password: process.env.ONSTAR_PASSWORD 'password here',
|
password: process.env.ONSTAR_PASSWORD 'password here',
|
||||||
onStarPin: process.env.ONSTAR_PIN 'pinhere',
|
onStarPin: process.env.ONSTAR_PIN 'pinhere',
|
||||||
`
|
`
|
||||||
`
|
`
|
||||||
const mqttConfig = {
|
const mqttConfig = {
|
||||||
host: process.env.MQTT_HOST || 'haip',
|
host: process.env.MQTT_HOST || 'haip',
|
||||||
username: process.env.MQTT_USERNAME || 'mqttusername',
|
username: process.env.MQTT_USERNAME || 'mqttusername',
|
||||||
password: process.env.MQTT_PASSWORD || 'mqttpassword',
|
password: process.env.MQTT_PASSWORD || 'mqttpassword',
|
||||||
port: parseInt(process.env.MQTT_PORT) || 1883,
|
port: parseInt(process.env.MQTT_PORT) || 1883,
|
||||||
tls: process.env.MQTT_TLS || false,
|
tls: process.env.MQTT_TLS || false,
|
||||||
prefix: process.env.MQTT_PREFIX || 'homeassistant',
|
prefix: process.env.MQTT_PREFIX || 'homeassistant',
|
||||||
namePrefix: process.env.MQTT_NAME_PREFIX || '',
|
namePrefix: process.env.MQTT_NAME_PREFIX || '',
|
||||||
`
|
`
|
||||||
After all this run `cd ..` and then `npm run start` and it should now connect and you will have OnStarJS in your HA MQTT
|
After all this run `cd ..` and then `npm run start` and it should now connect and you will have OnStarJS in your HA MQTT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user