Add OCPP forwarder (#29154)

This commit is contained in:
Alexandre JARDON 2026-06-07 13:17:54 +02:00 • committed by GitHub
parent a8361b575b
commit 3758ce1957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 2182 additions and 137 deletions

View file

@ -842,7 +842,18 @@ func configureMDNS(conf globalconfig.Network) error {
// setup OCPP
func configureOCPP(cfg *ocpp.Config, externalUrl string) {
if settings.Exists(keys.Ocpp) {
if err := settings.Json(keys.Ocpp, cfg); err != nil {
log.WARN.Printf("ocpp: failed to load settings: %v", err)
}
}
ocpp.Init(*cfg, externalUrl)
// Load proxy forwarding rules from DB if present.
var rules []ocpp.ForwarderRule
if err := settings.Json(keys.OcppForwarder, &rules); err == nil {
ocpp.ApplyForwarderRules(rules)
}
}
// setup EEBus