renault-api icon indicating copy to clipboard operation
renault-api copied to clipboard

SCENIC : Error: ('err.func.wired.forbidden', 'The access is forbidden')

Open remo-tech opened this issue 1 year ago • 23 comments

Hello, I am trying to use this api to control the new Renault Scenic , I got the error :

$renault-api charge start Error: ('err.func.wired.forbidden', 'The access is forbidden')

And he log :

2024-10-10 17:12:32,076 - renault_api.kamereon - DEBUG - Received Kamereon response 403 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/XXXXXXXXXXXXX/kamereon/kca/car-adapter/v1/cars/VF1XXXXXXXXXXX/charge-mode?country=FR: {"type":"FUNCTIONAL","messages":[{"code":"err.func.wired.forbidden","message":"The access is forbidden"}],"errors":[{"errorCode":"err.func.wired.forbidden","errorMessage":"The access is forbidden"}],"error_reference":"FUNCTIONAL"}

Any idea how to fix that ? The feature to start charging is working fine from the MyRenault app.

remo-tech avatar Oct 10 '24 15:10 remo-tech

Sadly the Renault API is fully undocumented. Hopefully someone can work out which endpoints get called - with what parameters...

epenet avatar Oct 14 '24 10:10 epenet

Any clue on how I can to help find the endpoint / parameters ? Any documentation on how the current API was discovered ?

remo-tech avatar Oct 14 '24 10:10 remo-tech

As I said in the other repository:

To discover the endpoints and the parameters that are sent and received, I managed (after several days) to set up an android emulator with the Renault application. Thanks to Frida, HttpTookit and (above all) to some scripts that I found how to bypass the ‘certificate pinning’ I managed to capture all the traffic of the application. I've tried with a secondary account and it works.

The problem is that I'm afraid to add my car account, which is the one we are interested in to capture the call in question.

So my doubts are, @epenet

-Do you know if there could be any kind of blocking of the account if they detect something? -Do you know if using your python application in console-cli can also cause some kind of temporary or indefinite ban?

In short, I'm a bit ‘afraid’ to use my original account, both for my testing environment and for yours.

Give me more information on this, to see if I can do a final test.

d4icon avatar Oct 14 '24 11:10 d4icon

To discover the endpoints and the parameters that are sent and received, I managed (after several days) to set up an android emulator with the Renault application. Thanks to Frida, HttpTookit and (above all) to some scripts that I found how to bypass the ‘certificate pinning’ I managed to capture all the traffic of the application. I've tried with a secondary account and it works.

Originally it was much easier - I gave up when they went with certificate pinning. If you have some time, it might be nice if you add a small guide to show how you managed it.

-Do you know if there could be any kind of blocking of the account if they detect something? -Do you know if using your python application in console-cli can also cause some kind of temporary or indefinite ban?

They have rate-control in place, so if you do too many tests in a short time you may get rate-limited for a few hours. I suggest to close the phone app and disable in HA while you make some tests

epenet avatar Oct 14 '24 11:10 epenet

To discover the endpoints and the parameters that are sent and received, I managed (after several days) to set up an android emulator with the Renault application. Thanks to Frida, HttpTookit and (above all) to some scripts that I found how to bypass the ‘certificate pinning’ I managed to capture all the traffic of the application. I've tried with a secondary account and it works.

Originally it was much easier - I gave up when they went with certificate pinning. If you have some time, it might be nice if you add a small guide to show how you managed it.

-Do you know if there could be any kind of blocking of the account if they detect something? -Do you know if using your python application in console-cli can also cause some kind of temporary or indefinite ban?

They have rate-control in place, so if you do too many tests in a short time you may get rate-limited for a few hours. I suggest to close the phone app and disable in HA while you make some tests

I'm going to prepare everything again, since it's been a few weeks since the tests, and anyway, as you know it's a bit complex at the beginning, and I need to remember some things again.

Once I have it all working again .... I don't know where to share this with you. You tell me... I don't know if some things can be put here. Let me know Best regards

d4icon avatar Oct 14 '24 12:10 d4icon

Ok I may have found something to help. I have decompiled the Android apk , and found a "ChargeEndpoint" class that seems to contains all endpoints linked to charge :

Here is the list :

GET : 
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/battery-inhibition-status
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charges
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-mode
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-schedule
/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/settings
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-history?type=month

POST :
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/charge-mode
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/charge-schedule
/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/schedule
/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/start

