Skip to content

[ocpp] Add cableConnected channel derived from connector status - #153

Open
stamateviorel wants to merge 2 commits into
ConnectorIO:masterfrom
stamateviorel:pr/16-cable-connected
Open

[ocpp] Add cableConnected channel derived from connector status#153
stamateviorel wants to merge 2 commits into
ConnectorIO:masterfrom
stamateviorel:pr/16-cable-connected

Conversation

@stamateviorel

Copy link
Copy Markdown
Collaborator

OCPP 1.6 has no plug-presence message — automation that needs to know whether an EV is plugged in has to interpret the raw chargePointStatus string itself. New read-only cableConnected Switch channel derives it: ON for Preparing/Charging/SuspendedEV/SuspendedEVSE/Finishing, OFF for Available/Unavailable/Faulted/Reserved. Updated on every StatusNotification.

Verified against Wallbox Copper SB / Pulsar Plus (FW 6.7.38) and Phoenix Contact CHARX SEC-3xxx (FW 1.9.0): plug → ON at Preparing, unplug → OFF at Available.

splatch
splatch previously approved these changes Jun 2, 2026

@splatch splatch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a minor note about channel type, beside that its OK.

<label>Charging</label>
<description>Remote start/stop charging control. Send ON to trigger RemoteStartTransaction and OFF to trigger RemoteStopTransaction.</description>
</channel>
<channel id="cableConnected" typeId="switch">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor note, we represent read only channel with controllable switch. From OH philosophy point of view we should create a contact channel (we miss such type for now) with item-type=contact and command it with OpenClosedType.

OCPP 1.6 has no plug-presence message. Automation that needs to know
whether an EV is plugged in has to interpret the raw chargePointStatus
string itself. New read-only `cableConnected` Switch channel derives it:
ON for Preparing/Charging/SuspendedEV/SuspendedEVSE/Finishing, OFF for
Available/Unavailable/Faulted/Reserved. Updated on every StatusNotification.

Verified against Wallbox Copper SB / Pulsar Plus and Phoenix Contact CHARX
SEC-3xxx: cable plug → ON at Preparing, unplug → OFF at Available.

Signed-off-by: Stamate Viorel <stamate.viorel@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@stamateviorel
stamateviorel force-pushed the pr/16-cable-connected branch from 4b0c243 to 10db65b Compare June 13, 2026 14:04
Per review: a read-only derived value was modeled with a controllable
Switch channel-type. Add a generic reusable "contact" channel-type
(item-type=Contact, readOnly) alongside the existing switch/number/string
primitives and repoint cableConnected at it. CLOSED mirrors the physical
pilot circuit — plugging in the cable closes it — OPEN otherwise.

Signed-off-by: Stamate Viorel <stamate.viorel@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants