Ocpp: trigger status globally for chargers that don't answer the connector (#16327)
This commit is contained in:
parent
37705b873b
commit
ee928e3ae7
2 changed files with 8 additions and 7 deletions
|
|
@ -162,13 +162,7 @@ func NewOCPP(id string, connector int, idTag string,
|
|||
stackLevelZero: stackLevelZero,
|
||||
}
|
||||
|
||||
if cp.HasRemoteTriggerFeature {
|
||||
if err := conn.TriggerMessageRequest(core.StatusNotificationFeatureName); err != nil {
|
||||
c.log.DEBUG.Printf("failed triggering StatusNotification: %v", err)
|
||||
}
|
||||
|
||||
go conn.WatchDog(10 * time.Second)
|
||||
}
|
||||
go conn.WatchDog(10 * time.Second)
|
||||
|
||||
return c, conn.Initialized()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,6 +156,13 @@ func (cp *CP) Setup(meterValues string, meterInterval time.Duration) error {
|
|||
cp.log.DEBUG.Printf("failed configuring %s: %v", KeyWebSocketPingInterval, err)
|
||||
}
|
||||
|
||||
// trigger status for all connectors
|
||||
if cp.HasRemoteTriggerFeature {
|
||||
if err := cp.TriggerMessageRequest(0, core.StatusNotificationFeatureName); err != nil {
|
||||
cp.log.WARN.Printf("failed triggering StatusNotification: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue