Has anyone reversed engineered Carwings server APIs yet ?

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.

ericsf

Well-known member
Joined
Sep 7, 2010
Messages
358
Location
San Francisco
Today I got curious about the value SOC displayed in percent on the Web portal. I was wondering why this data didn't appear on the iPhone app.

I used IE debug mode to snoop at the data received from the Carwings servers when I hit the refresh button. I looked through the "Response Body" and found no trace of the SOC expressed in percent. All there was about the battery was "CurrenrBattery:5" (where 5 is the number of bars lit). My conclusion was that the website merely shows the # of bars multiplied by 8.33. The Carwings portal is no more precise than the iPhone App.

I imaging that other owners got to the same conclusion long before me. However, I didn't find any discussion thread about the guts of the Carwings web portal and iPhone app. Has anyone looked at he protocol used to login into the Carwings server and how to initiate a query to get the vehicle status? If so, has anyone tried to build their own "client" (web, PC or iPhone based) to replace Nissan's Carwings web portal? I just did a 10min preliminary investigation... But it looks quite doable.

I am growing tired of several things about the iPhone app. I was very disappointed by the first "real" update (1.0.3) and I am seriously considering making my own to address those issues :
- In case of timeout it doesn't automatically sign back in (have to redo whatever command each time).
- No way to program a periodic background status query to keep the app up do date all the time.
- iPhone only... I own an iPhone so it doesn't annoy me but I may want to switch to WP7 in the near future.
 
I started to reverse engineer the carwings server stuff, but ran out of time due to non-techy obligations. I wasn't going to bother with the whole thing, though; just enough to log in and force a refresh, getting charge level and status, so that I could write something to check the server around 10pm and warn me if my Leaf was below 80% charge and not plugged in.

The process should definitely be doable, just a matter of time and patience to poke at it all.
 
The iPhone app uses different servers than the Web portal does. It sends an XML message describing the desired operation in an https POST and the server responds with an XML message describing the result. The server sets a session cookie on the login request that subsequent requests must include.

The XML messages don't really contain anything that isn't displayed by the app (except the car's VIN #).

The servers used by the iPhone app are hosted by Airbiquity, who I assume wrote the app for Nissan.
 
ericsf said:
I used IE debug mode to snoop at the data received from the Carwings servers when I hit the refresh button. I looked through the "Response Body" and found no trace of the SOC expressed in percent. All there was about the battery was "CurrenrBattery:5" (where 5 is the number of bars lit). My conclusion was that the website merely shows the # of bars multiplied by 8.33.
Thanks for confirming what I've been saying for months. I knew it had to be true by empirical evidence, but I was too lazy to prove it as you did.

Ray
 
Small update...

I've been trying to get through the Login process in my own program. So far no luck. I am not sure how Turbo programmed his server/proxi but I'm doing mine the hard way: plain old C with the standard Wininet library (don't ask). I've never messed with those API before so it could end up taking me a couple of years :)
 
Back
Top