-
Notifications
You must be signed in to change notification settings - Fork 1
/
endpoints.js
275 lines (231 loc) · 7.72 KB
/
endpoints.js
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
endpointsList = [
{
"name" : "Select one endpoint",
"url" : "Select one endpoint",
"payload" : {},
"description" : ""
},
{
"name" : "cockpit",
"url" : "cockpit",
"payload" : {},
"description" : "Show mileage" ,
"response" : [{"name" : "totalMileage"},{"name":"fuelAutonomy"},{"name" : "fuelQuantity"}]
},
{
"name" : "location",
"url" : "location",
"payload" : {},
"description" : "Show car position" ,
"response" : [{"name" : "gpsLatitude"},{"name" : "gpsLongitude",}]
},
{
"name" : "battery-status",
"url" : "battery-status" ,
"payload" : {},
"description" : "Show battery status and charging status" ,
"response" : [
{"name" : "chargeStatus"},
{"name" : "rangeHvacOn"},
{"name" : "batteryLevel"},
{"name" : "batteryTemperature"},
{"name" : "batteryAutonomy"},
{"name" : "batteryCapacity"},
{"name" : "batteryAvailableEnergy"},
{
"name" : "plugStatus",
"values" : [
{"number" : 0, "text" : "UNPLUGGED"},
{"number" : 1, "text" : "PLUGGED"},
{"number" : -1, "text" : "PLUG_ERROR "},
{"number" : -2147483648, "text" : "PLUG_UNKNOWN "},
]
},
{
"name" : "chargingStatus",
"values" : [
// https://github.com/hacf-fr/renault-api/blob/main/src/renault_api/kamereon/enums.py
{"number" : 0.0, "text" : "NOT_IN_CHARGE"},
{"number" : 0.1, "text" : "WAITING_FOR_A_PLANNED_CHARGE"},
{"number" : 0.2, "text" : "CHARGE_ENDED"},
{"number" : 0.3, "text" : "WAITING_FOR_CURRENT_CHARGE"},
{"number" : 0.4, "text" : "ENERGY_FLAP_OPENED"},
{"number" : 1.0, "text" : "CHARGE_IN_PROGRESS"},
{"number" : -1.0, "text" : "CHARGE_ERROR"},
{"number" : -1.1, "text" : "UNAVAILABLE"},
]
},
{"name" : "chargingRemainingTime"},
{"name" : "chargingInstantaneousPower"},
]
},
{
"name" : "-------- HVAC ---------",
"url" : "",
"payload" : {},
"description" : ""
},
{
"name" : "hvac-status",
"url" : "hvac-status",
"payload" : {},
"description" : "Show if On/off,target temperature,no schedule",
"response" : [{"name" : "hvacStatus"},{"name" : "internalTemperature"},]
},
{
"name" : "hvac-settings",
"url" : "hvac-settings",
"payload" : {},
"description" : "Show HVAC schedule grouped by id",
"response" : [{"name" : "mode"},{"name" : "globalTargetTemperature"}, {"name" : "schedules"},]
},
{
"name" : "hvac-schedule",
"url" : "hvac-schedule",
"payload" : {},
"description" : "Show HVAC schedule groupd by day",
"response" : [{"name" : "calendar"}]
},
{
"name" : "hvac-history",
"url" : "hvac-history?start=20210201&end=20210301&type=day",
"payload": {},
"description" : "-",
"response" : [{"name" : ""},{"name" : ""},]
},
{
"name" : "hvac-sessions",
"url" : "hvac-sessions?start=20210201&end=20210301",
"payload" : {},
"description" : "-",
"response" : [{"name" : ""},{"name" : ""},]
},
{
"name" : "----- Charging -------",
"url" : "",
"payload" : {},
"description" : ""
},
{
"name" : "Show current charging mode",
"url" : "charge-mode" ,
"payload" : {},
"description" : "Show charge mode",
"response" : [{"name" : "chargeMode"}]},
{
"name" : "Show charging settings",
"url" : "charging-settings",
"payload" : {},
"description" : "Show charge schedule by id",
"response" : [{"name" : "mode"},{"name" : "schedules"},]
},
{
"name" : "Show charge schedule",
"url" : "charge-schedule" ,
"payload" : {},
"description" : "Show charge schedule by day",
"response" : [{"name" : "calendar"}]
},
{
"name" : "Show charge history",
"url" : "charge-history?start=20220101&end=20220322&type=day",
"payload" : {},
"description" : "Show number of charges and count of kWh",
"response" : [{"name" : ""}]
},
{
"name" : "Show charges",
"url" : "charges?start=20220101&end=20220328&type=day",
"payload" : {},
"description" : ""
},
{
"name" : "----- Actions ------",
"url" : "",
"payload" : {},
"description" : ""
},
{
"name" : "Refresh battery status",
"url" : "actions/refresh-battery-status",
"payload" : {'data':{'type':'RefreshBatteryStatus'}},
"description" : "Refresh battery data retrieved by battery-status endpoint"
},
{
"name" : "Refresh HVAC status",
"url" : "actions/refresh-hvac-status" ,
"payload" : {'data':{'type':'RefreshHvacStatus'}},
"description" : "Refresh HVAC data retrieved nby hvac-status endpoint"
},
{
"name" : "Refresh location",
"url" : "actions/refresh-location",
"payload" : {'data':{'type':'RefreshLocation'}},
"description" : "Refresh GPS position"
},
{ "name" : "Start charging", "url" : "actions/charging-start", "payload" : {'data':{'type':'ChargingStart','attributes':{'action':'start'}}}, "description" : "Start charging immediately"},
{ "name" : "Stop charging", "url" : "actions/charging-start", "payload" : {'data':{'type':'ChargingStart','attributes':{'action':'stop'}}}, "description" : "Stop charging immediately"},
{ "name" : "Set charge mode to ALWAYS", "url" : "actions/charge-mode" , "payload" : {'data':{'type':'ChargeMode','attributes':{'action':'always_charging'}}}, "description" : "Set charge mode"},
{ "name" : "Set charge mode to SCHEDULED", "url" : "actions/charge-mode" , "payload" : {'data':{'type':'ChargeMode','attributes':{'action':'schedule_mode'}}}, "description" : "Set charge mode"},
{
"name" : "Start HVAC immediately",
"url" : "actions/hvac-start" ,
"payload" : {'data':{'type':'HvacStart','attributes':{'action':'start','targetTemperature':'21'}}},
"description" : ""
},
{
"name" : "Stop HVAC immediately",
"url" : "actions/hvac-start" ,
"payload" : {'data':{'type':'HvacStart','attributes':{'action':'stop'}}},
"description" : "(not working)"
},
{
"name" : "actions/send-navigation",
"url" : "actions/send-navigation" ,
"payload" : {
'data': {
'type': 'SendNavigation',
'attributes': {
'downloadTrafficInfo': false,
'destinations': [
{
'id': 1,
'latitude': 42,
'longitude': 12,
'calculationCondition': 0
}
]
}
}
},
"description" : "Send coordinates of 1 to 5 destinations"
},
{ "name" : "----- Experimental ----------", "url" : "", "payload" : {}, "description" : "-"},
{ "name" : "lock-status", "url" : "lock-status" , "payload" : {}, "description" : "-"},
{ "name" : "notification-settings", "url" : "notification-settings", "payload" : {}, "description" : "-"},
{ "name" : "actions/horn-lights", "url" : "actions/horn-lights", "payload" : {}, "description" : "-"},
{
"name" : "Engine start",
"url" : "actions/engine-start",
"payload" : {'data':{'type':'EngineStart','attributes':{'action':'start'}}},
"description" : "(Requires SRP authentication)"
},
{
"name" : "Engine stop",
"url" : "actions/engine-start",
"payload" : {'data':{'type':'EngineStart','attributes':{'action':'stop'}}},
"description" : "(Requires SRP authentication)"
},
{
"name" : "res-state",
"url" : "res-state" ,
"payload" : {},
"description" : "Show status of Internal Combustion Engine"
},
{
"name" : "Refresh lock status",
"url" : "actions/refresh-lock-status",
"payload" : {'data':{'type':'RefreshLockStatus'}},
"description" : "Refresh status of door locking"
},
];