API Reference - pims.vehicle.command-preconditioning
This API allows to send remote command to the vehicle.
Before sending any remote to vehicle, you should subscribe pims.vehicle.signal.
Use this set of parameters with pims.vehicle.command
to start or stop preconditioning.
This remote command is only available for Low Emission Vehicles (LEV) and Electric Vehicles (EV).
Input Parameter | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
action | Name of the remote action to perform, in this case |
String |
|
preconditioning
|
true |
startNow | Start or stop preconditioning. |
Boolean |
- true: start preconditioning
- false: stop preconditioning
|
true
|
true |
programs | Preconditioning program |
List of Objects |
/ | / |
|
programs
.hour |
Preconditioning program hour. |
Integer |
|
9
|
true |
programs
.minute |
Preconditioning program minute. |
Integer |
|
32
|
true |
programs
.isEnabled |
Indicates if the program is active or no. |
Boolean |
|
true
|
true |
programs
.occurrence |
Occurrence of program. |
List of Strings |
- mon
- tue
- wed
- thu
- fri
- sat
- sun
|
Daily
|
true |
programs
.slot |
Order of occurrence. |
Integer |
|
3
|
true |
Output Data | ||||
---|---|---|---|---|
No data |
Error | |
---|---|
Error Code | Error Label |
2000 | Unknown error |
2101 | Missing [PARAMETER] parameter |
2102 | Invalid [PARAMETER] parameter |
2201 | Timeout/Polling Timeout/Command Timeout |
2202 | Network problem : No internet |
2203 | Invalid return [Parsing error] ou [No data] ou [invalid Data] |
2204 | Server Error |
2301 | Need Basic Authentication (to get CVS token) |
2302 | Need Strong Authentication |
2329 | Immediate [ACTION] request discarded due to SEV different than STOP. |
2333 | Immediate preconditioning request discarded due to preconditioning already ongoing. |
2334 | Immediate preconditioning request discarded due to communication problem with preconditioning system. |
2335 | Stop preconditioning request discarded due to SEV different than STOP. |
2336 | Stop preconditioning request discarded due to precondtioning not running. |
2338 | Preconditioning program need to be update |
2377 | Broker connexion failed |
1
2
3
4
5
6
7
8
9
10
11
pims.set("pims.vehicle.command",
mapOf( /* parameters */
Pair("action", "preconditioning"),
Pair("startNow", "true"),
Pair("programs", "")
)
) { message -> when (message["status"] as? String) {
"SUCCEEDED" -> { } // handle succeeded status
"FAILED" -> { } // handle failed status
} }
1
2
3
4
5
6
7
8
9
10
11
pims.set(api: "pims.vehicle.command",
parameters: [
"action": "preconditioning",
"startNow": "true",
"programs": ""
]
) { (message) in
if message["status"] == "SUCEEDED" { } // handle succeeded status
else if message["status"] == "FAILED" { } // handle failed status
}
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": null
}
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// representation of the `failed` dictionary objects messages as JSON
/* -------- STATUS FAILED: 2000 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2000,
"label": "Unknown error"
}
}
/* -------- STATUS FAILED: 2101 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2101,
"label": "Missing [PARAMETER] parameter"
}
}
/* -------- STATUS FAILED: 2102 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2102,
"label": "Invalid [PARAMETER] parameter"
}
}
/* -------- STATUS FAILED: 2201 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2201,
"label": "Timeout/Polling Timeout/Command Timeout"
}
}
/* -------- STATUS FAILED: 2202 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2202,
"label": "Network problem : No internet"
}
}
/* -------- STATUS FAILED: 2203 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2203,
"label": "Invalid return [Parsing error] ou [No data] ou [invalid Data]"
}
}
/* -------- STATUS FAILED: 2204 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2204,
"label": "Server Error"
}
}
/* -------- STATUS FAILED: 2301 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2301,
"label": "Need Basic Authentication (to get CVS token)"
}
}
/* -------- STATUS FAILED: 2302 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2302,
"label": "Need Strong Authentication "
}
}
/* -------- STATUS FAILED: 2329 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2329,
"label": "Immediate [ACTION] request discarded due to SEV different than STOP."
}
}
/* -------- STATUS FAILED: 2333 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2333,
"label": "Immediate preconditioning request discarded due to preconditioning already ongoing."
}
}
/* -------- STATUS FAILED: 2334 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2334,
"label": "Immediate preconditioning request discarded due to communication problem with preconditioning system."
}
}
/* -------- STATUS FAILED: 2335 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2335,
"label": "Stop preconditioning request discarded due to SEV different than STOP. "
}
}
/* -------- STATUS FAILED: 2336 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2336,
"label": "Stop preconditioning request discarded due to precondtioning not running."
}
}
/* -------- STATUS FAILED: 2338 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2338,
"label": "Preconditioning program need to be update"
}
}
/* -------- STATUS FAILED: 2377 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2377,
"label": "Broker connexion failed"
}
}