The charge/start endpoint seems different than the one use in renault-api , could this help you fix the problem ? Any clue on how to test this ?

remo-tech avatar Oct 14 '24 13:10 remo-tech

Ok I may have found something to help. I have decompiled the Android apk , and found a "ChargeEndpoint" class that seems to contains all endpoints linked to charge :

Here is the list :

GET : 
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/battery-inhibition-status
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charges
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-mode
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-schedule
/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/settings
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-history?type=month

POST :
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/charge-mode
/commerce/v1/accounts/{id}/kamereon/kca/car-adapter/v1/cars/{vin}/actions/charge-schedule
/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/schedule
/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/start

The charge/start endpoint seems different than the one use in renault-api , could this help you fix the problem ? Any clue on how to test this ?

At first glance, it looks good... Maybe it would be quicker right now to do a test with renault-api testing those enpodint.

d4icon avatar Oct 14 '24 14:10 d4icon

So quick update, I have tried to modify renault-api locally to test 2 things. But at this point , all my attempts are unsuccessful ..

1 - Adding

  "XCB1SE": {  # SCENIC E-TECH
        "control-charge-via-kcm": True
    },

in models.py => Still 403

2- Changing endpoint to point to

/commerce/v1/accounts/{id}/kamereon/kcm/v1/vehicles/{vin}/charge/start

int renault_vehicle.py => Still 403

I will continue to investigate, but maybe there is something else that need to be done to get the access rights ?

remo-tech avatar Oct 17 '24 07:10 remo-tech

Soo, I think I found the solution looking at the Android app logs : When I click the button "Start Charge" on the app, there is no specific request for this, but there is a request that change the charging schedule. It just set all programActivationStatus to false if they are True .

The request seems to wake up the vehicule, than if it is plugged in , it will start charge. I think that there is no way to stop a charge at this point.

Here is an exemple that will work for on my Scenic E-TECH to wake it up, and start charging.

renault-api --log http  post-file "/commerce/v1/accounts/{account_id}/kamereon/kcm/v1/vehicles/{vin}/ev/settings?country=FR" .\settings_request.json

settings_request.json :

{
	"lastSettingsUpdateTimestamp": "2024-10-17T11:27:42.928046Z",
	"chargeModeRq": "SCHEDULED",
	"chargeTimeStart": "09:00",
	"chargeDuration": 600,
	"preconditioningTemperature": 21.0,
	"preconditioningHeatedStrgWheel": false,
	"preconditioningHeatedRightSeat": false,
	"preconditioningHeatedLeftSeat": false,
	"programs": [
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "11:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		},
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "13:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		},
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "15:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		}
	]
}

The thing is if we want to integrate this, the request need to first GET the settings, then POST the modified result to ensure no setting is lost (that is what is done on the MyRenault)

I could try to integrate this into renault-api for the scenic only, but I am not sure what is the best way ? With a specific setting for the Scenic ? A totally different command ?

@epenet , any preferences ?

remo-tech avatar Oct 17 '24 12:10 remo-tech

Soo, I think I found the solution looking at the Android app logs : When I click the button "Start Charge" on the app, there is no specific request for this, but there is a request that change the charging schedule. It just set all programActivationStatus to false if they are True .

The request seems to wake up the vehicule, than if it is plugged in , it will start charge. I think that there is no way to stop a charge at this point.

Here is an exemple that will work for on my Scenic E-TECH to wake it up, and start charging.

renault-api --log http  post-file "/commerce/v1/accounts/{account_id}/kamereon/kcm/v1/vehicles/{vin}/ev/settings?country=FR" .\settings_request.json

settings_request.json :

{
	"lastSettingsUpdateTimestamp": "2024-10-17T11:27:42.928046Z",
	"chargeModeRq": "SCHEDULED",
	"chargeTimeStart": "09:00",
	"chargeDuration": 600,
	"preconditioningTemperature": 21.0,
	"preconditioningHeatedStrgWheel": false,
	"preconditioningHeatedRightSeat": false,
	"preconditioningHeatedLeftSeat": false,
	"programs": [
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "11:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		},
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "13:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		},
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "15:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		}
	]
}

The thing is if we want to integrate this, the request need to first GET the settings, then POST the modified result to ensure no setting is lost (that is what is done on the MyRenault)

