SwedeSpeed - Volvo Performance Forum banner

1 - 20 of 86 Posts

·
Registered
Joined
·
86 Posts
Discussion Starter #1 (Edited)
Any programmers out there? I took a peek at the traffic from the mobile app, and with the vehicle connected to my home access points. Looks pretty simple.

Gosh, there's so much we can do here. How about Smartthings integration, or an Alexa skill, or perhaps sync the pre-climate dynamically to your HVAC temperature. I'd like the car to look for my calendar appointments and automatically pre-navigate based on specific types of events.

Example GET methods:
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/<VIN>/attributes
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/<VIN>/status

Status JSON response example:

{
"ERS": {
"status": null,
"timestamp": null,
"engineStartWarning": null,
"engineStartWarningTimestamp": null
},
"averageFuelConsumption": 163,
"averageFuelConsumptionTimestamp": "2018-01-22T03:46:06+0000",
"averageSpeed": 19,
"averageSpeedTimestamp": "2018-01-22T03:46:06+0000",
"brakeFluid": "Normal",
"brakeFluidTimestamp": "2018-01-22T03:46:06+0000",
"bulbFailures": [],
"bulbFailuresTimestamp": "2018-01-22T03:46:06+0000",
"carLocked": false,
"carLockedTimestamp": "2018-01-22T03:46:06+0000",
"distanceToEmpty": 512,
"distanceToEmptyTimestamp": "2018-01-22T03:46:06+0000",
"doors": {
"tailgateOpen": false,
"rearRightDoorOpen": false,
"rearLeftDoorOpen": false,
"frontRightDoorOpen": false,
"frontLeftDoorOpen": true,
"hoodOpen": false,
"timestamp": "2018-01-22T03:46:06+0000"
},
"engineRunning": false,
"engineRunningTimestamp": "2018-01-22T03:46:06+0000",
"fuelAmount": 63,
"fuelAmountLevel": 88,
"fuelAmountLevelTimestamp": "2018-01-22T03:46:06+0000",
"fuelAmountTimestamp": "2018-01-22T03:46:06+0000",
"odometer": 80863,
"odometerTimestamp": "2018-01-22T03:46:06+0000",
"privacyPolicyEnabled": false,
"privacyPolicyEnabledTimestamp": "2018-01-20T20:48:44+0000",
"remoteClimatizationStatus": null,
"remoteClimatizationStatusTimestamp": null,
"serviceWarningStatus": "Normal",
"serviceWarningStatusTimestamp": "2018-01-22T03:46:06+0000",
"timeFullyAccessibleUntil": "2018-01-27T02:44:29+0000",
"timePartiallyAccessibleUntil": "2018-02-13T02:44:29+0000",
"tripMeter1": 72000,
"tripMeter1Timestamp": "2018-01-22T03:46:06+0000",
"tripMeter2": 5800,
"tripMeter2Timestamp": "2018-01-22T03:46:06+0000",
"tyrePressure": {
"frontLeftTyrePressure": "Normal",
"frontRightTyrePressure": "Normal",
"rearLeftTyrePressure": "Normal",
"rearRightTyrePressure": "Normal",
"timestamp": "2018-01-22T03:46:06+0000"
},
"washerFluidLevel": "Normal",
"washerFluidLevelTimestamp": "2018-01-22T03:46:06+0000",
"windows": {
"frontLeftWindowOpen": false,
"frontRightWindowOpen": false,
"timestamp": "2018-01-22T03:46:06+0000",
"rearLeftWindowOpen": false,
"rearRightWindowOpen": false
}
}


Edit: Some of these statuses are strange - need to look into it. I just brought home the car yesterday with 6 miles.
 

·
Registered
Joined
·
6,186 Posts
You are genius. :) Do it before they start using SSL.

Wait, it is using https already. Puzzled me...

Sent from my K88 using Tapatalk
 

