carwingsjs icon indicating copy to clipboard operation
carwingsjs copied to clipboard

Error trying to use the module

Open nilsga opened this issue 10 years ago • 14 comments

I'm trying to use this module, but I just get an error while trying to login. I am certain that the username and password is correct. The error I get is

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns7:SmartphoneErrorType xmlns:ns4="urn:com:airbiquity:smartphone.reportservice:v1" xmlns:ns7="urn:com:airbiquity:smartphone.common:v1" xmlns:ns3="urn:com:hitachi:gdc:type:report:v1" xmlns:ns5="urn:com:hitachi:gdc:type:vehicle:v1" xmlns:ns2="urn:com:airbiquity:smartphone.userservices:v1" xmlns:ns6="urn:com:airbiquity:smartphone.vehicleservice:v1">
    <ErrorCode>9001</ErrorCode>
</ns7:SmartphoneErrorType>

Which results in

TypeError: Cannot read property 'ns4:SmartphoneLatestBatteryStatusResponse' of undefined

nilsga avatar May 14 '14 06:05 nilsga

I have exactly the same issue. I note on pycarwings that they don't believe it works in Europe (I'm in England). Maybe we have a different endpoint?

mrpjevans avatar May 19 '14 15:05 mrpjevans

Having done some sniffing, I've established that the European version of Carwings uses a different endpoint - https://mobileapps.prod.nissan.eu/android-carwings-backend-v2/2.0/carwingsServlet

Also, unlike the USA version, this endpoint is used for all calls

mrpjevans avatar May 21 '14 08:05 mrpjevans

Is the API the same, so it's enough to replace the endpoints?

nilsga avatar May 21 '14 08:05 nilsga

Seems to be yes, just working on an example

mrpjevans avatar May 26 '14 09:05 mrpjevans

Did you finish the example?

nilsga avatar Jun 06 '14 09:06 nilsga

@mrpjevans were you able to get it working with the European endpoint? If so, I'm happy to add it as a configurable option for the Node module.

crtr0 avatar Nov 16 '14 19:11 crtr0

Yes, I've written a PHP class that works with the European version (just for status updates). Not in js though I'm afraid. I've not uploaded it as Nissan now require an API key to be submitted with the headers and I'm unsure whether this is private information to me or not (I sniffed it from the iOS app). Let me know if you'd like to see it.

mrpjevans avatar Nov 17 '14 09:11 mrpjevans

This is interesting: I'm using the carwings python script, and I don't believe it does require the API key... (Haven't seen it in the code).

I hard-coded the European values in the python script though, so maybe I missed something. Been working fine for me!

On Mon Nov 17 2014 at 9:51:02 AM mrpjevans [email protected] wrote:

Yes, I've written a PHP class that works with the European version (just for status updates). Not in js though I'm afraid. I've not uploaded it as Nissan now require an API key to be submitted with the headers and I'm unsure whether this is private information to me or not (I sniffed it from the iOS app). Let me know if you'd like to see it.

— Reply to this email directly or view it on GitHub https://github.com/crtr0/carwingsjs/issues/1#issuecomment-63281135.

aminorjourney avatar Nov 17 '14 10:11 aminorjourney

Did anyone found a solution?

jensjakob avatar Jul 11 '17 19:07 jensjakob

Haven't looked at it in a long time I'm afraid. It's undergone significant changes since as a result of some pretty hair-raising security issues. I found Carwings so unusable as a platform, I've not been prepared to any further work on it. :(

mrpjevans avatar Jul 12 '17 11:07 mrpjevans

Looks like there is a Python solution and "Alexa" plugin that might have the code snippets to make this work again. Probably under another name, as Nissan seems to have changed the name. Would be nice to get it working in Node.js though...

https://github.com/ScottHelme/AlexaNissanLeaf

jensjakob avatar Jul 12 '17 14:07 jensjakob

Nice find. I've got an Echo here so I'll try it out. Alexa skill code basically is Node.js, so this shouldn't be too hard to adapt to work from the command line.

mrpjevans avatar Jul 12 '17 14:07 mrpjevans

I’ve actually put some modified code into the Alexa skill too.

https://www.youtube.com/watch?v=0F_-IAqlqQs

[image: --]

Nikki Gordon-Bloomfield [image: https://]about.me/aminorjourney https://about.me/aminorjourney?promo=email_sig

On Wed, Jul 12, 2017 at 7:40 AM, mrpjevans [email protected] wrote:

Nice find. I've got an Echo here so I'll try it out. Alexa skill code basically is Node.js, so this shouldn't be too hard to adapt to work from the command line.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/crtr0/carwingsjs/issues/1#issuecomment-314790710, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCbIwLNBUVqGhD6HPMsircDB_1uyWRcks5sNNrygaJpZM4B6uR8 .

aminorjourney avatar Jul 12 '17 14:07 aminorjourney

Just made this public; https://github.com/jensjakob/charge-cheap

The code is not perfect. I just wanted to make it work in the first version.

jensjakob avatar Jul 17 '17 20:07 jensjakob