I could try to integrate this into renault-api for the scenic only, but I am not sure what is the best way ? With a specific setting for the Scenic ? A totally different command ?

@epenet , any preferences ?

Interesting, Thanks @remo-tech

On the other hand .... I understand that when you press the ‘load button’ in the application, in case you have ‘timetable schedules’ you are warned that all of them will be deleted. Can it be related to what you say?

On the other hand... You say you can't stop the upload? There is a button for that... no? It works for me in the mobile app.

d4icon avatar Oct 17 '24 13:10 d4icon

On the other hand .... I understand that when you press the ‘load button’ in the application, in case you have ‘timetable schedules’ you are warned that all of them will be deleted. Can it be related to what you say?

You mean the button to start the Charge ? Yes it disables all schedules (they are not deleted , just disabled)

On the other hand... You say you can't stop the upload? There is a button for that... no? It works for me in the mobile app.

If you mean stop de charging process, I personally don't have any button to do so on the MyRenault app for the Scenic. There is button to start, but if the vehicule is currently charging, there is no button to stop it....

remo-tech avatar Oct 17 '24 13:10 remo-tech

On the other hand .... I understand that when you press the ‘load button’ in the application, in case you have ‘timetable schedules’ you are warned that all of them will be deleted. Can it be related to what you say?

You mean the button to start the Charge ? Yes it disables all schedules (they are not deleted , just disabled)

On the other hand... You say you can't stop the upload? There is a button for that... no? It works for me in the mobile app.

If you mean stop de charging process, I personally don't have any button to do so on the MyRenault app for the Scenic. There is button to start, but if the vehicule is currently charging, there is no button to stop it....

oops... really? are you on the latest version (with the skin change) of the application?

I think that's why In the previous one it was there, button to load and button to stop.

d4icon avatar Oct 17 '24 13:10 d4icon

oops... really? are you on the latest version (with the skin change) of the application?

I think that's why In the previous one it was there, button to load and button to stop.

Yes latest version. The previous version had a toggle I think, but I am not sure it was really working ...

remo-tech avatar Oct 17 '24 13:10 remo-tech

oops... really? are you on the latest version (with the skin change) of the application? I think that's why In the previous one it was there, button to load and button to stop.

Yes latest version. The previous version had a toggle I think, but I am not sure it was really working ...

Yes, it was a switch. But yes, I can confirm that it worked for me.

d4icon avatar Oct 17 '24 13:10 d4icon

@remo-tech any news?

d4icon avatar Nov 19 '24 19:11 d4icon

Not really. I have managed to make a quick & dirty python script that just send the settings_request I mentioned earlier to restart the charge when needed. But I did not had the time to update the renault-api for this

remo-tech avatar Nov 20 '24 09:11 remo-tech

Hi ! Could you share your quick and dirty script? I'd really like to automate the charge restart after failure, and would gladly use any script in the meantime.

xontik avatar Nov 20 '24 23:11 xontik

Hi ! Could you share your quick and dirty script? I'd really like to automate the charge restart after failure, and would gladly use any script in the meantime.

Here it is : https://gist.github.com/remo-tech/e9ffa42ddb19b94b21687ffd766dd910 Note : I have a Wallbox charger, so the script check the status of the wallbox to restart the charge only when needed. Look at the method RestartCharge. Warning : The settings_request.json will clear all your charging schedules. If you want to keep them you will have to get the current one and resend them (that is what is blocking me for make the change in the renault-api ) (Please continue the discussion of the script on the gist if needed as it is a bit off topic)

remo-tech avatar Nov 21 '24 10:11 remo-tech

Try this post: /commerce/v1/accounts/{account_id}/kamereon/kcm/v1/vehicles/{vin}/charge/pause-resume

payload:

{
    "data": {
        "type": "ChargePauseResume",
        "attributes": {
            "action": "pause"
        }
    }
}

action must be "paused" or "resume", but I always get response "REJECTED"; other values for Action result in "Body has at least one wrongly formatted value,undefined", but if you specify "start" or "stop" you get :

Action must be either 'pause' or 'resume' but was 'start'

My terribly experimental/alpha/buggish page for testing: https://jumpjack.github.io/myRenaultLC/

(please use a temporary password)

jumpjack avatar Nov 27 '24 18:11 jumpjack

-Do you know if there could be any kind of blocking of the account if they detect something?

There is a quota limit: if you send too many requests in a while, you get blocked for a while.

