Carwings API?

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
My two cents....

I really wouldn't want to use a third party dedicated web site for a few reasons:

  • Any company to do this probably wouldn't have the infrastructure of Nissan (it would probably end up being an individual developer). So, would probably have an even lower track record on responsiveness, availability and up time.
  • I would have privacy and security concerns.
    • Are they using ssl?
    • Are they harvesting my credentials, or information about my behavior?
  • With no adequate revenue model, the site wouldn't stay up for long.
    • How would the developer pay for the ssl cert?
    • how would they pay for hosting time?
    • Unless they are using the same server for other projects - which could affect up-time and availability
  • An alternate site wouldn't give you much more meaningful functionality than the Nissan Owners Portal

This could be a convenience feature added to an existing, appropriate site. (e.g. MyChargePoint.net, OpenChargeMaps.org, PlugShare). You wouldn't really get more functionality, just maybe an alternate layout.

The Nissan owners portal isn't that bad, I use it from my desktop all the time. But it isn't convenient for portable and non-flash devices.

  • Nissan is infatuated with Flash. Unless the portal understands you browser's user-agent string as a mobile device and sends you the scaled down page, you must be able to handle Flash.
    • Surface RT is not recognized as mobile, and the Nissan site is not on the white-list of approved sites for flash.
    • (I don't feel I should have to hack the white list to make this work, and many people may not know how to do this)
  • For some reason Nissan decided that the mobile version of there site would not remember logins.
  • Notification preferences aren't changeable from the mobile web site
 
flbas1 said:
Rather than make apps for phones . . .
can you guys make webpages? designed for any device?

that way, I can use the same exact system from my pc or phone

before anyone says CarWings - look at how hard and slow it is to use (exact same reasons you guys found the WSDL and XML payloads)

thoughts?

My main goal is logging but I suppose as TimeHorse.com becomes more and more DNS consistent I may host something based on the pycarwings git repository.
 
flbas1 said:
Rather than make apps for phones . . .
can you guys make webpages? designed for any device?

that way, I can use the same exact system from my pc or phone

before anyone says CarWings - look at how hard and slow it is to use (exact same reasons you guys found the WSDL and XML payloads)

thoughts?

http://www.mynissanleaf.com/viewtopic.php?p=104160#p104160" onclick="window.open(this.href);return false;
 
turbo2ltr said:
http://www.mynissanleaf.com/viewtopic.php?p=104160#p104160

Did you have a chance to update your web page with the latest notes on the 6.6kW version of the protocol Turbo?
 
bigtlb said:
My two cents....

I really wouldn't want to use a third party dedicated web site for a few reasons:

  • Any company to do this probably wouldn't have the infrastructure of Nissan (it would probably end up being an individual developer). So, would probably have an even lower track record on responsiveness, availability and up time.
  • I would have privacy and security concerns.
    • Are they using ssl?
    • Are they harvesting my credentials, or information about my behavior?
  • With no adequate revenue model, the site wouldn't stay up for long.
    • How would the developer pay for the ssl cert?
    • how would they pay for hosting time?
    • Unless they are using the same server for other projects - which could affect up-time and availability
  • An alternate site wouldn't give you much more meaningful functionality than the Nissan Owners Portal

I see that turbo2ltr piped in later on in this thread...his site is an excellent example of how an individual developer CAN maintain a track record on responsiveness, availability and uptime (within the limitations of the CARWINGS site being up anyway).

I've had it on my list to basically do a web version of the app for the same reasons that flbas1 asked: it's a great portable format and it can easily do everything that the app does without having to actually write an app.

I hear what you are saying about the security side of things, but I really don't understand the concern. The worst thing I can see happening is that a hacker could start your climate control remotely (Nissan doesn't even provide a STOP charging capability, even though I think they should).

Nonetheless, I would probably not hesitate, nor have I hesitated, to use a third-party web based service as an alternative to the Nissan app, provided the provider is an active member of this community.

Just to give you an example of how this can be paid for, I have a VPS server I pay for monthly because I have a web site I host that requires a bit more resources than a standard web host provider will provide. But I am nowhere near close to running out of capacity. So if I were to host a site such as this I would not foresee any downtime or resource issues. Other than very brief outages that my provider has initiated to upgrade hardware/software my uptime over the past 10 years has been pretty much non-stop.

