lion said:Still haven't figured this out, so confirmation would really be helpful
<?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>vkapadia</userId>
<userPassword>mypassword</userPassword>
</UserLoginInfo>
<DeviceToken>DUMMY1313820504.22296500</DeviceToken>
<UUID>randomly generated guid</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>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SmartphoneLoginWithAdditionalOperationResponse
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">
<SmartphoneUserInfoType>
<VehicleInfo>
<Vin>my vin</Vin>
</VehicleInfo>
<Nickname>VinayLEAF</Nickname>
</SmartphoneUserInfoType>
<ns4:SmartphoneLatestBatteryStatusResponse>
<SmartphoneBatteryStatusResponseType>
<ns3:BatteryStatusRecords>
<ns3:OperationResult>START</ns3:OperationResult>
<ns3:OperationDateAndTime>2015-06-23T18:41:13.0</ns3:OperationDateAndTime>
<ns3:BatteryStatus>
<ns3:BatteryChargingStatus>NOT_CHARGING</ns3:BatteryChargingStatus>
<ns3:BatteryCapacity>12</ns3:BatteryCapacity>
<ns3:BatteryRemainingAmount>7</ns3:BatteryRemainingAmount>
</ns3:BatteryStatus>
<ns3:PluginState>NOT_CONNECTED</ns3:PluginState>
<ns3:CruisingRangeAcOn>95400</ns3:CruisingRangeAcOn>
<ns3:CruisingRangeAcOff>100488</ns3:CruisingRangeAcOff>
<ns3:TimeRequiredToFull>
<ns3:HourRequiredToFull>10</ns3:HourRequiredToFull>
<ns3:MinutesRequiredToFull>30</ns3:MinutesRequiredToFull>
</ns3:TimeRequiredToFull>
<ns3:TimeRequiredToFull200>
<ns3:HourRequiredToFull>4</ns3:HourRequiredToFull>
<ns3:MinutesRequiredToFull>0</ns3:MinutesRequiredToFull>
</ns3:TimeRequiredToFull200>
<ns3:NotificationDateAndTime>2015-06-23T18:41:27.0</ns3:NotificationDateAndTime>
</ns3:BatteryStatusRecords>
<VehicleInfo>
<Vin>1N4AZ0CP5FC303713</Vin>
</VehicleInfo>
<lastBatteryStatusCheckExecutionTime>2015-06-23T18:41:13.000Z</lastBatteryStatusCheckExecutionTime>
</SmartphoneBatteryStatusResponseType>
</ns4:SmartphoneLatestBatteryStatusResponse>
<ns4:SmartphoneLatestACStatusResponse>
<SmartphoneACStatusResponseType>
<ns3:RemoteACRecords>
<ns3:OperationResult>FINISH</ns3:OperationResult>
<ns3:OperationDateAndTime>2015-06-20T23:21:16.0</ns3:OperationDateAndTime>
<ns3:RemoteACOperation>START</ns3:RemoteACOperation>
<ns3:ACStartStopDateAndTime>2015-06-20T23:21:16.0</ns3:ACStartStopDateAndTime>
<ns3:CruisingRangeAcOn>57960</ns3:CruisingRangeAcOn>
<ns3:CruisingRangeAcOff>60720</ns3:CruisingRangeAcOff>
<ns3:ACStartStopURL></ns3:ACStartStopURL>
<ns3:PluginState>NOT_CONNECTED</ns3:PluginState>
<ns3:ACDurationBatterySec>900</ns3:ACDurationBatterySec>
<ns3:ACDurationPluggedSec>7200</ns3:ACDurationPluggedSec>
</ns3:RemoteACRecords>
<VehicleInfo>
<Vin>my vin</Vin>
</VehicleInfo>
</SmartphoneACStatusResponseType>
</ns4:SmartphoneLatestACStatusResponse>
<ns2:SmartphoneGetPreferencesResponse>
<NotificationPreferencesType>
<vin>my vin</vin>
<chargeStatusApple>false</chargeStatusApple>
<chargeStatusEmail>true</chargeStatusEmail>
<chargeStatusSms>true</chargeStatusSms>
<plugInReminderApple>false</plugInReminderApple>
<plugInReminderEmail>true</plugInReminderEmail>
<plugInReminderSms>true</plugInReminderSms>
<chargeCompleteApple>false</chargeCompleteApple>
<chargeCompleteEmail>true</chargeCompleteEmail>
<chargeCompleteSms>true</chargeCompleteSms>
<hvacOnApple>false</hvacOnApple>
<hvacOnEmail>true</hvacOnEmail>
<hvacOnSms>true</hvacOnSms>
<vehicleChargeApple>false</vehicleChargeApple>
<vehicleChargeEmail>true</vehicleChargeEmail>
<vehicleChargeSms>true</vehicleChargeSms>
</NotificationPreferencesType>
</ns2:SmartphoneGetPreferencesResponse>
<ns6:SmartphoneRemoteGetScheduledACResponse>
<SmartphoneRemoteGetScheduledACResponseType>
<ns5:GetScheduledACRemoteResponse/>
<VehicleInfo>
<Vin>my vin</Vin>
</VehicleInfo>
</SmartphoneRemoteGetScheduledACResponseType>
</ns6:SmartphoneRemoteGetScheduledACResponse>
</ns2:SmartphoneLoginWithAdditionalOperationResponse>
<?xml version="1.0"?>
<ns4:SmartphoneRemoteBatteryStatusCheckRequest
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">
<ns3:BatteryStatusCheckRequest>
<ns3:VehicleServiceRequestHeader>
<ns2:VIN>my vin</ns2:VIN>
</ns3:VehicleServiceRequestHeader>
</ns3:BatteryStatusCheckRequest>
</ns4:SmartphoneRemoteBatteryStatusCheckRequest>
irwinr said:Has anyone gotten this to work since the migration to the "NissanConnect EV" service? The old API calls don't seem to be working for me anymore.
-Jeremy
$ curl [email protected] https://nissan-na-smartphone-biz.viaaq.com/aqPortal/v3/smartphoneProxy/userService
<html><head><title>JBossWeb/2.0.0.GA_CP05 - Error report</title><style></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>This request requires HTTP authentication ().</u></p><HR size="1" noshade="noshade"><h3>JBossWeb/2.0.0.GA_CP05</h3></body></html>
SmartPhoneKeyVersion=1;SmartPhoneType=ANDROID;UUID=<my Phones UUID>
AccessKeyID: A1r619u1ty!
irwinr said:Just in case anyone else is working on this: I noticed that there is an extra HTTP Header that I didn't notice before in the initial login called "AppToken". It's a base64 encoded version of this:
Code:SmartPhoneKeyVersion=1;SmartPhoneType=ANDROID;UUID=<my Phones UUID>
So it seems this header has to be added to any requests and it treats it as the "authentication":
There is also another header called AccessKeyID:
Code:AccessKeyID: A1r619u1ty!
BOTH of these new headers have to be present to access the new service.
-Jeremy
BluesBro said:Hi
I'm using the https://github.com/haykinson/pycarwings script to implement controlling my Leaf in my Home automation system, byt i really need help on the AC-function.
Does anyone know how to implement AC On/Off into this script or in any script for that matter. Either as a toggle-function or 2 separate scripts, respectively on and of?
On beforehand huge thanks!
grangan said:irwinr said:Just in case anyone else is working on this: I noticed that there is an extra HTTP Header that I didn't notice before in the initial login called "AppToken". It's a base64 encoded version of this:
Code:SmartPhoneKeyVersion=1;SmartPhoneType=ANDROID;UUID=<my Phones UUID>
So it seems this header has to be added to any requests and it treats it as the "authentication":
There is also another header called AccessKeyID:
Code:AccessKeyID: A1r619u1ty!
BOTH of these new headers have to be present to access the new service.
-Jeremy
thanks Jeremy. For some reason the old APIs (https://nissan-na-smartphone-biz.viaaq.com/aqPortal/smartphoneProxy/) still seems to be working and I just tested and most of the functionality is fine (login, request update, Start climate control). Is that expected, one of your earlier post suggested it should not be working.
Just to make sure my app is future proof I tried the new v3 api with your suggestions on AccessKeyId and AppToken in headers and I am still getting "This request requires HTTP authentication" error message. Any suggestion on how to proceed or a sample trace like IIama suggests would be helpful as well.
thanks!
curl -c cookies.txt -H "AccessKeyID: A1r619u1ty!" -H "AppToken: <Base 64 of token>" [email protected] https://nissan-na-smartphone-biz.viaaq.com/aqPortal/v3/smartphoneProxy/userService
<?xml version='1.0' encoding='utf-8' standalone='yes' ?><ns2:SmartphoneLoginWithAdditionalOperationRequest xmlns:ns2="urn:com:airbiquity:smartphone.userservices:v2" xmlns:ns3="http://www.nissanusa.com/owners/schemas/api/0" xmlns:ns4="urn:com:hitachi:gdc:type:report:v1" xmlns:ns5="urn:com:airbiquity:smartphone.reportservice:v1" xmlns:ns6="urn:com:hitachi:gdc:type:vehicle:v1" xmlns:ns7="urn:com:airbiquity:smartphone.vehicleservice:v1"><SmartphoneLoginInfo><UserLoginInfo><userId>My Email</userId><userPassword>My password</userPassword></UserLoginInfo><DeviceToken>My Token</DeviceToken><UUID>My UUID</UUID><Locale>en_US</Locale><AppVersion>3.0.2</AppVersion><SmartphoneType>ANDROID</SmartphoneType></SmartphoneLoginInfo><SmartphoneOperationType>SmartphoneGetPreferencesRequest</SmartphoneOperationType><SmartphoneOperationType>SmartphoneLatestBatteryStatusRequest</SmartphoneOperationType><SmartphoneOperationType>SmartphoneLatestACStatusRequest</SmartphoneOperationType><SmartphoneOperationType>SmartphoneGetScheduledACRemoteRequest</SmartphoneOperationType></ns2:SmartphoneLoginWithAdditionalOperationRequest>
Enter your email address to join: