command carwings via sms

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.

lettcco

Well-known member
Joined
Apr 22, 2010
Messages
109
Location
Santa Clarita, CA
this seems like a better solution than apps, as it opens up any cellular phone to use to remotely control carwing operation.

I don't know the extend of Leaf's carwing cellular capability via AT&T, but I would imagine if it has a hard coded sim of some sort for any GSM operation. Assign a number to the unit, and then, only when pre-registered phone number incoming text commands to "start charging" or "start climate". Going one step further, text "SOC" or "status" and have the car text you back "85% charged, not charging", etc.

If Nissan won't do this, this could possibly implemented by someone who can create a script on a server to translate text messages into HTLM/Java action on the nissan owner portal.
 
lettcco said:
this seems like a better solution than apps, as it opens up any cellular phone to use to remotely control carwing operation.

If Nissan won't do this, this could possibly implemented by someone who can create a script on a server to translate text messages into HTLM/Java action on the nissan owner portal.

I completely agree, but my sense is that Nissan's overriding concern is security (i.e. somebody 'hacking' in to a Leaf, even for mischief like cancelling a charge or running the A/C). The 15-minute logoff on the Owner's Portal at has bothered a number of MNL posters, for example, but it's a security feature.

The server/script solution sounds interesting, but it would have to either keep my OP login/password, or I would have to send it with each SMS command, right?
 
lettcco said:
If Nissan won't do this, this could possibly implemented by someone who can create a script on a server to translate text messages into HTLM/Java action on the nissan owner portal.

I might take this on. I already figured out how to make requests to their server.
 
what is psms code you are receiving responses from? mine is from 79161.

i tried the standard inquiries, no responses. probably not a two way thing here
 
Apparently when the CW Server wants to talk to a car, it sends a "phone home" message to the car's assigned phone number (in the car's SIM).

Presumably the car then calls the CW server, ID and security info are exchanged (hopefully encrypted), and then data and commands are exchanged, ... etc.
 
I don't know if this will be of any use to anyone but I found this link which is supposed to be some sort of attempt at a Carwings emulator.

http://ta.nissan-carwings.com/CWC/cw_emulator.html

http://ta.nissan-carwings.com/CWC/cwc_terminal_emulation.html

If only they would provide an API and a dev kit. ;)
 
What I've been doing is going directly to the "action" links that the Nissan web site uses.

For example:
Code:
https://www.nissanusa.com/owners/vehicles/setHvac?id=3139&fan=on&rand=1.6655712337459171

The id=XXXX here is your Car ID. You can see this by looking at the link in your owner's page.

There's fan=on, fan=off, statusRefresh, and so on.

I made my own web page with these links (for my car), and now I can activate these with one click instead of a dozen. Works better on brain-dead web browsers like the one in my BlackBerry.

I would MUCH rather do this all by TXT message.
 
That's awesome. I didn't think I could dig down far enough to get at those links. Now, if I could dig the three useful numbers out of the response, I'd be able to work it from my phone again. (SOC, range estimate, and charge estimate)

Are you saying that this doesn't require going through a login? That would be sweet. Also means anyone who found my page could charge my car :eek:

@Dave: same 79161 here. Must be "Nissan's phone number".
 
I played with this a few months ago. It does require a login. I was trying to find a "stop charging" command, but the guys from critical mass said it wasn't implemented for some reason or another.
 
For the folks asking via PM, there really isn't any "code" to share.. it's just the links embedded in the javascript app. Just take those links and make an HTML page out of them.

You DO still have to log in. However, once you log in, you get a response page that just says: "true"
No pull-down junk or animations, and it works on a Blackberry, which was my goal.

My "HTML page" consists of these three links:
Code:
Refresh Status:
https://www.nissanusa.com/owners/vehicles/statusRefresh?id=XXXX&rand=2.9938402264070563

Fan On:
https://www.nissanusa.com/owners/vehicles/setHvac?id=XXXX&fan=on&rand=1.2039483457659211

Fan Off:
https://www.nissanusa.com/owners/vehicles/setHvac?id=XXXX&fan=off&rand=1.3459323457659211

You have to put your own car ID in the XXXX place, and it doesn't appear the 'rand' values do anything.

There is one more link for Start Charging that I didn't include, and turbo is correct that there is no "stop". However, I did once send Start while the car was charging, and it stopped. Who knows if that's intentional.
 
it doesn't appear the 'rand' values do anything

I guess they are there because the developers believe that avoiding caching gateway problems require voodoo rather than just proper header handling. And they might even be right :) The theory is, your browser cache, and any proxies on the way between you and Nissan, will not cache a request if each new request has a new "rand" value in it, so all that matters is that it's unique.

Of course, using GET to WRITE state is the wrong way to do it in the first place ;-)

Have you looked at how logging in works? Is it cookie based or WWW Authenticate based? If it's cookie based, can you re-use the cookie (a la firesheep)?

In the best of worlds they would use HTTPS and OAuth 2.0 (similar to Facebook, say) to allow delegation to any properly authorized user, and ONLY a properly authorized user.
 
I made my own web page with these links (for my car), and now I can activate these with one click instead of a dozen.

This is the code I was asking about... I had assumed you also took care of authentication through your own website. I want to do this, but if you still have to login through the normal site, it's usefulness in reduced drastically.

I'm thinking you should be able to login using curl so you don't have to go to the owners portal at all.
 
turbo2ltr said:
This is the code I was asking about... I had assumed you also took care of authentication through your own website.
Oh, I see.. Nope, I still have to log in. There is nothing more to my page than the links.
I want to do this, but if you still have to login through the normal site, it's usefulness in reduced drastically.
You're wrong there.. usefulness is improved 100%.
The Blackberry BrainDead(tm) web browser can not access the Nissan site. It CAN, however, access just the login page and my page, so it's immensely more useful than no remote capability at all.

I'm thinking you should be able to login using curl so you don't have to go to the owners portal at all.
Indeed. That's worth trying!
 
I am trying but the damn portal is down!

My Palm Pre gets forced over to the mobile site with no way back so for me, I need to be able to log in. Now that it's warming up, I find myself looking to pre-cool more often.
 
turbo2ltr said:
I am trying but the damn portal is down!

My Palm Pre gets forced over to the mobile site with no way back so for me, I need to be able to log in. Now that it's warming up, I find myself looking to pre-cool more often.
I'm working on a better solution for the Pre, btw... :)
 
lemketron said:
turbo2ltr said:
I am trying but the damn portal is down!

My Palm Pre gets forced over to the mobile site with no way back so for me, I need to be able to log in. Now that it's warming up, I find myself looking to pre-cool more often.
I'm working on a better solution for the Pre, btw... :)

Awesome! Sign me up!
 
If you're comfortable giving your login name/password to a third party site, then that site could log in for you by issuing the appropriate sequence of requests and getting the cookies. That's just a shame, though, because me giving my name/password for the Nissan site to SomeGuyOnTheWeb.com is an act of trust that shouldn't be necessary...
 
Another weekend and I should have it complete..

Just have to get the HVAC working, which at this point should be pretty easy. But I've been sitting here for like 7 hours straight and got to stop.

portal.png
 
Back
Top