Mobile SDK

iOS or Android

SDK Features - Remote Commands

Info: Stellantis Mobile SDK is not publicly available.

Security: Remote Commands require the following security schemes to be valid

Connectivity: this feature is available usingย ๐Ÿ“ก Cellular network over-the-air

  • ๐Ÿš— The vehicle should be able to access internet.
  • ๐Ÿ“ฑ The device should be able to access internet.

References: check-out ๐Ÿ•น Remote Command component list of APIs.

With *Stellantis Connected Vehicles SDK you can remote control a vehicle using internet connection, no need to be next to the vehicle.

They are 3 commands available only for Low Emission Vehicles (LEV) and Electric Vehicles (EV):

  • ๐Ÿ”Œ Start/stop charge.
  • ๐Ÿ”Œโฐ Scheduled charge.
  • โ„๏ธ Program preconditioning.

And 3 commands available for all eligible vehicles:

  • ๐Ÿ”“ Lock/unlock doors.
  • ๐Ÿ”‰ Honk the horn.
  • ๐Ÿ’ก Set a light blinking.

Subscribe to Signal Events #

First, you should subscribe to pims.vehicle.signal. This API is helpful in order to track the progress of remote command send to the vehicle. Each time the vehicle status is updated, this API will return an event.

Info: Subscribing to signal events will not send any remote command to the vehicle. But subscribing to these events allows being informed of the remote command status!

1
2
3
4
5
6
/* Subscribe, see unsubscribe below */
pims.subscribe("pims.vehicle.signal"
) { message -> /* handle message */ }

/* Unsubscribe */
pims.unsubscribe( "pims.vehicle.signal" /* no params */ )
1
2
3
4
5
6
/* Subscribe, see unsubscribe below */
pims.subscribe(api: "pims.vehicle.signal"
) { (message) in /* handle message */ }

