SwedeSpeed - Volvo Performance Forum banner

41 - 60 of 86 Posts

·
Registered
Joined
·
607 Posts
Did anyone ever create a SmartThings Device Handler that they would be able to share? I finally got around to getting the volvooncall from GitHub working in my Bash on Windows 10... and, it seems to be working fine, but, if someone could share their VOC Device Handler, that would be amazing!
 

·
Registered
Joined
·
43 Posts
It is always risky to develop 3rd Party APP when the primary vendor does not publish API Documentation.

There are many features I wish the VOC APP provided.

If someone where to develop IFTTT integration that would be great. My killer user scenarios is:

Hey Google
Start my car at 7:30 AM and warm it up to 70 degrees

or

Hey Google
Start my car in an hour and warm it up to 70 degrees
 

·
VOC / Connectivity Expert
Joined
·
498 Posts
It is always risky to develop 3rd Party APP when the primary vendor does not publish API Documentation.

There are many features I wish the VOC APP provided.

If someone where to develop IFTTT integration that would be great. My killer user scenarios is:

Hey Google
Start my car at 7:30 AM and warm it up to 70 degrees

or

Hey Google
Start my car in an hour and warm it up to 70 degrees
Volvo is already implementing something like this... the issue on why it's not out yet was around security and ultimately avoid someone from randomly saying to unlock the car by asking... this of course was the last time I asked my dealer.
 

·
Registered
Joined
·
43 Posts
Volvo is already implementing something like this... the issue on why it's not out yet was around security and ultimately avoid someone from randomly saying to unlock the car by asking... this of course was the last time I asked my dealer.
BMW has Google Home support. Of course I could never get it to work.

Where did you see public information from Volvo that they were developing Google Home integration? The Security is easy. Google has that developed. You do the pairing in the Google Home APP. If you can change your NEST thermostat you should be able to talk to your Volvo.
 

·
Registered
Joined
·
607 Posts
There's a lot of stuff that can be pulled from the car, and can be done.. Until it's blocked out completely... They can implement some security or secondary check within their apps (e.g. Windows, Android, iOS), but, I'm sure that would lead to more trouble than it's worth...

For example, here's what I can pull back (using the VolvoOnCall code from GitHub, which just pulls the server message) - from my XC90 T8:

Code:
{
    "ERS": {
        "status": "off",
        "timestamp": "2018-06-27T16:24:12+00:00",
        "engineStartWarning": "None",
        "engineStartWarningTimestamp": "2018-06-27T16:24:12+00:00"
    },
    "VIN": "REMOVED",
    "assistanceCallSupported": true,
    "averageFuelConsumption": 58.0,
    "averageFuelConsumptionTimestamp": "2018-07-05T18:02:04+00:00",
    "averageSpeed": 40,
    "averageSpeedTimestamp": "2018-07-05T18:02:04+00:00",
    "bCallAssistanceNumber": "+18553994691",
    "brakeFluid": "Normal",
    "brakeFluidTimestamp": "2018-07-05T18:02:04+00:00",
    "bulbFailures": [],
    "bulbFailuresTimestamp": "2018-07-05T18:02:04+00:00",
    "calculatedPosition": {
        "longitude": null,
        "latitude": null,
        "timestamp": null,
        "speed": null,
        "heading": null
    },
    "carLocatorDistance": 1000,
    "carLocatorSupported": true,
    "carLocked": true,
    "carLockedTimestamp": "2018-07-05T18:02:04+00:00",
    "climatizationCalendarMaxTimers": 8,
    "climatizationCalendarVersionsSupported": [
        "climatizationCalendarV1"
    ],
    "connectionStatus": "ConnectedWithPower",
    "connectionStatusTimestamp": "2018-07-05T18:13:22+00:00",
    "country": {
        "iso2": "US"
    },
    "distanceToEmpty": 80,
    "distanceToEmptyTimestamp": "2018-07-05T18:02:04+00:00",
    "doors": {
        "tailgateOpen": false,
        "rearRightDoorOpen": false,
        "rearLeftDoorOpen": false,
        "frontRightDoorOpen": false,
        "frontLeftDoorOpen": false,
        "hoodOpen": false,
        "timestamp": "2018-07-05T18:02:04+00:00"
    },
    "engineCode": "REMOVED",
    "engineRunning": false,
    "engineRunningTimestamp": "2018-07-05T18:02:04+00:00",
    "engineStartSupported": true,
    "exteriorCode": "REMOVED",
    "fuelAmount": 14,
    "fuelAmountLevel": 28,
    "fuelAmountLevelTimestamp": "2018-07-05T18:02:04+00:00",
    "fuelAmountTimestamp": "2018-07-05T18:02:04+00:00",
    "fuelTankVolume": 50,
    "fuelType": "HEV",
    "gearboxCode": "REMOVED",
    "grossWeight": 3010,
    "heater": {
        "seatSelection": {
            "frontDriverSide": false,
            "frontPassengerSide": false,
            "rearDriverSide": false,
            "rearPassengerSide": false,
            "rearMid": false
        },
        "status": "off",
        "timer1": {
            "time": null,
            "state": null
        },
        "timer2": {
            "time": null,
            "state": null
        },
        "timestamp": "2018-06-12T01:42:34+00:00"
    },
    "highVoltageBatterySupported": true,
    "honkAndBlinkDistance": 500,
    "honkAndBlinkSupported": true,
    "honkAndBlinkVersionsSupported": [
        "honkAndOrBlink",
        "honkAndBlink"
    ],
    "hvBattery": {
        "hvBatteryChargeStatusDerived": "CablePluggedInCar_Charging",
        "hvBatteryChargeStatusDerivedTimestamp": "2018-07-05T18:13:22+00:00",
        "hvBatteryChargeModeStatus": null,
        "hvBatteryChargeModeStatusTimestamp": null,
        "hvBatteryChargeStatus": "ChargeProgress",
        "hvBatteryChargeStatusTimestamp": "2018-07-05T18:13:22+00:00",
        "hvBatteryLevel": 22,
        "hvBatteryLevelTimestamp": "2018-07-05T18:13:22+00:00",
        "distanceToHVBatteryEmpty": 3,
        "distanceToHVBatteryEmptyTimestamp": "2018-07-05T18:13:22+00:00",
        "hvBatteryChargeWarning": "UnexpectedPowerloss",
        "hvBatteryChargeWarningTimestamp": "2018-07-05T02:46:24+00:00",
        "timeToHVBatteryFullyCharged": 300,
        "timeToHVBatteryFullyChargedTimestamp": "2018-07-05T18:13:22+00:00"
    },
    "interiorCode": "REMOVED",
    "journalLogEnabled": true,
    "journalLogSupported": true,
    "lockSupported": true,
    "maxActiveDelayChargingLocations": 7,
    "modelYear": 2017,
    "numberOfDoors": 5,
    "odometer": 10972640,
    "odometerTimestamp": "2018-07-05T18:02:04+00:00",
    "overrideDelayChargingSupported": false,
    "position": {
        "longitude": REMOVED,
        "latitude": REMOVED,
        "timestamp": "2018-07-05T17:18:51+00:00",
        "speed": null,
        "heading": null
    },
    "preclimatizationSupported": true,
    "privacyPolicyEnabled": false,
    "privacyPolicyEnabledTimestamp": "2018-02-16T21:03:14+00:00",
    "registrationNumber": "UNKNOWN",
    "remoteClimatizationStatus": "Charging",
    "remoteClimatizationStatusTimestamp": "2018-07-05T18:13:22+00:00",
    "remoteHeaterSupported": false,
    "sendPOIToVehicleVersionsSupported": [
        "sendSinglePOIToVehicle"
    ],
    "serverVersion": "4.18.17-feature-att_paygo_rateplan-voc-deployable",
    "serviceWarningStatus": "Normal",
    "serviceWarningStatusTimestamp": "2018-07-05T18:02:04+00:00",
    "status.parkedIndoor.supported": false,
    "subscriptionEndDate": "2020-09-23T12:00:00+00:00",
    "subscriptionStartDate": "2017-09-23T12:00:00+00:00",
    "subscriptionType": "PREMIUM_2013",
    "theftAlarm": null,
    "timeFullyAccessible": 7200,
    "timeFullyAccessibleUntil": "2018-07-10T17:18:02+00:00",
    "timePartiallyAccessible": 31680,
    "timePartiallyAccessibleUntil": "2018-07-27T17:18:02+00:00",
    "tripMeter1": 557100,
    "tripMeter1Timestamp": "2018-07-05T18:02:04+00:00",
    "tripMeter2": 5000,
    "tripMeter2Timestamp": "2018-07-05T18:02:04+00:00",
    "tyreDimensionCode": "REMOVED",
    "tyreInflationPressureHeavyCode": null,
    "tyreInflationPressureLightCode": null,
    "tyrePressure": {
        "frontLeftTyrePressure": "Normal",
        "frontRightTyrePressure": "Normal",
        "rearLeftTyrePressure": "Normal",
        "rearRightTyrePressure": "Normal",
        "timestamp": "2018-07-05T18:02:04+00:00"
    },
    "unlockSupported": true,
    "unlockTimeFrame": 120,
    "vehiclePlatform": "REMOVED",
    "vehicleType": "XC90",
    "vehicleTypeCode": "REMOVED",
    "verificationTimeFrame": 120,
    "vin": "REMOVED",
    "washerFluidLevel": "Normal",
    "washerFluidLevelTimestamp": "2018-07-05T18:02:04+00:00",
    "windows": {
        "frontLeftWindowOpen": false,
        "frontRightWindowOpen": false,
        "timestamp": "2018-07-05T18:02:04+00:00",
        "rearLeftWindowOpen": false,
        "rearRightWindowOpen": false
    }
}
Looking at the documentation for accessing third party API/calls with SmartThings, it looks like it may be something that's easily doable, for someone that's written it before (which is why I asked if anyone has done it :) ).. I guess I can give it a shot when I can get free time (which is rare to never)…

At that point, since you can tie SmartThings to both Google and Amazon (Alexa), it should be somewhat easy to get things automated... Not sure on the scheduling aspect, since I'm sure that would take a little more work (and coding in the Google/Amazon cloud, versus just writing in a SmartThings handler). But, saying "Alexa, turn on XC90" (assuming you have a virtual device in Alexa/SmartThings tied to the Remote Start On/Off state) should work…
 

·
Registered
Joined
·
2 Posts
Any additional movement here? I've been following the GitHub repo for the Python application....and I'm getting an empty accountVehicleRelations array which essentially causes vehicles not to be found and/or usable. Has anybody ran into this?
 

·
Registered
Joined
·
1 Posts
I'm also interested, I achieved to call the Webservice from Azure Cloud.

I wanted to track the position of my car every 5 minutes but as said previously the position is not changing while the car is moving.
It only returns the latest position of the vehicule when it was parked.
 

·
Registered
Joined
·
5 Posts
I'm also interested, I achieved to call the Webservice from Azure Cloud.

I wanted to track the position of my car every 5 minutes but as said previously the position is not changing while the car is moving.
It only returns the latest position of the vehicule when it was parked.
If you’ve ever tried to use the OnCall app right after turning the vehicle off, you get a message saying fuctions cannot be done cause the vehicle is in use. This is likely for safety reasons (imagine being able to turn off the vehicle while it’s in motion) and for reducing the amount of data the oncall SIM consumes, so they only use location service when absolutely necessary.

I’m sure this crowd is familiar with Charlie Miller’s work, so for me, it’s reassuring to see Volvo developing their APIs with thought an caution, and creating / exposing only those functions that are safe to do so.
 

·
Registered
Joined
·
415 Posts
An aftermarket option would be great for those US spec vehicles in Europe who are unable to utilise the existing app. It sucks not being able to take advantage of its functionality.



Sent from my iPad using Tapatalk
 

·
Registered
Joined
·
26 Posts
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.

did you ever capture passing google maps locations from the app to the car?
 

·
Registered
Joined
·
1 Posts
Collected some information - Postman Collection for easy consumption

