Open fin2red opened 4 months ago
Forget charging-start, you must use "actions/charge-mode" with this payloads:
Start charging:
{
"data": {
"type": "ChargeMode",
"attributes": {
"action": "always_charging"
}
}
}
Stop charging:
{
"data": {
"type": "ChargeMode",
"attributes": {
"action": "schedule_mode"
}
}
}
And you will need at least one charging schedule already active.
Thank you very much!!
Does that mean that if I want to start charging (by plugging), I need to call "always_charging" first, or otherwise it won't start charging, because it's on "schedule_mode" since the last time I requested to stop charge?
Good question. I didn't verify that, I always stopped by hand directly on the car, but I think you are right: if you use this method, you'll have to switch back to "always" once you disconnect.
But the real problem is that your command is not accepted at all, while usually it is accepted but not executed because improperly formatted.
I just noticed that I am receiving same error on my test page (warning: use it at your own risk, use a temporary password!): "start" is accepted, "stop" is not, hence something changed in the api: or "stop" has been changed to something else, or there is a new endpoint like "charging-stop"; I tried some new random names, but no luck.
My new discoveries:
{ "data": { "type": "ChargingStart", "attributes": { "action": PARAMETER } } }
PARAMETER value --> server response: 0 -->
{
"data": {
"type": "ChargingStart",
"id": "ea11e720-b9f2-47bf-bcf3-3031bb364bb5",
"attributes": {
"action": "start"
}
}
}
1 --> Action must be 'start' but was 'pause' 2 --> Action must be 'start' but was 'resume' 3 --> Body has at least one wrongly formatted value
Thank you for your responses!
But sorry - I'm not sure I understand your last discovery.
Are you saying that we can call "ChargingStart", but instead of "start" or "stop", we can put "0", "1", "2", etc... ?
So I guess "0" or "start" works for starting, but you couldn't find one that works for stopping.
Thank you again.
As far as I can understand, you can use "raw values" 0, 1 or 2, or the equivalent strings "start", "pause" and "resume", but "start" is only for /actions/charging-start endpoint, I am trying to figure out which is the right one for pause and resume. Instead, apparently "stop" is not an allowed option.
Ok here it is (but no tested yet):
/commerce/v1/accounts/ACCOUNT/kamereon/kcm/v1/vehicles/VIN/charge/pause-resume
payload:
{"data":{"type": "ChargePauseResume","attributes": { "action": "pause" } }}
Hello,
I've been trying a number of ways to call
/actions/charging-start
(the first action that I'm trying to call), but I'm always getting an error. TheGET
requests work well.I'm not sure if I'm missing some header, or missing something in the payload, but here's a minimal example:
I also tried
application/json
as the Content-type, and removing/adding spaces in the JSON, also different cURL options, etc...But I always get:
Any idea why?
It seems consistent as per the documentation: https://renault-api.readthedocs.io/en/stable/endpoints.html#actions-charging-start
And as per the payload in this comment: https://github.com/hacf-fr/renault-api/issues/763#issuecomment-1372388595
So, I'm not sure what I'm doing wrong! Thank you!