I can easily self-sign an SSL certificate. True, those aren't as trustworthy as one that's third-party certified, but again for a recognized member of the community, given the potential "damage" that can be done, I wouldn't be worried about it. You sound like you would be, and if that's a concern of yours, I would say you should just stick to the official apps. But I think there are enough people that would accept the "risk".

Finally, no, a web based portal would probably not give you any significant added functionality over the Nissan app. But I would list the following:

1) It would be web based so it wouldn't require a smartphone. I didn't have a smartphone myself until about 6 months ago, and even then I'm not sure I really like the official Nissan app.
2) It wouldn't require me to log in every time. Even when Nissan updated their app with the "Keep me logged in" box, it still requires you to log in every time. Sorry, that's just brain dead.
3) Something that WOULD be additional functionality is the ability to automatically request an UPDATE if it's been more than X (15?) minutes since the last update was requested, yet still immediately display the status that CARWINGS returned anyway.
4) A more sophisticated system could actually implement timers that you didn't have to physically go to the car to adjust. Okay, the downside is that without a STOP charging command you'd be limited to 100% charging. But if you were outside of your normal routine and you wanted to schedule a one-time timer to be ready say at 5:00pm, the web-based system could schedule a START charging at the appropriate time so it would be ready at the desired time. This one's a bit of a stretch, and I'm not even sure I would trust a third party to that. It would be a no-brainer if Nissan supplied us with a STOP charging command--I could implement very complex timers (e.g. charge immediately to 50%, then stop, then let the normal timer take over at its normal time).
5) Another additional functionality would be a more advanced charging monitor system. The system could be set up to check the charging status 30 minutes after the expected charge start should've happened and alert you if the car is not charging.

As I said, you're welcome to disagree and just not use it. But I for one think there is a lot of room for improvement (and increased portability) over what Nissan is offering us.
 
I just got my Leaf last weekend and one of the first things I played with is the API. Thank you for everyone's hard work on decoding the protocol!!!

I already integrated it with my house's dashboard so I can at a glance see everything at my house including the Leaf's status.

I was wondering if there are any guidelines for how often it's ok to get status updates? Do frequent updates reduce the Leaf's range or cause any problems?
 
ggulik said:
I was wondering if there are any guidelines for how often it's ok to get status updates? Do frequent updates reduce the Leaf's range or cause any problems?

It shouldn't cause range problems, but the CARWINGS server(s) are not especially robust. There was a 3rd party app that requested status every 5 minutes or so for all their users and it supposedly brought CARWINGS down. If it's just you, you're not likely to cause that kind of issue, but at the same time I would probably not request updates more frequently than every 15 minutes. And if you want to get fancy, if it's not plugged in and/or charging, or it's at its 100% (or 80%) charged state, then I would probably wait an hour before the next request.
 
Does anyone know what error 9005 is? I have a user of my LEAF Commander app in Norway who says he can't login, and the error code he gets is 9005. I know my app works for other users in Norway, so there is something special about this one user. He says the app used to work.
 
same problem... I have Leaf from Germany used in Poland. All was OK since I got car (feb 2013). Now since 15th June I can't login to Carwings - same "unknown error 9005". Tried several other applications - no luck.
I still can login via webpage from Nissan support - but not from phone (tried iOS and Android).
 
In my experience the 9005 has something to do with the carwings server having problems with sessions for your user towards the japanese master server
 
it is working now again! after two weeks it repaired itself.... must be really some server problems....
 
Could someone explain what the AppToken is? I can see that the base64 decoded version of the AppToken is in this format:
SmartPhoneKeyVersion=1;SmartPhoneType=IPHONE;UUID=5DEECC38-2169-4DD9-A2DE-CF62787AEBC7&ccc42b36e2327b2aa79456f70de8f539205cf800486c927b85438b64c6f510bc

What I can't figure out is how to generate the last bit, since it appears to be keyed off of the UUID. For me at least the V2 endpoints don't work without a valid AppToken.

