ashmartian / carwings Goto Github PK
View Code? Open in Web Editor NEWThis project forked from joshperry/carwings
Javascript library for the Nissan Leaf Carwings JSON API
License: MIT License
This project forked from joshperry/carwings
Javascript library for the Nissan Leaf Carwings JSON API
License: MIT License
Filing this error here, since to my knowledge it fails in this library, not in the homebridge_carwings.
Login does not work, and if fails with error:
Oct 8 11:27:55 raspberrypi homebridge[13344]: _currentUrl: 'https://gdcportalgw.its-mo.com' }, Oct 8 11:27:55 raspberrypi homebridge[13344]: data: { status: '-2010', message: 'INVALID PARAMS' } } Oct 8 11:27:55 raspberrypi homebridge[13344]: Error
.
More detail log attached
carwings_error.txt
I have an older carwings account (3+ years), and in some apps such iOS EVA app I can only login with the user name (not with email). On Nissan web it works with either, also works with both in Nissan EV app.
I've tried both user name and email, and with a combination of clear text password and base64 encoded in the config.
Versions used is the latest of homebridge_carwings and this carwings library (to the best of my understanding).
I will contact Nissan support to see if it is possible to convert my Carwings account to an email only account.
Thanks!
With this code :
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 :
const batterystatuscheck = session => longpollrequest('BatteryStatusCheckRequest', 'BatteryStatusCheckResultRequest', session);
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 !
I think this library is most complete and it would be fine if someone can add MQTT support or create a node-red node with it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.