var carwings = require('carwings');
carwings.loginSession('login', 'password', 'NE').then(function(session){
//Get cached current LEAF status
carwings.batteryStatusCheck(session).then(function(status){
console.log(status);
});
});
I have a lot of date and at the end :
data:
{ status: '-6000',
ErrorCode: '-6000',
ErrorMessage: 'BadRequest' } }
Error: BadRequest
at /home/furax/node_modules/carwings/lib/index.js:17:13
at Generator.next (<anonymous>)
at step (/home/furax/node_modules/carwings/lib/index.js:42:191)
at /home/furax/node_modules/carwings/lib/index.js:42:361
at process._tickCallback (internal/process/next_tick.js:103:7)
First I think there was an error in L114 and change to :
because compraing to pycarwings, I think first we hav to call BatteryStatusCheckRequest before BatteryStatusCheckResultRequest
But always the same error (work with pycarwings2 example)
My knowledge with JS is too poor to understand why it doesn't work !
With this code :
I have a lot of date and at the end :
First I think there was an error in L114 and change to :
because compraing to pycarwings, I think first we hav to call BatteryStatusCheckRequest before BatteryStatusCheckResultRequest But always the same error (work with pycarwings2 example) My knowledge with JS is too poor to understand why it doesn't work !