Connecting a charger · Video 17 of 19

OCPP Heartbeat explained: WebSocket pings, heartbeat interval and dropped connections

Learn what keeps an EV charger online (the WebSocket connection and its pings, from both sides), what OCPP Heartbeat adds, and how to tell a normal reconnect from a real outage in a charger's log.

Length: 2:54Read the guide

In this video

Online versus last seen, HeartbeatInterval in seconds, WebSocketPingInterval for the charger's own pings, and why the central system cannot call a charger back.

Chapters

Transcript

Heartbeat. What keeps a charger online, what Heartbeat is for, and how to read a dropped connection. At night, a charger in Talvara's garage has nothing to report. How does Powerfill know it is still there? From the connection itself. Powerfill shows a charger as online while its WebSocket connection is open. Some networks close a line that stays quiet for a while. The charger notices, and connects again by itself.

Small WebSocket pings keep a quiet line open. They come from both sides, and each one gets a pong back. Powerfill pings every charger on its own. How often the charger pings is a charger setting, WebSocketPingInterval. Heartbeat is different: an OCPP message the charger sends on that connection, at a set interval. The answer carries the server's time, so the charger's clock stays right.

On the charger's page, Last seen shows when Powerfill last heard from it: a boot, a heartbeat, or a pong to Powerfill's ping. Online comes from the open connection, and a longer heartbeat interval does not drop it. The pings keep it open. How often? The interval is one setting for your whole account. Open Account Settings, go to the Settings tab, and find OCPP Settings. Watch the unit: Powerfill counts the heartbeat in minutes.

Chargers count it in seconds. Powerfill hands the interval to each charger in its answer to BootNotification. So a new value reaches a charger the next time it boots. To change one charger right away, set its HeartbeatInterval key. The lesson Configuration keys shows how. A shorter interval checks the charger's clock more often. A longer one sends less data, which matters on a SIM card.

To read a connection that dropped, open the charger's Logs tab. A Disconnected line, then a Connected line seconds later, is a normal reconnect. A good charger keeps its transaction messages while it is away and sends them when it is back. A running transaction goes on. If such pairs come again and again, something closes the quiet line. Check the charger's ping interval and the network.

A Disconnected line with nothing after it is a real outage: the charger stopped calling. Powerfill cannot call it back, because the charger always calls first. The cause is on site: power, network, or the charger. You can now explain what keeps a charger online, find the heartbeat setting, and tell a normal reconnect from a real outage.