jumpjack avatar Nov 27 '24 18:11 jumpjack

Time ago this GET worked:

charge-history?start=20220101&end=20220322&type=day

Now I get :-) :

{
    "message": "you should not be there but well done for the effort"
}

jumpjack avatar Nov 27 '24 18:11 jumpjack

Any luck with charge history?

with endpoint "charges" i get "Not Found: There is no rows charge history for the vin", with "charrge-history" I get "you should not be there but well done for the effort", so what did they change? The original android app keeps working normally.

jumpjack avatar Dec 11 '24 14:12 jumpjack

Hello, any update on stop charge fixing issue? The dependany will release bug fix? i can't stop charge on my renault twingo ZE, i receive error Body has at least one wrongly formatted value. Thanks

dompal76 avatar Feb 17 '25 10:02 dompal76

In my R5 the same issue exist. How to start charging when al planned schedules are already disabled or if there is no plan at all?

enboer avatar Apr 06 '25 16:04 enboer

I do not have a program as I use EVCC to decide, but sometimes the car needs to wakeup. So did anyone test if just sending the first section (not the complete program) is enough to trigger the car to charge? or maybe getting the battery status wakes up the car?

{ "lastSettingsUpdateTimestamp": "2024-10-17T11:27:42.928046Z", "chargeModeRq": "SCHEDULED", "chargeTimeStart": "09:00", "chargeDuration": 600, "preconditioningTemperature": 21.0, "preconditioningHeatedStrgWheel": false, "preconditioningHeatedRightSeat": false, "preconditioningHeatedLeftSeat": false, "programs": [ ] }

enboer avatar Apr 08 '25 11:04 enboer

Soo, I think I found the solution looking at the Android app logs : When I click the button "Start Charge" on the app, there is no specific request for this, but there is a request that change the charging schedule. It just set all programActivationStatus to false if they are True .

The request seems to wake up the vehicule, than if it is plugged in , it will start charge. I think that there is no way to stop a charge at this point.

Here is an exemple that will work for on my Scenic E-TECH to wake it up, and start charging.

renault-api --log http  post-file "/commerce/v1/accounts/{account_id}/kamereon/kcm/v1/vehicles/{vin}/ev/settings?country=FR" .\settings_request.json

settings_request.json :

{
	"lastSettingsUpdateTimestamp": "2024-10-17T11:27:42.928046Z",
	"chargeModeRq": "SCHEDULED",
	"chargeTimeStart": "09:00",
	"chargeDuration": 600,
	"preconditioningTemperature": 21.0,
	"preconditioningHeatedStrgWheel": false,
	"preconditioningHeatedRightSeat": false,
	"preconditioningHeatedLeftSeat": false,
	"programs": [
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "11:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		},
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "13:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		},
		{
			"programActivationStatus": false,
			"programType": "CHARGE",
			"programDepartureTime": "15:00",
			"programActivationMonday": true,
			"programActivationTuesday": true,
			"programActivationWednesday": true,
			"programActivationThursday": true,
			"programActivationFriday": true,
			"programActivationSaturday": true,
			"programActivationSunday": true
		}
	]
}

The thing is if we want to integrate this, the request need to first GET the settings, then POST the modified result to ensure no setting is lost (that is what is done on the MyRenault)

I could try to integrate this into renault-api for the scenic only, but I am not sure what is the best way ? With a specific setting for the Scenic ? A totally different command ?

@epenet , any preferences ?

I used this script as well. But a question I have on this is does to matter what data is send (so the content of the settings_request.json file) to wake up the car? If I send the data what is in this post, I do not see it in the Renault App. The POST call is successful howver. I need to change the lastSettingsUpdateTimestamp data to be more recent (or at least different then what I get from the GET call). Having this data not in the app is fine for me, but what I want to accomplish with this call is to wake up the car. So do you know this, not having the data in the Renault app, but car is waking up? I am using EVCC for charging the car, and this sometimes needs the wakeup, which currently gives the forbidden message.

enboer avatar Apr 14 '25 07:04 enboer

really interesting, but is it possible to fix also the issue for STOP charging for Twingo ZE? Thanks

Il giorno lun 14 apr 2025 alle ore 09:16 enboer @.***> ha scritto:

Soo, I think I found the solution looking at the Android app logs : When I click the button "Start Charge" on the app, there is no specific request for this, but there is a request that change the charging schedule. It just set all programActivationStatus to false if they are True .

