diff --git a/modules/OCPP/OCPP.cpp b/modules/OCPP/OCPP.cpp index 6ef4905d5a..6d6e1a4b77 100644 --- a/modules/OCPP/OCPP.cpp +++ b/modules/OCPP/OCPP.cpp @@ -280,6 +280,8 @@ void OCPP::init() { json_config.dump(), this->ocpp_share_path, user_config_path, std::filesystem::path(this->config.DatabasePath), sql_init_path, std::filesystem::path(this->config.MessageLogPath), std::make_shared(*this->r_security)); + + this->charge_point->set_message_queue_resume_delay(std::chrono::seconds(config.MessageQueueResumeDelay)); } void OCPP::ready() { diff --git a/modules/OCPP/OCPP.hpp b/modules/OCPP/OCPP.hpp index 4800ebbc1b..d364cbaf3a 100644 --- a/modules/OCPP/OCPP.hpp +++ b/modules/OCPP/OCPP.hpp @@ -52,6 +52,7 @@ struct Conf { int PublishChargingScheduleDurationS; std::string MessageLogPath; std::string CertsPath; + int MessageQueueResumeDelay; }; class OCPP : public Everest::ModuleBase { diff --git a/modules/OCPP/manifest.yaml b/modules/OCPP/manifest.yaml index 03aefefe33..ad4e4b00ae 100644 --- a/modules/OCPP/manifest.yaml +++ b/modules/OCPP/manifest.yaml @@ -34,7 +34,11 @@ config: CertsPath: description: Path to folder where certificates are located. If empty uses everest prefix + etc/everest/certs type: string - default: "" + default: ""# + MessageQueueResumeDelay: + description: Time (seconds) to delay resuming the message queue after reconnecting + type: integer + default: 0 provides: main: description: This is a OCPP 1.6 charge point