DIY smart grid: EV (Tesla) charging on excess solar power production

I’ve used something similar in an automation for my pool heater. I created a buffer overrun value that stops the automation shutting it down until the buffer is exhausted. As a high draw item (3kW) it doesn’t make sense to keep shutting it off when importing just 0.5kW.

The problem I see here with the car automation, is the charge rate is flexible. So what rate would you want it to charge when your solar is at max compared to when it’s not?

3kW solar - Charge at 3kW
1kW solar - Charge at 3kW?
0kW solar - Turn off?

Or are you thinking more like charging at whatever the solar generation is + (x)kW?

If the first, it would be much simpler to create a new automation that just turns your charger on and off when you have solar generation as no adjustment of charge rate is needed.

Let me try to clarify. my solar installation provides 4kw max (to be upgraded later). My car charger charges minimum 4kw @ 5A ( 3phase 400V+N).
Therefore If I stop charging when all solar is used up I won’t be able charge at all since my house also uses some power. On the other hand, charging with some solar during peak time is still more beneficial then charging without solar during off-peak. However, we (in belgium/flanders) have a capacity tarif, meaning you are charged more when you grab lots of electricity from the grid over a prolonged amount of time. Hence, I don’t want to charge my car when my house needs over xkw.
So my logic is essentially.
If solar can’t meet minimum charge rate, then keep charging unless grid draw is over 4kw (for x min).

Are you sure? It’s the car that can adjust the charge rate (The charger is actually in the car, the thing attached to your house is just a glorified outlet).

Although the app will only let you select down to 5A, the API allows you to go all the way down to 1A.

Do keep in mind: not all external chargers / charge connectors allow for a setting <5A. I believe it was a new worldwide standardization requirement somewhere from 2020/2021 and up (it is discussed somewhere in this thread). For those charge connectors I’m not sure wether setting <5A through the API returns an error or just returns a setting of 5 amps.

I might be mistaken, but “4kw @ 5A ( 3phase 400V+N)” doesn’t seem quite correct. Although power differential between 2 phases is 400V, the car charger draws 230V per each phase. So that would equate to a 23035=3,45kW minimal power draw.

If I understand your case correctly, you both have a small solar array (which possibly might not even reach the minimum charging treshold of 3450 Watts(?)) and you want to avoid a 4kW power draw for a prolonged period. The simple way to go about this is to offset the grid draw calculations 0-point from 0 watts to -4kw. All should then function exactly the same.

Heads up.

This whole fun will end without a paid for service.

The Tesla Fleet API is now rate limited.

Where is this news from?

I can validate it is definitely rate limited - I get a 429 error and header provides a retry timer (24 hrs later).

Such a shame as I only just finished the automation for charging based on solar tracking today! I’m now forced to lengthen my polling interval.

I’m unsure what the rate limits are because this article doesn’t match up with what I’ve counted in terms of the charging commands I sent. I estimate that I got capped at around 25-30 charging API requests. Unless charging amps count as “command limits”?

Have you tried using the old API. I haven’t seen any rate limits (yet) but my car still works with the old API. In fact I couldn’t actually get it working with the Fleet API…

Thinking about it now, maybe it didn’t work as it was rate limited. That’d make sense.

MCU1 cars all of a sudden better than MCU2 :rofl: (yeh ok, not really).

No, I’m on the new Model 3 Highland and it only takes Fleet API apparently.

Same here.

Was wondering why the automation controlled the amps down but then couldn’t control anything at all…

Very frustrating.

Will give up on it and get an OCPP charger instead. Only $800AUD…

This may be the answer…

teslamotors/fleet-telemetry (

I am not too familiar with it: does the OCPP protocol support imposing the amp setting from the external charger to the car?

Good morning everyone, I just picked up a 2024 Model Y and I want to control the charging amperage via Home Assistant. Due to the language barrier (I am Italian), I am not sure if this is still possible, if I need to install and configure tesla_http_proxy, or if it is currently not possible at all. In the next few days, they will install the Gen 3 Wall Connector for me, is it possible to do it from that?

I got my 2024 Model Y two weeks ago, there was no need to setup a proxy. I just installed GitHub - alandtse/tesla: Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login. , got a token with the Chrome app (if I remember correctly) and it worked out of the box