私家珍藏-OCPP1.6J 协议解析之StopTransactionOnInvalidId
2026/5/8 16:52:08 网站建设 项目流程

应用场景举例:

小明有两张卡,一张是本地缓存的卡,一张是授权缓存的卡,这两张卡都有使用期限。突然一天,家里网络不好,桩Offline了,但是小明要给车充电,于是就在超期时间前,刷了一张本地缓存/授权缓存的卡给车充电,可是没充多久,卡就到了超期时间,然后家里的网络也好了,桩也Online了,这时候会出现以下情况:

解释

官方解释:

whether the Charge Point will stop an ongoing transaction when it receives a non- Accepted authorization status in a StartTransaction.conf for this transaction.
when StopTransactionOnInvalidId is set to true: stop the transaction normally as stated in Stop Transaction. The Reason field in the Stop Transaction request should be set to DeAuthorized. If the Charge Point has the possibility to lock the Charging Cable, it SHOULD keep the Charging Cable locked until the owner presents his identifier.
when StopTransactionOnInvalidId is set to false: only stop energy delivery to the vehicle.

通俗解释:

桩在Offline时的请求和响应会在Online之后补发,所以在Offline启充时,Online之后会在StartTransaction.conf中更新idtag的状态,如:

StopTransactionOnInvalidId=True:当StartTransaction.conf是Blocked/Expired等不期望的状态时,会发送StopTransaction.req.reason="DeAuthorized"来结束订单
StopTransactionOnInvalidId=False:当StartTransaction.conf是Blocked/Expired等不期望的状态时,只会发送StartTransaction.con.idTagInfo.status=“Blocked/Expired”,直到充到设定的MaxEnergyOnInvalidId值时才会停止传输电量,车端暂停,但是依然不会结束订单

测试手法和报文:

StopTransactionOnInvalidId=True

测试步骤:

1.StopTransactionOnInvalidId=True
2.AuthorizationCacheEnabled=false
3.SendLocalList(Max. Active Transaction Count:1)
4.桩Offline(断开桩连接的AP)
5.刷SendLocalList的卡
6.会看到START_CHANGE报文
7.在Steve平台修改卡的Max. Active Transaction Count为0
8.桩Online(启用桩连接的AP)
9.补发StatusNotification:charging
10.更新StartTransaction.con.status:Blocked
11.车端暂停StatusNotification.req.status:SuspendedEVSE
12.充电完成StatusNotification.req.status:Finishing
13.结束订单StopTransaction.req.reason:DeAuthorized

测试报文:

StopTransactionOnInvalidId=False

测试步骤:

1.StopTransactionOnInvalidId=False
2.AuthorizationCacheEnabled=false
3.SendLocalList(Max. Active Transaction Count:1)
4.桩Offline(断开桩连接的AP)
5.刷SendLocalList的卡
6.会看到START_CHANGE报文
7.在Steve平台修改卡的Max. Active Transaction Count为0
8.桩Online(启用桩连接的AP)
9.补发StatusNotification:charging
10.更新StartTransaction.con.status:Blocked
11.更新Meter Values
12.直到充电量达到MaxEnergyOnInvalidId设定的值
13.发送StatusNotification.req.status:SuspendedEVSE,但是始终不会发送StopTransaction.req

测试报文:

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询