External integration - Tesla Wall Connector

Hi everyone! :waving_hand:

As promised in the Tesla thread: the Tesla Wall Connector gen 3 now has its own integration, 100% local, without an account or subscription :electric_plug:

What it does

  • :magnifying_glass_tilted_left: Automatic search: the charger does not advertise itself on the network, so the integration searches for it with a Search for chargers button (on your local network only). Entering the IP address is still possible.
  • :electric_plug: The status of the connector and charging (available, vehicle connected, charging…) and a clear status.
  • :high_voltage: Charging power, session energy, voltage, current, and handle temperature.
  • :bar_chart: Total energy delivered, connected to Gladys’ energy tracking, like a sub-meter of your main meter.
  • :puzzle_piece: A « Tesla Charger Â» widget.
  • :clapper_board: Four scene triggers: vehicle connected, disconnected, charging started, charging completed (with session energy).

The cool part

Charging completed → « The car is ready :automobile: Â» on the phone
Vehicle connected during peak hours → small notification to remember to schedule charging :alarm_clock:

Installation

:warning: Gladys 5.1 minimum.

:light_bulb: It will be available in the store later today. In a hurry? Integrations → Install from GitHub, with the address GitHub - guim31/gladys-tesla-wall-connector: Tesla Wall Connector gen 3, read locally without any account, for Gladys Assistant · GitHub

  1. In the configuration, specify your network range if needed (e.g., 192.168.1.0/24), then click Search for chargers. Or enter the charger’s IP address directly (remember to set it in your box).
  2. Discovery tab: add your charger.

Honest caveats: the charger is read-only (its local API does not allow controlling the charging), and in the consumption widget, do not check both your main meter and the charger at the same time if you want an accurate total.

Regarding cars and Powerwall, the old Tesla integration is now called Teslemetry, as suggested by @pierre-gilles, since it’s the service it uses.

:warning: Developed without the hardware: @mutmut is our first tester, your feedback is welcome!

Like the previous ones, it is developed with Claude Code :robot:. Independent project, not affiliated with Tesla.

Repository: GitHub - guim31/gladys-tesla-wall-connector: Tesla Wall Connector gen 3, read locally without any account, for Gladys Assistant · GitHub

Thanks @guim31!

I started from scratch: deleted the old Tesla and installed this integration so I can test the auto scan.

For info, I’m on single-phase, so I can’t test three-phase.

My first remarks:

  • change to yellow instead of green when the search doesn’t work:
  • retrieve Gladys’ IP to launch the scan on the correct IP range when nothing is entered in the config, as I don’t have this network class at all at my place :wink:
  • when the correct IP range is entered, autodiscovery works fine:
    image

I think the search range is a good idea if Gladys and the charger are on different ranges, but it’s a bit technical for newbies (who probably won’t put the charger on a different range).

Quick question: when uninstalling the first Tesla, I got this on my dashboard. Is it normal that this widget wasn’t removed automatically?

First tests

  • empty charger (no car plugged in):


    Instead of This session, I would put Last session as there’s no charging in progress.

  • Tesla plugged in but charger not yet in its charging range:


    This session makes more sense here.

  • Tesla plugged in and charger in its charging range:
    image

  • start of charging:


    The duration is weird as I just started it, so less than a minute
    Power is ok on the 3 devices: Tesla widget, Tesla app, Legrand ecocompteur widget (via a clamp, so slightly different):

When switching to decimal numbers for Total, the units are missing:


Is it possible to reorganize the tiles?
What’s important is the instantaneous power, and the amperage, which I would put on line 1; on line 2 the session and the total.

I haven’t tested with my second vehicle, which is a plug-in hybrid, but in HA (I think) I had different statuses if it was a plugged-in Tesla or a non-Tesla. Do you think you can retrieve these states and display which vehicle is plugged in (Tesla or other)? Well after research, it seems I was hallucinating :frowning:

Anyway, it works well and we also have the 30 min consumption and 30 min cost :slight_smile:

However, for the session duration, I have the impression that it counts from the moment I plugged in the car and not the charging session itself.
Indeed, we see 37mn (and not min) while the charge lasted less than 5 minutes.

@mutmut huge thanks for this test, it’s exactly what was needed :folded_hands: Your report of the states in HA, with the annotations, is worth its weight in gold!

The 1.1.0 is out with all this. Gladys will offer it as an update as soon as the store has seen it, within a few hours.

:magnifying_glass_tilted_right: The search

  • Gladys’ network is found on its own. You’re right, setting 192.168.1.0/24 by default was a bad idea. The integration runs in an isolated container that doesn’t see the home network. It now asks Gladys to do a small SSDP search, and the devices that respond (box, TV…) give the network. The message indicates « Gladys’ network: x.y.z.0/24 Â».
  • The search range goes to the « advanced Â» option, in case the station is on another network. You can empty the field to test.
  • Nothing found = red. Gladys only has two colors for the result of an action, green or red, no yellow. Since it’s a real failure, it’s red.