·
Registered
Joined
·
212 Posts
Hmm...did you modify system library or something to get the unencrypted traffic? Do they have certificate pinning?

And, very cool! Thanks for sharing!

EDIT - I looked up the WHOIS record of wirelesscar.net and saw that it's actually owned by "Volvo Information Technology AB". Kind of neat that they are doing this in-house and not relying on a third party provider.
 

·
Registered
Joined
·
595 Posts
I'm also in if you can do the impossible out of this. I have ST hub and it would be nice to integrate but that's a long shot.

The only caveat would be -- expect to receive a cease and desist letter from the folks at Volvo at some point for violation of their acceptable ToU or whatever nonsense they deem appropriate.

I wouldn't necessary publicize this as it won't be long before they feel threatened and shut it down by lawyering up.

Personally: I'd love ST hub integration plus.
 

·
Registered
Joined
·
29 Posts
That's cool, I would love ST integration. I was considering Flic button which the Volvo app appears to support natively to trigger preconditioning, but it would be so much nicer to throw a trigger on my SmartTiles screen

And since Flic exists, was expecting there would some API, was waiting for some free time to dig into that too
 

·
Registered
Joined
·
115 Posts
We should petition Volvo to be the first automaker to make these kinds of features available, but the security implications alone make me think they would be very hesitant. Perhaps for a reduced subset of the functionality at first, and they can grow it as they get confident in their security setup?

I so wish I would get in the same room with their mobile people.
 

·
Registered
Joined
·
77 Posts
Any programmers out there? I took a peek at the traffic from the mobile app, and with the vehicle connected to my home access points. Looks pretty simple.
This is awesome! Are you saying that the car has to connected to Wifi instead of cellular data for this to work? I tried replacing my VIN in the GET call and go a 500 error.
 

·
Registered
Joined
·
212 Posts
This is awesome! Are you saying that the car has to connected to Wifi instead of cellular data for this to work? I tried replacing my VIN in the GET call and go a 500 error.
I assume you'd need an access token or something from, say, OAuth?
 

·
Registered
Joined
·
77 Posts
I assume you'd need an access token or something from, say, OAuth?
You're right. I immediately realized this after I sent that message.

It would be nice if they opened up sort of developer portal where you could generate api keys for vehicles you own.
 

·
Registered
Joined
·
212 Posts
You're right. I immediately realized this after I sent that message.

It would be nice if they opened up sort of developer portal where you could generate api keys for vehicles you own.
Agreed! Or we can wait for OP to teach us how to intercept network requests so we have know how to get the full header!
 

·
Registered
Joined
·
595 Posts
Agreed! Or we can wait for OP to teach us how to intercept network requests so we have know how to get the full header!
wireshark or tcpview but i doubt you can see encrypted packets tho via wireshark.

Sent from my SM-T813 using Tapatalk
 

·
Registered
Joined
·
86 Posts
Discussion Starter #13 (Edited)
Here's some more info - kinda swamped today.

