Tesla Wall Connector Gen 3 via ESPHome + RS485 (dynamic current control, no WiFi)

Hi everyone,

I wanted to share a small project I’ve been working on for controlling a Tesla Wall Connector Gen 3 via ESPHome over RS485, without relying on WiFi.

The idea is to emulate the Neurio energy meter and dynamically control the charging current based on external data, for example Home Assistant sensors, solar production, grid load, etc.

So far, this supports:

  • Dynamic current limiting of the Wall Connector
  • RS485 communication using ESP32 (I’m using LILYGO T-CAN485)
  • No dependency on the Wall Connector’s WiFi
  • Integration with Home Assistant via ESPHome
  • Phase configuration (1, 2, or 3 phase depending on installation and country setup)

Repo and config examples:

I haven’t been able to test every setup myself, so feedback and contributions are very welcome.
If anyone else is running a Gen 3 Wall Connector and wants to try this, I’d love to hear your results, setups, and any issues you run into.

If you have questions, suggestions, or improvements, feel free to comment or open issues on GitHub.

Hello!

Thanks for sharing! That’s very helpful and interesting.

One thing is missing from my point of view, it would be nice to control multiple WC by adjusting the current available.

That would be a global load balancing + a power sharing feature.

For instance, 60A are the main fuse limit, 40A are used by the home, it would be useful to load balance the 20A to each WC if charging, by tweaking the neurio current each WC will see. So, each WC will have 10A.

Calculation will be something like

WC current = Free current/2 so 20/2 =10 A

So the current seen by the WC would be

Limit Current (set in Tesla app) - Free current/2
60A - 10A = 50 A, so it will deliver 10A to the car.

Could be adapted for more WC of course :slight_smile:

Could also probably be done in HA with helpers, and conditioning if charging or if idle, but in the sketch it would be easier

Hello, I need to switch from a single phase to a 3 phase wall box and the Tesla Wall Connector 3 was a candidate. However, I am unable to find the officially supported power meter.

Since I’m already invested in Home Assistant, and I have a shelly sensor for all three phases, I guess this is the solution I need. Has anybody already used it successfully?

You can use any power meter as long as it provides sensors that report current in amps in Home Assistant. In my case, I use an ESP device connected to the P1/HAN port on my electricity meter provided by the utility company.

Thanks for the suggestion, @Keryan. I believe this can be set up quite easily in Home Assistant and the sensors can then be exposed to the controller. That said, if you would like to work on it, let me know and I can invite you to the GitHub project so you can develop the feature.

What I don’t fully understand is why you require the current and not the power.

My house meter is limited by total power, not by the highest current on any of the three phase.
The limit is 10kW, but it doesn’t mean that each phase is limited to 3.3kW; I could be drawing 8kW on L1, 1kW on L2 and 1kW on L3 and be ok, but can’t draw 4kW on L1, 4kW on L2 and 3kW on L3

Does it make sense?

Yes, that makes sense.

The reason I use current (amps) instead of power is mainly because the Tesla Wall Connector protocol itself works with amps. The value we send to the charger is simply the allowed charging current.

If your installation limit is defined in power (kW) instead, you can easily convert that to current in Home Assistant.

For a 3-phase system the formula is:

I = P / (√3 × V)

Where:

P = power (W)
V = line voltage (400 V in a standard 230/400 V EU system)
I = current (A)

Example with a 10 kW limit:

I = 10000 / (1.732 × 400)
I ≈ 14.4 A

So roughly 14–15 A available per phase.

You could create a simple Home Assistant template sensor to convert power to current, for example:

template:
  - sensor:
      - name: "Available current"
        unit_of_measurement: "A"
        state: >
          {{ (states('sensor.available_power_w') | float / (1.732 * 400)) | round(1) }}

You can then expose that sensor to the controller.

Also just to clarify: the controller does not prevent drawing higher load on multiple phases. It only limits charging if one individual phase approaches its configured limit. So something like:

  • 4 kW on L1
  • 4 kW on L2
  • 4 kW on L3

would still work fine as long as none of the phases exceeds its limit.

I don’t think that would work in my case, but given I can modify the code, I can probably find a solution.

For example my meter has a 10kW limit (if I exceed it for enough time, it will disconnect and require manual re-arming).

Let’s assume I’m drawing 3kW on L1, 1 kW on L2 and 0kW on L3. (this is without the car charging, just household loads)

That’s a total of 4kW, so I have 6kW remaining for charging; that’s about 8.7A per phase, so the Tesla Wall connector should be limited to 8A.
The final result would be 5kW on L1, 3kW on L2 and 2kW on L3.

With the current logic, if I understand it correctly, it would see that L1 is already at full capacity and not start the charge.

That makes sense, and if your setup is based on a total power contract limit, then your approach is reasonable.

Feel free to modify the code and adapt the logic for your case. If you come up with a clean solution, a PR is of course very welcome.

Just keep in mind one limitation of the Tesla Wall Connector: it cannot set different current per phase. It always applies the same current on all phases. So even if you calculate available power based on total consumption, the final limit still has to work for the most loaded phase.

So depending on the load distribution (for example L1 already being higher than the others), that phase will still end up determining the safe charging current.