/* Unsubscribe */
pims.unsubscribe( api: "pims.vehicle.signal" /* 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
31
32
33
34
35
36
37
38
39
40
41
42
// representation of the `result` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "RESULT",
  "result": {
      "code": 200,
      "vehicle": {
        "resources": {
          "status": {
            "lastUpdate": "2022-02-14T13':'41':58Z",
            "fuelInformation": {
              "autonomy":145.0,
              "chargingInformation": {
                "chargingMode": null, "chargingRate":0.0, "isPlugged":false,
                "chargingState": null, "remainingTime": "PT0S" },
              "chargingLevel":42.0, "lastUpdate": "2022-02-14T13':'41':57Z",
              "consumption":0.0, "type": "fuel" },
            "doorStateInformation": {
              "isDriverDoorOpened": false, "isPassengerDoorOpened": false,
              "isRearLeftDoorOpened": false, "isRearRightDoorOpened": false,
              "isRearWindowOpened": false, "isRoofWindowOpened": false, "isTrunkOpened": false,
              "state": [ "Locked" ] },
            "precondInformation": {
              "lastUpdate": "2022-02-14T13':'41':57Z", "status": "disabled",
              "precondScheduling": [
                { "hour":1, "isEnabled":false, "occurence": ["Mon"],
                  "slot":1, "recurrence": "Daily", "minute":48 },
                { "hour": 12, "isEnabled": false, "minute": 12,
                  "occurence": ["Wed"], "recurrence": "Daily", "slot": 2 } ] },
            "electricInformation": { "autonomy":0.0,
              "chargingInformation": {
                "chargingMode": "no", "chargingRate":0.0, "isPlugged":false,
                "nextDeferredChargingDate": "2022-02-14T18':'00':10.715Z",
                "chargingState": "disconnected", "remainingTime": "PT0S" },
              "chargingLevel":1.0, "lastUpdate": "2022-02-14T13':'41':57Z", "type": "electric" },
            "vehicleType": "hybrid", "vin": "VR3ATTENTKY102274" } },
        "attributes": {
          "engine": "PHEV", "vin": "VR3ATTENTKY102274", "brand": "peugeot"
        }
      }
    }
}

false

Then you need to set a vehicle before sending a remote command.

Set a Vehicle #

In order to send a remote command, you must set the VIN of the targeted vehicle.

1
2
3
4
5
6
7
pims.set("pims.vehicle.vin",
  mapOf( /* parameters */
  "actionType": "remote",
  "vin": "VR1AB12C3D45678909"
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
7
pims.set(api: "pims.vehicle.vin", 
  parameters: [
  Pair("actionType", "remote"),
  Pair("vin", "VR1AB12C3D45678909")
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false

Send a Remote Command #

Sending a remote command is done using pims.vehicle.command. Make sure you have set a vehicle before sending the command.

You can follow the remote command status by subscribing to pims.vehicle.signal.

โ„๏ธ Program preconditioning #

This remote command is only available for Low Emission Vehicles (LEV) and Electric Vehicles (EV).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pims.set("pims.vehicle.command",
  mapOf( /* parameters */
  "action": "preconditioning",
  "startNow": false,
  "programs": [
    [
      "hour": 9,
      "minute": 32,
      "isEnabled": true,
      "occurence": ["mon", "tue"],
      "slot": 1
    ],
    [
      "hour": 10,
      "minute": 52,
      "isEnabled": false,
      "occurence": ["wen", "thu"],
      "slot": 2
    ]
  ]
  )
) { message -> /* 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
pims.set(api: "pims.vehicle.command", 
  parameters: [
  Pair("action", "preconditioning"),
  Pair("startNow", false),
  Pair("programs", mapOf(
    mapOf(
      Pair("hour", 9),
      Pair("minute", 32),
      Pair("isEnabled", true),
      Pair("occurence", mapOf("mon", "tue")),
      Pair("slot", 1),
    )
    mapOf(
      Pair("hour", 10),
      Pair("minute", 52),
      Pair("isEnabled", false),
      Pair("occurence", mapOf("wen", "thu")),
      Pair("slot", 2),
    )
  )),
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false

๐Ÿ”Œ Start charge #

This remote command is only available for Low Emission Vehicles (LEV) and Electric Vehicles (EV).

1
2
3
4
5
6
7
pims.set("pims.vehicle.command",
  mapOf( /* parameters */
  "action": "charge"
  "startNow": "true"
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
7
pims.set(api: "pims.vehicle.command", 
  parameters: [
  Pair("action", "charge"),
  Pair("startNow", "true")
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false

In order to retieve information about of a end of charge, you can use pims.vehicle.event - remote.

โฑ๐Ÿ”Œ Scheduled charge #

This remote command is only available for Low Emission Vehicles (LEV) and Electric Vehicles (EV).

Scheduled Charge & Immediate Charge: immediate charging can interfere on scheduled charges.

  • 2335 is returned when โ€œImmediate charging request discarded, deferred hour has been changeโ€.
  • 2336 is returned when โ€œDeferred hour request discarded, immediate charging has been launchโ€.
1
2
3
4
5
6
7
8
9
pims.set("pims.vehicle.command",
  mapOf( /* parameters */
  "action": "chargeDeferredTime",
  "startNow": "false",
  "deferredTime": "PTxxHxxM",
  "checkStartCharge": true
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
7
8
9
pims.set(api: "pims.vehicle.command", 
  parameters: [
  Pair("action", "chargeDeferredTime"),
  Pair("startNow", "false"),
  Pair("deferredTime", "PTxxHxxM"),
  Pair("checkStartCharge", true)
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false

In order to retieve information about of a charge (start & end), you can use pims.vehicle.event - remote.

๐Ÿ”“ Lock/unlock doors #

1
2
3
4
5
6
7
pims.set("pims.vehicle.command",
  mapOf( /* parameters */
  "action": "doors",
  "doorState": "lock"
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
7
pims.set(api: "pims.vehicle.command", 
  parameters: [
  Pair("action", "doors"),
  Pair("doorState", "lock")
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false

๐Ÿ”‰ Honk the horn #

1
2
3
4
5
6
pims.set("pims.vehicle.command",
  mapOf( /* parameters */
  "action": "horn"
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
pims.set(api: "pims.vehicle.command", 
  parameters: [
  Pair("action", "horn")
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false

๐Ÿ’ก Set a light blinking #

1
2
3
4
5
6
pims.set("pims.vehicle.command",
  mapOf( /* parameters */
  "action": "warning"
  )
) { message -> /* handle message */ }
1
2
3
4
5
6
pims.set(api: "pims.vehicle.command", 
  parameters: [
  Pair("action", "warning")
  ]
) { (message) in /* handle message */ }
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}

false