Thanks!
 
I was just wondering if there are any ways or guidelines to help and support for how often it’s ok to get status updates? Do frequent updates reduce the Leaf’s range or cause any problems?
 
Hi,

I have been trying to get some response from the server making the request using JavaScript. I do understand that this is not a programmers' forum, yet since many of you have mentioned that you managed to get it working, i am posting this here. I am stuck. I am not getting any response from the server. Any idea what am I doing wrong here? This is what I have so far:

Code:
<html>
<head>
    <title>SOAP JavaScript Client Test</title>
    <script type="text/javascript">
        function soap() {
            var xmlhttp = new XMLHttpRequest();
            xmlhttp.open('POST', '/aqPortal/v2/smartphoneProxy/vehicleService', true);

            // build SOAP request
            var sr =
                    '<?xml version="1.0"?>' + 
                    '<ns2:SmartphoneLoginWithAdditionalOperationRequest ' + 
                    'xmlns:ns4="urn:com:hitachi:gdc:type:report:v1" xmlns:ns7="urn:com:airbiquity:smartphone.vehicleservice:v1"   ' + 
                    'xmlns:ns3="http://www.nissanusa.com/owners/schemas/api/0" xmlns:ns5="urn:com:airbiquity:smartphone.reportservice:v1"' + 
                    'xmlns:ns2="urn:com:airbiquity:smartphone.userservices:v1" xmlns:ns6="urn:com:hitachi:gdc:type:vehicle:v1">' + 
                    '<SmartphoneLoginInfo>' + 
                    '<UserLoginInfo>' + 
                    '<userId>CARWINGS PIN REDACTED</userId>' + 
                    '<userPassword>CARWINGS PASSWORD REDACTED</userPassword>' + 
                    '</UserLoginInfo>' + 
                    '<DeviceToken>DUMMY1313820504.22296500</DeviceToken>' + 
                    '<UUID>DEVICE ID REDACTED</UUID>' + 
                    '<Locale>US</Locale>' + 
                    '<AppVersion>1.40</AppVersion>' + 
                    '<SmartphoneType>ANDROID</SmartphoneType>' + 
                    '</SmartphoneLoginInfo>' + 
                    '<SmartphoneOperationType>SmartphoneGetPreferencesRequest</SmartphoneOperationType>' + 
                    '<SmartphoneOperationType>SmartphoneLatestBatteryStatusRequest</SmartphoneOperationType>' + 
                    '<SmartphoneOperationType>SmartphoneLatestACStatusRequest</SmartphoneOperationType>' + 
                    '<SmartphoneOperationType>SmartphoneGetScheduledACRemoteRequest</SmartphoneOperationType>' + 
                    '</ns2:SmartphoneLoginWithAdditionalOperationRequest>';

            xmlhttp.onreadystatechange = function () {
                if (xmlhttp.readyState == 4) {
                    if (xmlhttp.status == 200) {

                        alert('done use firebug to see response');
                    }
                }
            }
            // Send the POST request
            xmlhttp.setRequestHeader('Content-Type', 'text/xml');
            xmlhttp.send(sr);
            // send request
            // ...
        }
    </script>
</head>
<body>
    <form name="Demo" action="" method="post">
        <div>
            <input type="button" value="Soap" onclick="soap();" />
        </div>
    </form>
</body>
<html>
 
udayms said:
Hi,

I have been trying to get some response from the server making the request using JavaScript. I do understand that this is not a programmers' forum, yet since many of you have mentioned that you managed to get it working, i am posting this here. I am stuck. I am not getting any response from the server. Any idea what am I doing wrong here? This is what I have so far:

I forked the Python Script from Haykinson some time ago and made a few tweaks but I don't think I've pushed them to GitHub https://svn.timehorse.com/repos-web/open/log/index.php" onclick="window.open(this.href);return false;

But last I checked it had stopped working a while ago. I think they changed the protocol but I stopped paying attention when I got the ELM327.
 
Apps like https://play.google.com/store/apps/details?id=no.darkspawns.leafmanager" onclick="window.open(this.href);return false; still continue to work. So, I think there is some way to have access to the apis.
 
Back
Top