Use a tool called Postman (https://www.getpostman.com/) to run some tests.

In Postman, select Import -> Paste Raw Text. Then paste one of the examples below.

Status example:

curl -X GET \
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/YOUR_VIN_HERE/status \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-device-id: Device' \
-H 'x-originator-type: App' \
-H 'x-os-type: Android' \
-H 'x-os-version: 22'

Action example:

curl -X POST \
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/YOUR_VIN_HERE/lock \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-device-id: Device' \
-H 'x-originator-type: App' \
-H 'x-os-type: Android' \
-H 'x-os-version: 22'


Replace "YOUR_VIN_HERE" with your VIN.
Configure Authorization to Basic, set the username to your VOC email address and password.


Some other actions:
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/YOUR_VIN_HERE/heater/start

/heater/start
/heater/stop
/preclimatization/start
/preclimatization/stop
/parkingclimate/start
/parkingclimate/stop
/precleaning/start
/precleaning/stop
/engine/start
/engine/stop
/honk_and_flash
/honk_blink/both
/honk_blink/horn
/honk_blink/lights


Also, to grab your vehicle link without having the VIN,

curl -X GET \
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/customeraccounts \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-device-id: Device' \
-H 'x-originator-type: App' \
-H 'x-os-type: Android' \
-H 'x-os-version: 22'

Returns a "accountVehicleRelations" link.
accountVehicleRelations returns the vehicle link with VIN.
 

·
Registered
Joined
·
128 Posts
Here's some more info - kinda swamped today.


Some other actions:
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/YOUR_VIN_HERE/heater/start

/heater/start
/heater/stop
/preclimatization/start
/preclimatization/stop
/parkingclimate/start
/parkingclimate/stop
/precleaning/start
/precleaning/stop
/engine/start
/engine/stop
/honk_and_flash
/honk_blink/both
/honk_blink/horn
/honk_blink/lights


Also, to grab your vehicle link without having the VIN,

curl -X GET \
https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/customeraccounts \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-device-id: Device' \
-H 'x-originator-type: App' \
-H 'x-os-type: Android' \
-H 'x-os-version: 22'

Returns a "accountVehicleRelations" link.
accountVehicleRelations returns the vehicle link with VIN.
Impressed with the very clean RESTful interface Volvo has implemented and your improvisation skills !
 

·
Registered
Joined
·
20 Posts
When doing a post, have you figured out what you need in the body of the message?

I get this JSON response (/honk_blink/horn), which makes me think there are required params in addition to the http headers you've already figured out.

{
"errorLabel": "InvalidInputCriteria",
"errorDescription": "The input parameters are invalid"
}
 

·
Registered
Joined
·
123 Posts
I can help if anyone wants to do any kind of project. I work on restful api’s for living


Sent from my iPhone using Tapatalk
 

·
Registered
Joined
·
20 Posts
First step for me was to use ARC in chrome to do some tests. The GET referenced above works great, POSTing data seems to require input parameters and can't figure out what those are. ant1sec seemed to have it working, so perhaps I'm missing something simple.
 

·
Registered
Joined
·
86 Posts
Discussion Starter #18
First step for me was to use ARC in chrome to do some tests. The GET referenced above works great, POSTing data seems to require input parameters and can't figure out what those are. ant1sec seemed to have it working, so perhaps I'm missing something simple.
I couldn't get honk_blink working either. I've only been using preclimatization start/stop and lock/unlock in a rather basic SmartThings device handler for a few weeks. I think honk_blink needs a location passed with it - need to take a closer look.
 

·
Registered
Joined
·
16 Posts
Hey all you tech smart Volvo owners: Got a T8 which essentially requires the VOC app on smart phone to "precondition"/- remotely before driving. App allows me to perform necessary communication with the car I own. Volvo is gonna charge me to use this App after the initial free period (I think around $200/year). Can one of you Create a "simple" app that I can purchase once and download and use without paying $200/year? I don't need the other features (like remotely checking tire pressure and other diagnostics-- I can do that in my car). Wider market if you can make the app succeed with remote start. Then (almost) all Volvo owners will purchase your app after initial free VOC ends. You could charge a lot (but only once please!) to purchase and download your app. VOC App Needs competition!
 

·
Registered
Joined
·
145 Posts
Hey all you tech smart Volvo owners: Got a T8 which essentially requires the VOC app on smart phone to "precondition"/- remotely before driving. App allows me to perform necessary communication with the car I own. Volvo is gonna charge me to use this App after the initial free period (I think around $200/year). Can one of you Create a "simple" app that I can purchase once and download and use without paying $200/year? I don't need the other features (like remotely checking tire pressure and other diagnostics-- I can do that in my car). Wider market if you can make the app succeed with remote start. Then (almost) all Volvo owners will purchase your app after initial free VOC ends. You could charge a lot (but only once please!) to purchase and download your app. VOC App Needs competition!
This would be great.
 
1 - 20 of 86 Posts
Top