Hello all,

I got my XC90 last Monday and found this thread :) As a developer I really appreciate the work and research which is already done.

To contribute and make it easier for the next folks to follow, I created a postman collection and environment to consume the APIs.

https://github.com/matthiasuweberg/voc/tree/master/postman

If time permits, I will start with some node_module for the API (like the Python repo already posted).

Would be happy to get some more information and feedback.

Kind regards,
Matthias
 

·
Registered
Joined
·
174 Posts
Hello all,

I got my XC90 last Monday and found this thread :) As a developer I really appreciate the work and research which is already done.

To contribute and make it easier for the next folks to follow, I created a postman collection and environment to consume the APIs.

https://github.com/matthiasuweberg/voc/tree/master/postman

If time permits, I will start with some node_module for the API (like the Python repo already posted).

Would be happy to get some more information and feedback.

Kind regards,
Matthias
Super helpful!!
 

·
Registered
Joined
·
1 Posts
/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
I was wondering how all of these actions were figured out. The reason why is because I was wondering if meanwhile new actions could have been added. This seems to be the most complete list around, since precleaning does not seem to be mentioned anywhere else but on this forum. By the way, does anybody know what precleaning is supposed to do? Also, I would expect precleaningSupported under Attributes, but haven't read about that anywhere. Or do all models support it? Has anyone tried?
 

·
Registered
Joined
·
77 Posts
I was wondering how all of these actions were figured out. The reason why is because I was wondering if meanwhile new actions could have been added. This seems to be the most complete list around, since precleaning does not seem to be mentioned anywhere else but on this forum. By the way, does anybody know what precleaning is supposed to do? Also, I would expect precleaningSupported under Attributes, but haven't read about that anywhere. Or do all models support it? Has anyone tried?
I've tried Postman with the queries that were posted earlier. Some of them work fine, but some just give me the following error:

{
"errorLabel": "VehicleDoesNotExist",
"errorDescription": "The Vehicle does not exist"
}

For the environment, I tried using na but that doesn't seem to help at all. I have the VIN set correctly, but in the environment setup, I just have region set to: na There are no brackets, quotes around it. I'd love to see someone else's query for position and what they get returned.

For example, if I try to query:

https://vocapi{{region}}.wirelesscar.net/customerapi/rest/v3.0/vehicles/{{VIN}}/position

I just get the error I posted above. I do get valid responses for say:
https://vocapi{{region}}.wirelesscar.net/customerapi/rest/v3.0/customeraccounts

It returns the following (data set to xxx on purpose)

{
"username": "xxxxxxxxxxcom",
"firstName": "xxxxxx",
"lastName": "xxxxxxx",
"accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"account": "https://vocapi.wirelesscar.net/customerapi/rest/v3.0/customeraccounts/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"accountVehicleRelations": []
}


Anyone else been successful with other queries?
 

·
Registered
Joined
·
3 Posts
Every query I've tried so far seems to be working fine. Here are my exact request and response. Not sure what the difference between position and calculated position is but position is correct. My car was parked at the time.

Hope this helps.

Request:
GET https://vocapi-na.wirelesscar.net/customerapi/rest/v3.0/vehicles/<vin>/position HTTP/1.1
Host: vocapi-na.wirelesscar.net
X-Device-Id: Device
X-OS-Type: Android
X-Originator-Type: App
X-OS-Version: 22
Content-Type: application/json
Authorization: Basic <hash>


Response:
{
"position": {
"longitude": <redacted>,
"latitude": <redacted>,
"timestamp": "2020-01-07T01:26:15+0000",
"speed": null,
"heading": null
},
"calculatedPosition": {
"longitude": null,
"latitude": null,
"timestamp": null,
"speed": null,
"heading": null
}
}
 

·
Registered
Joined
·
106 Posts
shamusom,
I am facing exactly same error, I am using Python to call the APIs and Its returning the customer account info correctly but later when I invoke other options, it returns "Vehicle not found". I am not sure why am I getting this error since my VOC app is working.

Do you have your license plate number listed on VOC?

 
41 - 60 of 86 Posts
Top