Skip to content

Commit

Permalink
OCPP201: Publish websocket connection state (#775)
Browse files Browse the repository at this point in the history
* Added connection_status_changed_callback to OCPP201 to publish this information over the ocpp interface
---------

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried authored Jul 15, 2024
1 parent b2ea2fe commit 4b13b10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ libevse-security:
# OCPP
libocpp:
git: https://github.com/EVerest/libocpp.git
git_tag: v0.14.0
git_tag: 21b00339eb309c7bf22f8ef66f630da9fe72bdce
cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBOCPP"
# Josev
Josev:
Expand Down
4 changes: 4 additions & 0 deletions modules/OCPP201/OCPP201.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ void OCPP201::ready() {
};
}

callbacks.connection_state_changed_callback = [this](const bool is_connected) {
this->p_ocpp_generic->publish_is_connected(is_connected);
};

const auto sql_init_path = this->ocpp_share_path / SQL_CORE_MIGRATIONS;

std::map<int32_t, int32_t> evse_connector_structure = this->get_connector_structure();
Expand Down

0 comments on commit 4b13b10

Please sign in to comment.