:bar_chart: The widget

  • Power + Current on the first line, Session + Total below.
  • « Last session Â» when no vehicle is plugged in, « This session Â» otherwise.
  • The total is rounded to keep its unit (in MWh beyond 1,000 kWh).
  • The duration: well spotted, the station counts from the connection, not from the start of the charge. The widget now displays both: « Connected since Â» and « Charging duration Â». The charging duration is followed by the integration and starts from zero when unplugged.

:automobile: The states

  • The 7 is no longer an error. With a car plugged in outside the charging schedule, it’s a perfectly normal state. It was displayed in red and the station went « faulty Â», which could have triggered scenes for nothing :sweat_smile: It now displays « Connected, outside charging range Â», and « vehicle connected Â» is triggered properly. We only talk about an error if the station reports a real alert.
  • States 12, 13 and 21 are known. And in the end, you weren’t hallucinating: with your hybrid, the station goes through 12, 10 and 13, while your Tesla goes through 4, 9, 11 and 21. I display it with caution (« probably not Tesla Â»), because it’s taken from a single test. If you plug in the hybrid again, let me know if it’s confirmed.
  • « Charge completed Â» also triggers when the charge stops while the car remains plugged in. It no longer triggers without a charge before.

:red_question_mark: Your question about the widget « This integration is no longer installed Â»

This is normal: Gladys never touches your dashboard on its own, it rather warns you. Just go to dashboard modification and delete the widget.

The three-phase still needs to be tested, so if anyone has one, I’m interested :wink:

Thanks for the update and here is my feedback.

Search: perfect! Your discovery is top-notch :slight_smile:

Widget: I’m not sure Claude understood the two boxes on two lines…


And nothing about the durations.

Status: I will test it today and tomorrow.

Regarding the history, if we keep the info, we might need to limit polling on 3 features:


It’s just that in less than 12 hours, I’m afraid it will increase a lot.

EDIT:
I have some weird things when I display all the device features, especially Charge Status

New tests:

@mutmut thanks for these two test series, as precise as usual :folded_hands: I’m glad that the search and states are good now (and you hadn’t hallucinated about the non-Tesla vehicles :wink:).

The 1.2.0 has been released with the rest. It will arrive in the store in a few hours.

:bar_chart: The widget

You were right, it wasn’t what you asked for. Gladys arranges all the tiles of a widget on the same line, which moves to the next one, hence the 3 + 1. It doesn’t allow for 2 + 2. So:

  • at the top, two tiles side by side: Power and Current, which matter in real-time;
  • right below, in lines: This session / Last session and Total, then the status, the vehicle, and the two durations.

:electric_plug: « Charging status » stuck on « Charging »

Well spotted, it was a real bug: when unplugged, the integration no longer published anything, so the old value remained displayed. It now switches to « Inactive » as soon as the vehicle is unplugged.

:file_cabinet: The history

You were right to sound the alarm. Measurements are now only recorded in case of real change:

  • voltage: ±2 V;
  • current: ±0.5 A;
  • handle temperature: ±1 °C;
  • power: ±50 W, or 2% during charging.

These are added to the return to 0, and a guard value per hour so that Gladys doesn’t think they are frozen. On a simulated day with a lot of noise, with 3 hours of charging at 32 A, this results in around 30 values per day for voltage, temperature, and power, and ~125 for current. Your 2,827 voltages in 12 hours are over :grinning_face_with_smiling_eyes: The widget, on the other hand, remains in real-time.

Bonus: the integration also speaks German and Spanish now.

Let me know if the widget suits you better like this!

Updated :slight_smile:

So the widget matches what you described:

And I’m going to be picky again, sorry :wink:

Can we have 3 tiles aligned?

  • If yes, then we add the This/Last Session
  • If no, then I would prefer to have a tile with Power and the other with This/Last Session
    Indeed, the current intensity is « redundant Â» with the power for me, to know that you have the current intensity times the voltage and you get the power, knowing that everyone (well I think) is more based on the power than the current.

For the Total, since we are on a line, I think we can leave kWh.
We could switch to MWh from 100,000 kWh (to be tested on mobile to see the rendering if we see all the digits).

@mutmut picky, but that’s how we get a perfect widget :grinning_face_with_smiling_eyes:

Version 1.3.0 is out (in the store in a few hours):

  • 3 aligned tiles: Power, Current, and This session. It fits, Gladys puts three per line as soon as the column allows it. So I keep the current, since you only wanted to sacrifice it if it didn’t fit :wink: When nothing is connected, the tile is called « Session finished »: « Last session » was too long for a third of the width and was cut off.
  • The Total remains in kWh in its line, in full: « 8,597 kWh ». It only switches to MWh from 100,000 kWh, as you suggested.

Which gives:

[ 0 W ] [ 0.3 A ] [ 0 kWh ]
Power · Current · This session
Total ……… 8,597 kWh
Status ……… Ready to charge
Vehicle ……… Connected
Connected since ……… 4 h 28 min
Charging duration ……… 0 min

Let me know if it works on your mobile!

You’re absolutely right, I’m also making @prohand suffer :sweat_smile:

Desktop result:

And mobile (iPhone 12 mini):

Widget and integration validated :white_check_mark:

Well done and thanks @guim31!
Now I can delete my MQTT virtual devices subscribed to custom topics from HA :partying_face:

Cool! If you have any other feedback, don’t hesitate :+1: