Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

EV charger control

  • Widget
  • 17 installs
  • v1.0.0
  • Nov 4, 2026
  • MIT license
  • v4.2+

Run one EV charge point from a dashboard: a ring shows the power and the battery while a car charges, a chip shows the OCPP status, and one line sums up the session in kWh, minutes and cost. Start, Stop, Unlock and Reset go out as RPC commands or as an attribute, shaped by your own payload function if needed, and a - / + control sets the current limit in amperes. Every status has its own color and icon, and the card scales to fit.

Widget Type
  • Control
Category
  • Controls
  • Cards & Info
Use Cases
  • Smart Energy
  • Smart City
  • Fleet Tracking
  • Smart Home

Who it’s for

The EV charger control widget is for operators of charging stations, parking lots and fleet depots who run charge points from a ThingsBoard dashboard. They want to see at a glance what one charge point is doing, start or stop a session for a driver, free a stuck cable, and cap the current when the site is short of power. The question they would type is “how do I start and stop an EV charger from my dashboard?”

What it does

Charge point CP-03 reports status = Charging, power = 21.8 and soc = 64. The ring fills to 64%, the center reads 21.8 kW · 64%, and the line under it reads 18.4 kWh · 52 min · €6.30. An operator clicks Stop: the widget sends RemoteStopTransaction with the transaction ID, the button reads Stopping…, and it switches back once the charge point reports Finishing.

  • Shows every OCPP 1.6 status in its own color and icon: Available, Preparing, Charging, Paused by car, Paused by charger, Finished, Reserved, Unavailable and Faulted, with the error code under Fault.
  • Offers one main button that fits the status: Start while the connector is free or plugged in, Stop while a car charges or pauses, and Reset while the charge point is faulted.
  • Unlocks the cable with one click while a car is plugged in or has finished.
  • Sets the current limit in amperes with − and +. The new value shows at once, and a run of clicks goes out as one command.
  • Sums up the session on one line: energy, time since the start, and cost.
  • Scales to any card size: on a tall card the title stays at the top, the buttons at the bottom and the ring grows in between, and on a wide card the buttons sit beside the ring.
  • Controls one connector. A charger with two connectors takes two widgets, one per device.

How to set up

Data keys

The EV charger control widget has no datasource keys. Like other control widgets, it works on the Target device picked in the widget’s data settings. It reads each key below as telemetry or as an attribute, whichever the device has, and the names can be changed in the Data keys group of the settings. An empty field keeps the name shown here.

  • Status, status by default. The charger state as text, in any letter case: Available, Preparing, Charging, SuspendedEV, SuspendedEVSE, Finishing, Reserved, Unavailable or Faulted. Until it arrives the card shows No data and every button is locked.
  • Power, kW, power by default. Shown in the center while a car charges. Without it the center shows 0.
  • Battery, %, soc by default. Fills the ring. Without it the ring stays empty and the center shows only kW.
  • Session energy, kWh, Session start and Session cost: sessionEnergy, sessionStart and sessionCost by default. Together they make the session line. sessionStart is a timestamp in milliseconds or seconds. Each part is left out when its key is missing.
  • Error code, errorCode by default. Shown under Fault. NoError is ignored.
  • Transaction ID, transactionId by default, shown only when commands go by RPC. Sent with Stop. Without it, Stop sends the connector instead.
  • Rated power, kW and Connector type: ratedPower and connectorType by default. Shown under the title, for example 22 kW · Type 2. Hidden when missing.
  • active is the server attribute ThingsBoard keeps for every device. The widget reads it only when Lock when offline is on.

Commands

  • Send commands as, RPC by default.
    • RPC sends a one-way command, using Start method, Stop method, Unlock method and Reset method: RemoteStartTransaction, RemoteStopTransaction, UnlockConnector and Reset by default.
      • Start sends { "connectorId": 1, "idTag": "OPERATOR" }, because chargers want to know which connector to start and who started it.
      • Stop sends { "transactionId": … }.
      • Unlock sends { "connectorId": 1 }.
      • Reset sends { "type": "Soft" }.
    • Attribute writes Command attribute, command by default, in shared scope, with the value start, stop, unlock or reset.
  • Custom payload, off by default. Turning it on opens Payload function(command, params). The function receives the command name, what would be sent and ctx, and returns what to send instead. Use it for a charger with more than one connector, a different ID tag, or values of your own. When it returns nothing or throws, nothing is sent and the card says why.

After Start, Stop or Reset the button waits for the status to change. When the status has not changed in 30 seconds, a message says so.

Current limit

  • Show the current limit, on by default.
  • Send the limit as, Attribute by default. It writes Limit attribute (currentLimit by default) in shared scope. RPC sends Limit method (SetChargingProfile by default) with { "connectorId": 1, "limit": 16, "unit": "A" }. Either way, Limit attribute is read back as the current value.
  • Lowest limit, A and Highest limit, A: 6 and 32 by default. The step is 1 A.

How to customize

  • To match your dashboard colors — set Accent, indigo #3949AB by default. It colors the Charging and Preparing states, the Start button, Unlock and the current limit control.
  • To recolor the other states — set Free (green by default, for Available and Finished), Paused (amber, for both paused states) and Fault (red). The chip and the inside of the ring take a light shade of the same color.
  • To show your currency — edit Currency, € by default.
  • To lock the card while the charge point is offline — turn on Lock when offline, off by default. The card then shows Offline while active is false.
  • To rename the card — change the widget title, for example to the charge point’s name.

Tips

  • Put the widget in a dashboard state whose entity is the charge point a user clicked in a table or a map. One widget then serves every charge point.
  • Turn on Custom payload for a charger with two connectors: params.connectorId = 2; return params; makes the same widget drive the second one.
  • Pick Attribute under Send commands as when a rule chain, not the charger itself, turns commands into charger calls. The rule chain reacts to the command attribute update.
  • Keep Attribute under Send the limit as when a rule chain, not the charger itself, turns the limit into a charging profile.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.