This app is a simple npm project that fetches the car engine state. The following is included:
- New npm project
- HMKit module
- HMKit to be initialised with snippet from the Developer Center -> https://high-mobility.com/develop
- The example sends a Telematics command to the car to get the engine state
Before running the app, make sure to install dependencies with the following command:
$ npm install
Then follow the steps in src/app.js
, adding the Client Certificate and Access Token where necessary.
To run the app using npm
, type the following command:
$ npm start
> @ start /Users/allan/www/hm-node-scaffold
> node_modules/.bin/babel src -d lib && node --napi-modules lib/index.js
src/app.js -> lib/app.js
src/index.js -> lib/index.js
(node:97243) Warning: N-API is an experimental feature and could change at any time.
Uint8Array [0, 53, 1, 1, 0, 4, 1, 0, 1, 1, 2, 0, 4, 1, 0, 1, 0, 162, 0, 11, 1, 0, 8, 0, 0, 1, 105, 195, 133, 39, 227]
EngineResponse {
ignition: {
value: 'on'
},
accessoriesIgnition: {
value: 'off'
}
}
When using Windows, start the app with:
$ npm run start-windows
If you have questions or if you would like to send us feedback, join our Slack Channel or email us at [email protected].