From 76b09d4a9a64a0a886c2e5c3fea2b87636cea09a Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 17 Mar 2024 19:22:15 +0100 Subject: [PATCH] OpenWB Pro: add rfid support (#13011) --- charger/openwb-pro.go | 6 +++++- charger/openwb/pro/types.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charger/openwb-pro.go b/charger/openwb-pro.go index a8922d72e..872985987 100644 --- a/charger/openwb-pro.go +++ b/charger/openwb-pro.go @@ -215,5 +215,9 @@ func (wb *OpenWBPro) Identify() (string, error) { return "", err } - return res.VehicleID, err + if res.VehicleID != "" { + return res.VehicleID, nil + } + + return res.RfidTag, nil } diff --git a/charger/openwb/pro/types.go b/charger/openwb/pro/types.go index b251baf9c..2f5d319e8 100644 --- a/charger/openwb/pro/types.go +++ b/charger/openwb/pro/types.go @@ -18,6 +18,7 @@ type Status struct { PhasesInUse int `json:"phases_in_use"` OfferedCurrent float64 `json:"offered_current"` EvseSignaling string `json:"evse_signaling"` + RfidTag string `json:"rfid_tag"` VehicleID string `json:"vehicle_id"` Soc int `json:"soc_value"` SocTimestamp int64 `json:"soc_timestamp"`