Vue UI + UI server
[e-mobility-charging-stations-simulator.git] / README.md
index 746bb9e04f7be7d6d74861389a7dfe2a10df20a6..9b18fed95d7df25bed80c712f6f87f09b9adff22 100644 (file)
--- a/README.md
+++ b/README.md
@@ -381,6 +381,74 @@ All kind of OCPP parameters are supported in a charging station configuration or
 
 - _none_
 
+## UI protocol
+
+Protocol to control the simulator via a Websocket protocol
+
+### Version 0.0.1
+
+Set the HTTP header Sec-Websocket-Protocol to `ui0.0.1`
+
+#### Protocol
+
+Request:
+[`uuid`, `ProcedureName`, `PDU`]
+
+`uuid`: String uniquely representing this request
+`ProcedureName`: The procedure to run on the simulator
+`PDU (for Protocol Data Unit)`: The parameters (if any) for said procedure
+
+Response:
+[`uuid`, `PDU`]
+
+`uuid`: String uniquely linking the response to the request
+`PDU`: Response data to requested procedure
+
+#### Procedures
+
+##### List Charging stations
+
+Request:
+`ProcedureName`: 'listChargingStation'
+`PDU`: {}
+
+Response:
+`PDU`: {
+`status`,
+An array of ChargingStationData as described in `ChargingStationWorker.ts` file
+}
+
+##### Start Transaction
+
+Request:
+`ProcedureName`: 'startTransaction'
+`PDU`: {
+`hashId`: the unique identifier of a chargingStation
+`connectorId`: the id of the connector (start at 1)
+`idTag`: An allowed badge authetification ID
+}
+
+Response:
+`PDU`: {
+`status`,
+**null**
+}
+
+##### Stop Transaction
+
+Request:
+`ProcedureName`: 'stopTransaction'
+`PDU`: {
+`hashId`: the unique identifier of a chargingStation
+`transactionId`: the id of the transaction
+}
+
+Response:
+`PDU`: {
+`status`,
+**null**
+}
+
 ## Support, Feedback, Contributing
 
 This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/e-mobility-charging-stations-simulator/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).