The request seems to wake up the vehicule, than if it is plugged in , it will start charge. I think that there is no way to stop a charge at this point.

Here is an exemple that will work for on my Scenic E-TECH to wake it up, and start charging.

renault-api --log http post-file "/commerce/v1/accounts/{account_id}/kamereon/kcm/v1/vehicles/{vin}/ev/settings?country=FR" .\settings_request.json

settings_request.json :

{ "lastSettingsUpdateTimestamp": "2024-10-17T11:27:42.928046Z", "chargeModeRq": "SCHEDULED", "chargeTimeStart": "09:00", "chargeDuration": 600, "preconditioningTemperature": 21.0, "preconditioningHeatedStrgWheel": false, "preconditioningHeatedRightSeat": false, "preconditioningHeatedLeftSeat": false, "programs": [ { "programActivationStatus": false, "programType": "CHARGE", "programDepartureTime": "11:00", "programActivationMonday": true, "programActivationTuesday": true, "programActivationWednesday": true, "programActivationThursday": true, "programActivationFriday": true, "programActivationSaturday": true, "programActivationSunday": true }, { "programActivationStatus": false, "programType": "CHARGE", "programDepartureTime": "13:00", "programActivationMonday": true, "programActivationTuesday": true, "programActivationWednesday": true, "programActivationThursday": true, "programActivationFriday": true, "programActivationSaturday": true, "programActivationSunday": true }, { "programActivationStatus": false, "programType": "CHARGE", "programDepartureTime": "15:00", "programActivationMonday": true, "programActivationTuesday": true, "programActivationWednesday": true, "programActivationThursday": true, "programActivationFriday": true, "programActivationSaturday": true, "programActivationSunday": true } ] }

The thing is if we want to integrate this, the request need to first GET the settings, then POST the modified result to ensure no setting is lost (that is what is done on the MyRenault)

I could try to integrate this into renault-api for the scenic only, but I am not sure what is the best way ? With a specific setting for the Scenic ? A totally different command ?

@epenet https://github.com/epenet , any preferences ?

I used this script as well. But a question I have on this is does to matter what data is send (so the content of the settings_request.json file) to wake up the car? If I send the data what is in this post, I do not see it in the Renault App. The POST call is successful howver. I need to change the lastSettingsUpdateTimestamp data to be more recent (or at least different then what I get from the GET call). Having this data not in the app is fine for me, but what I want to accomplish with this call is to wake up the car. So do you know this, not having the data in the Renault app, but car is waking up? I am using EVCC for charging the car, and this sometimes needs the wakeup, which currently gives the forbidden message.

— Reply to this email directly, view it on GitHub https://github.com/hacf-fr/renault-api/issues/1348#issuecomment-2800696030, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNMP4JS6SBRNW4BLZYZ5Z432ZNOGTAVCNFSM6AAAAABPXBFKEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBQGY4TMMBTGA . You are receiving this because you commented.Message ID: @.***> enboer left a comment (hacf-fr/renault-api#1348) https://github.com/hacf-fr/renault-api/issues/1348#issuecomment-2800696030

Soo, I think I found the solution looking at the Android app logs : When I click the button "Start Charge" on the app, there is no specific request for this, but there is a request that change the charging schedule. It just set all programActivationStatus to false if they are True .

The request seems to wake up the vehicule, than if it is plugged in , it will start charge. I think that there is no way to stop a charge at this point.

Here is an exemple that will work for on my Scenic E-TECH to wake it up, and start charging.

renault-api --log http post-file "/commerce/v1/accounts/{account_id}/kamereon/kcm/v1/vehicles/{vin}/ev/settings?country=FR" .\settings_request.json

settings_request.json :

{ "lastSettingsUpdateTimestamp": "2024-10-17T11:27:42.928046Z", "chargeModeRq": "SCHEDULED", "chargeTimeStart": "09:00", "chargeDuration": 600, "preconditioningTemperature": 21.0, "preconditioningHeatedStrgWheel": false, "preconditioningHeatedRightSeat": false, "preconditioningHeatedLeftSeat": false, "programs": [ { "programActivationStatus": false, "programType": "CHARGE", "programDepartureTime": "11:00", "programActivationMonday": true, "programActivationTuesday": true, "programActivationWednesday": true, "programActivationThursday": true, "programActivationFriday": true, "programActivationSaturday": true, "programActivationSunday": true }, { "programActivationStatus": false, "programType": "CHARGE", "programDepartureTime": "13:00", "programActivationMonday": true, "programActivationTuesday": true, "programActivationWednesday": true, "programActivationThursday": true, "programActivationFriday": true, "programActivationSaturday": true, "programActivationSunday": true }, { "programActivationStatus": false, "programType": "CHARGE", "programDepartureTime": "15:00", "programActivationMonday": true, "programActivationTuesday": true, "programActivationWednesday": true, "programActivationThursday": true, "programActivationFriday": true, "programActivationSaturday": true, "programActivationSunday": true } ] }

