node-red-contrib-tesla icon indicating copy to clipboard operation
node-red-contrib-tesla copied to clipboard

How can i set the charge Limit? (beginner question)

Open nickeeey opened this issue 3 years ago • 6 comments

Hi, i got simple tasks working with boolean (0/1) but how can i do a setchargelimit or sth else. Which Value do the Api need? Can someone post any example? for example i want to set charge limit to 16A when i press button x that is my solution: (see photo), but how do i define it right? image

nickeeey avatar Dec 03 '21 21:12 nickeeey

The set chargelimit option is not for setting the max. charging amps. The setCharging limit is to set a maximum state of charge for the battery in %. So if you set it to 80, the car will charge to 80%. There is another function to set the maximum charging amps, (called setChargingAmps) but currently that function is not working.

onokje avatar Dec 04 '21 10:12 onokje

In the mean time setting maximum charging amps works. You need the most recent version of node-red-contrib-tesla and you need a way to configure the new authentication method with the refresh token. Once you have done this, the following flow works for me:

[{"id":"6d1577b73768837c","type":"inject","z":"4e139d26.c717a4","name":"Charge Amps","props":[{"p":"commandArgs.amt","v":"8","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":2220,"wires":[["5edb4b8f0e8f20e7"]]},{"id":"5edb4b8f0e8f20e7","type":"tesla-api","z":"4e139d26.c717a4","teslaConfig":"cca88314.8bcf68","command":"setChargingAmps","name":"","vehicleID":"780291468967186","autoWakeUp":true,"x":320,"y":2220,"wires":[["a6c93a1d65a24ee9"]]},{"id":"a6c93a1d65a24ee9","type":"debug","z":"4e139d26.c717a4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":490,"y":2220,"wires":[]},{"id":"cca88314.8bcf68","type":"tesla-config","email":"[email protected]"}]

Urs-Eppenberger avatar Jan 03 '22 11:01 Urs-Eppenberger

In the mean time setting maximum charging amps works. You need the most recent version of node-red-contrib-tesla and you need a way to configure the new authentication method with the refresh token. Once you have done this, the following flow works for me:

[{"id":"6d1577b73768837c","type":"inject","z":"4e139d26.c717a4","name":"Charge Amps","props":[{"p":"commandArgs.amt","v":"8","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":130,"y":2220,"wires":[["5edb4b8f0e8f20e7"]]},{"id":"5edb4b8f0e8f20e7","type":"tesla-api","z":"4e139d26.c717a4","teslaConfig":"cca88314.8bcf68","command":"setChargingAmps","name":"","vehicleID":"780291468967186","autoWakeUp":true,"x":320,"y":2220,"wires":[["a6c93a1d65a24ee9"]]},{"id":"a6c93a1d65a24ee9","type":"debug","z":"4e139d26.c717a4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":490,"y":2220,"wires":[]},{"id":"cca88314.8bcf68","type":"tesla-config","email":"[email protected]"}]

I notice that if I change the Amps, for example to 8A (or 5A or 12A), the firts time, my Model 3 sets the charging from 16A to 5A, and the second time I send the command, sets the charging to 0A!!! :(

Someone has the same issue??

marcospg75 avatar Jan 24 '22 09:01 marcospg75

commandArgs.amt is incorrect, and/or has changed recently. use commandArgs.amps.

I had the same problem, working perfectly now.

demod-au avatar Feb 11 '22 00:02 demod-au

I get a 404 for trying to set the charge amps. Other functions working fine. That's using the commandArgs.amps=10

frownbreaker avatar Apr 10 '22 00:04 frownbreaker

@marcospg75 i have something simmilar and it drives me nuts, i start with max charging in app then i set the charging amps to 2A and i can see in the app it changes to 5A then i run again and set it to 2A and it's set correct, why i don't know

donnib avatar May 04 '22 20:05 donnib