From f5e46a70a391568b327bc1b6d88398bf710be035 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 1 Sep 2025 20:08:27 +0200 Subject: [PATCH] docs: refine READMEs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 20 ++++++++++---------- ui/web/README.md | 10 ++++++++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 410da5d1..581be102 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Simple [node.js](https://nodejs.org/) software to simulate and scale a set of ch - [Installation](#installation) - [Prerequisites](#prerequisites) - [Windows](#windows) - - [MacOSX](#macosx) + - [macOS](#macos) - [GNU/Linux](#gnulinux) - [Development prerequisites (optional)](#development-prerequisites-optional) - [Unix](#unix) @@ -44,7 +44,7 @@ Simple [node.js](https://nodejs.org/) software to simulate and scale a set of ch - [Version 1.6](#version-16-1) - [Version 2.x.x](#version-2xx-1) - [UI Protocol](#ui-protocol) - - [Websocket Protocol](#websocket-protocol) + - [WebSocket Protocol](#websocket-protocol) - [HTTP Protocol](#http-protocol) - [Support, Feedback, Contributing](#support-feedback-contributing) - [Code of Conduct](#code-of-conduct) @@ -64,7 +64,7 @@ Install the [node.js](https://nodejs.org/) current LTS or superior version runti choco install -y nodejs ``` -#### MacOSX +#### macOS - [Homebrew](https://brew.sh/): @@ -565,18 +565,18 @@ All kind of OCPP parameters are supported in charging station configuration or c ## UI Protocol -Protocol to control the simulator via a Websocket or HTTP server: +Protocol to control the simulator via a WebSocket or HTTP server: ```mermaid sequenceDiagram Client->>UI Server: request UI Server->>Client: response -Note over UI Server,Client: HTTP or Websocket +Note over UI Server,Client: HTTP or WebSocket ``` -### Websocket Protocol +### WebSocket Protocol -SRPC protocol over Websocket. PDU stands for 'Protocol Data Unit'. +SRPC protocol over WebSocket. PDU stands for 'Protocol Data Unit'. - Request: [`uuid`, `ProcedureName`, `PDU`] @@ -589,11 +589,11 @@ SRPC protocol over Websocket. PDU stands for 'Protocol Data Unit'. `uuid`: String uniquely linking the response to the request `PDU`: Response parameters to requested procedure -To learn how to use the Websocket protocol to pilot the simulator, an [Insomnia](https://insomnia.rest/) Websocket requests collection is available in [src/assets/ui-protocol](./src/assets/ui-protocol) directory. +To learn how to use the WebSocket protocol to pilot the simulator, an [Insomnia](https://insomnia.rest/) WebSocket requests collection is available in [src/assets/ui-protocol](./src/assets/ui-protocol) directory. #### Version 0.0.1 -Set the Websocket header _Sec-Websocket-Protocol_ to `ui0.0.1`. +Set the WebSocket header _Sec-WebSocket-Protocol_ to `ui0.0.1`. ##### Procedures @@ -690,7 +690,7 @@ Set the Websocket header _Sec-Websocket-Protocol_ to `ui0.0.1`. `responsesFailed`: failed responses payload array (optional) } -###### Set Charging Station Supervision Url +###### Set Charging Station Supervision URL - Request: `ProcedureName`: 'setSupervisionUrl' diff --git a/ui/web/README.md b/ui/web/README.md index 039d9015..1fd49230 100644 --- a/ui/web/README.md +++ b/ui/web/README.md @@ -29,7 +29,7 @@ The Web UI code and configuration is in the repository directory [ui/web](./../. #### Simulator UI Server Configuration -The simulator UI server must be enabled, use WebSocket transport type and have authentication disabled. The simulator main configuration file should have a `uiServer` section like this: +The simulator UI server must be enabled, use WebSocket transport type, and be configured consistently with your Web UI authentication. The simulator main configuration file should have a `uiServer` section like this: ```json "uiServer": { @@ -105,6 +105,12 @@ Copy the configuration template [src/assets/config-template.json](./src/assets/c ### Run +#### Install dependencies + +```shell +pnpm install +``` + #### Compiles and run for production ```shell @@ -117,7 +123,7 @@ You can now follow the link displayed in the terminal. The Web UI looks like the ![webui](./src/assets/webui.png) -1. With the buttons on the top you can change UI server, start/stop the simulator, add new charging stations and refresh the content. +1. With the buttons on the top you can change UI server, start/stop the simulator, add new charging stations, and refresh the content. 2. Each charging station is a row in the table with specific 'Actions' to execute on. Try 'Stop Charging Station' and refresh with the large blue button and see the status 'Started' turns from 'Yes' into 'No'. #### Docker -- 2.43.0