The thing is if we want to integrate this, the request need to first GET the settings, then POST the modified result to ensure no setting is lost (that is what is done on the MyRenault)

I could try to integrate this into renault-api for the scenic only, but I am not sure what is the best way ? With a specific setting for the Scenic ? A totally different command ?

@epenet https://github.com/epenet , any preferences ?

I used this script as well. But a question I have on this is does to matter what data is send (so the content of the settings_request.json file) to wake up the car? If I send the data what is in this post, I do not see it in the Renault App. The POST call is successful howver. I need to change the lastSettingsUpdateTimestamp data to be more recent (or at least different then what I get from the GET call). Having this data not in the app is fine for me, but what I want to accomplish with this call is to wake up the car. So do you know this, not having the data in the Renault app, but car is waking up? I am using EVCC for charging the car, and this sometimes needs the wakeup, which currently gives the forbidden message.

— Reply to this email directly, view it on GitHub https://github.com/hacf-fr/renault-api/issues/1348#issuecomment-2800696030, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNMP4JS6SBRNW4BLZYZ5Z432ZNOGTAVCNFSM6AAAAABPXBFKEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBQGY4TMMBTGA . You are receiving this because you commented.Message ID: @.***>

dompal76 avatar Apr 14 '25 08:04 dompal76

I used this script as well. But a question I have on this is does to matter what data is send (so the content of the settings_request.json file) to wake up the car? If I send the data what is in this post, I do not see it in the Renault App. The POST call is successful howver. I need to change the lastSettingsUpdateTimestamp data to be more recent (or at least different then what I get from the GET call). Having this data not in the app is fine for me, but what I want to accomplish with this call is to wake up the car. So do you know this, not having the data in the Renault app, but car is waking up? I am using EVCC for charging the car, and this sometimes needs the wakeup, which currently gives the forbidden message.

I think I already have a successful wake up, without the app being up to date. Howerver, I have also noticed that sometimes the POST is successful and there was no wake up.

But please note : with the last update of the Scenic, there is no more need to wake up the car to start the charge. If the charger is ready to provide energy, and there is no program defined , the car will start and stop charging automatically. Since it works now, I do not need to use this script anymore (and I have no way to try it, as the car will start charging by itslef)

remo-tech avatar Apr 14 '25 09:04 remo-tech

If someone is able to build a reliable payload for "stop charge" and "start charge" then I will happily merge.

I think at one point we tried to make a "get current charge settings as JSON + update JSON + push new charge settings" process but since my Zoe is not reliable I gave up.

If someone wants to build that process again I'm all for it...

epenet avatar Apr 14 '25 09:04 epenet

I used this script as well. But a question I have on this is does to matter what data is send (so the content of the settings_request.json file) to wake up the car? If I send the data what is in this post, I do not see it in the Renault App. The POST call is successful howver. I need to change the lastSettingsUpdateTimestamp data to be more recent (or at least different then what I get from the GET call). Having this data not in the app is fine for me, but what I want to accomplish with this call is to wake up the car. So do you know this, not having the data in the Renault app, but car is waking up? I am using EVCC for charging the car, and this sometimes needs the wakeup, which currently gives the forbidden message.

I think I already have a successful wake up, without the app being up to date. Howerver, I have also noticed that sometimes the POST is successful and there was no wake up.

But please note : with the last update of the Scenic, there is no more need to wake up the car to start the charge. If the charger is ready to provide energy, and there is no program defined , the car will start and stop charging automatically. Since it works now, I do not need to use this script anymore (and I have no way to try it, as the car will start charging by itslef)

Thanks, in you search for a solution did you find that if you would GET the current settings and write them back (all programActivationStatus to FALSE) would make the car to wakeup?

enboer avatar Apr 14 '25 14:04 enboer