Mobile SDK

iOS or Android

SDK Features - AMI & Rocks-e

Info: Stellantis Mobile SDK is not publicly available.

Security: AMI & Rocks-e does not require any security schemes because its does not access the user online account.

Connectivity: this feature is available usingBluetooth Low Energy (BLE) connectivity

  • πŸ”Œ The Bluetooth dongle should have been installed in the vehicle.
  • 🚘 The user must stand inside or close to the vehicle and the device should support BLE.

References: check-out πŸš™ AMI & Rocks-e component list of APIs.

CitroΓ«n AMI and Opel Rocks-e are small electric vehicles. They are not compatible with any other features of this SDK (Trips, Navigation, Vehicle Status, Remote Command).

However, Stellantis Connected Vehicles mobile SDK allows to retrieve information about these vehicles using Bluetooth.

citroen-ami

The vehicle status feature, like most of the features of this SDK, is not available for Rocks-e and AMI. However, it is possible to retrieve informations about theses vehicles using pims.vehicle.informations with O2X service.

They are 2 methods to retrieve AMI & Rocks-e vehicle information:

  • πŸ”” Event: vehicle info subscribe events are received each time the vehicle status change.
  • ⬇️ On request: when calling the get API.

Subscribe to Vehicle Information #

This API will try connecting to the vehicle if Bluetooth and GPS are enabled. Refer to Connection and Charge Events if you want to subscribe to events about connection info.

They are 2 types of reception stream depending on the parameter reception:

  • πŸ•‘ Regular Interval: when reception == information, data are refreshed on a very short period of time.
  • πŸš— Status: when reception == status, subscribe events are received when the vehicle status change. Vehicle status are: Parked, Drive & Charging.

Subscribing to pims.vehicle.informations will scan for vehicle nearby and try to connect. Scanning will be impacted by the parameter firstTime of the query:

  • Use firstTime == true, if you want to subscribe to a new vehicle. You must include the parameter VIN in the query. Timeout will happen after 60 sec of unsuccessfull scanning, but default values can be changed in pims.vehicle.timeout.
  • Otherwise, use firstTime == false if you want to subscribe to the previous vehicle. You should not include the parameter VIN in the query. There is no timeout in this case.

Only one VIN can be subscribed at a time. You can check the current subscribed VIN using pims.vehicle.vin-O2X.

BLE: AMI and Rocks-e use Bluetooth Low Energy in order to transfer vehicle information, the user does not have to proceed to any Bluetooth pairing in the device settings.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Subscribe, see unsubscribe below */
pims.subscribe("pims.vehicle.informations",
  mapOf( /* parameters */
  Pair("actionType", "O2X"),
  /* If firstTime is set to true, you should provide the vehicle VIN,
     otherwise it will use the previously provided VIN */
  Pair("fistTime", "true"),
  Pair("VIN", "VR1AB12C3D4567890"),
  /* reception status: notified when the state of the vehicle changes
     reception information: notified on a regular time basis */
  Pair("reception", "status")
  )
) { message -> /* handle message */ }

/* Unsubscribe */
pims.unsubscribe( "pims.vehicle.informations" /* no params */ )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Subscribe, see unsubscribe below */
pims.subscribe(api: "pims.vehicle.informations", 
  parameters: [
  "actionType": "O2X", 
  "fistTime": "true", 
  /* If firstTime is set to true, you should provide the vehicle VIN, 
     otherwise it will use the previously provided VIN */
  "VIN": "VR1AB12C3D4567890", 
  /* reception status: notified when the state of the vehicle changes
     reception information: notified on a regular time basis */
  "reception": "status"
  ]
) { (message) in /* handle message */ }

/* Unsubscribe */
pims.unsubscribe( api: "pims.vehicle.informations" /* no params */ )
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// representation of the `result` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "RESULT",
  "result": {
    "vin", "VR1AB12C3D4567890",
    "currentAlert": {
      "parkingBrake": true, "clusterIssue": true, "stop": true,
      "batteryCharge": true, "brakeSystemProblem": true,
      "service": true, "batteryTemperature": true, "turtleMode": true
    },
    "previousAlert": {
      "parkingBrake": true, "clusterIssue": true, "stop": true,
      "batteryCharge": true, "brakeSystemProblem": true,
      "service": true, "batteryTemperature": true, "turtleMode": true
    },
    "data": {
      "batterySoc": { "unit": "unit_name", "value": 42 },
      "systemState": "charging",
      "batteryState": "bootloader",
      "remainingAutonomy": { "unit": "unit_name", "value": 42 },
      "rnd": "drive",
      "chargeDelay": { "unit": "unit_name", "value": 42 },
      "parkBrakeStatus": "activated",
      "totalOdometer": { "unit": "unit_name", "value": 42 }
    },
    "receivedAt": "YYYY-MM-DDTHH:MM:SSZ",
    "status": "charging"
  }
}

false

Get Vehicle Information #

To retrieve AMI & Rocks-e data, you can also use the Get API. It returns the last vehicle informations received. You must have first subscribed to pims.vehicle.informations.

1
2
3
4
5
6
pims.get("pims.vehicle.informations",
  mapOf( /* parameters */
  Pair("actionType", "O2X")
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
pims.get(api: "pims.vehicle.informations", 
  parameters: [
  "actionType": "O2X"
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": {
    "vin", "VR1AB12C3D4567890",
    "currentAlert": {
      "parkingBrake": true, "clusterIssue": true, "stop": true,
      "batteryCharge": true, "brakeSystemProblem": true,
      "service": true, "batteryTemperature": true, "turtleMode": true
    },
    "previousAlert": {
      "parkingBrake": true, "clusterIssue": true, "stop": true,
      "batteryCharge": true, "brakeSystemProblem": true,
      "service": true, "batteryTemperature": true, "turtleMode": true
    },
    "data": {
      "batterySoc": { "unit": "unit_name", "value": 42 },
      "systemState": "charging",
      "batteryState": "bootloader",
      "remainingAutonomy": { "unit": "unit_name", "value": 42 },
      "rnd": "drive",
      "chargeDelay": { "unit": "unit_name", "value": 42 },
      "parkBrakeStatus": "activated",
      "totalOdometer": { "unit": "unit_name", "value": 42 }
    },
    "receivedAt": "YYYY-MM-DDTHH:MM:SSZ",
    "status": "charging"
  }
}

false

Connection & Charge Events #

In case you need to retrieve 02X events, you can use pims.vehicle.event. You must have subscribed first to pims.vehicle.informations.

Event are triggered when when the vehicle is in the following states:

  • disconnected: happens when the Bluetooth connection between the device and the vehicle is lost.
  • cantCharge: when the vehicle is supposed to charge but the parking brake is off. In this case you can request the user to set the parking brake to start the charge.
1
2
3
4
5
6
7
8
9
/* Subscribe, see unsubscribe below */
pims.subscribe("pims.vehicle.event",
  mapOf( /* parameters */
  Pair("actionType", "O2X")
  )
) { message -> /* handle message */ }

/* Unsubscribe */
pims.unsubscribe( "pims.vehicle.event" /* no params */ )
1
2
3
4
5
6
7
8
9
/* Subscribe, see unsubscribe below */
pims.subscribe(api: "pims.vehicle.event", 
  parameters: [
  "actionType": "O2X"
  ]
) { (message) in /* handle message */ }

/* Unsubscribe */
pims.unsubscribe( api: "pims.vehicle.event" /* no params */ )
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}
1
2
3
4
5
6
7
8
// representation of the `result` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "RESULT",
  "result": {
    "event": "disconnected" /* or */ "cantCharge"
  }
}

false