From 4bd0546b0744f6946412fc9430a65a8b03e1252d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE?= <22869613+xBlaz3kx@users.noreply.github.com> Date: Sun, 26 Dec 2021 21:48:00 +0100 Subject: [PATCH] Updated docs --- docs-hardware/bill-of-materials.md | 48 +++---- docs-services/logging/_category_.json | 4 + docs-services/{ => logging}/graylog.md | 30 ++--- docs-services/logging/logging.md | 44 ++++++ docs/go-client/adding-support-for-hardware.md | 23 ++-- docs/go-client/configuration.md | 125 ++++++++++-------- docs/go-client/installing-libraries.md | 84 +++++++----- docs/go-client/running-the-client.md | 16 ++- docs/intro.md | 29 ++-- docs/python-client/py-configuration.md | 34 ++--- docusaurus.config.js | 4 +- src/components/HomepageFeatures.js | 19 +-- src/pages/index.js | 2 +- 13 files changed, 276 insertions(+), 186 deletions(-) create mode 100644 docs-services/logging/_category_.json rename docs-services/{ => logging}/graylog.md (70%) create mode 100644 docs-services/logging/logging.md diff --git a/docs-hardware/bill-of-materials.md b/docs-hardware/bill-of-materials.md index cd6a92a..ca680b9 100644 --- a/docs-hardware/bill-of-materials.md +++ b/docs-hardware/bill-of-materials.md @@ -2,40 +2,40 @@ sidebar_position: 2 --- -# Bill of materials +# πŸ“ Bill of materials -## Note: +## ❗ Note: The bill of materials can vary, depending on your preferences, part availability and price. The aim of the project is to make a charging point out of off-the-shelf hardware that is widely available. Also, the list is not in any way perfect. ## Enclosure and wiring -| Item| # | -| :---: | :---: | -| Schneider Electric Kaedra with 4 openings (or more) | 1x | -| Schneider Electric Schuko outlet for Kaedra | 4x (depends on the electrical box)| -| Terminal/crimp connectors | a lot | -| 1,5 mm2 or any 10A rated wire | around 20m | -| Schuko plug | 1 | +| Item | # | +|:---------------------------------------------------:|:----------------------------------:| +| Schneider Electric Kaedra with 4 openings (or more) | 1x | +| Schneider Electric Schuko outlet for Kaedra | 4x (depends on the electrical box) | +| Terminal/crimp connectors | a lot | +| 1,5 mm2 or any 10A rated wire | around 20m | +| Schuko plug | 1 | ## Electronics -| Item| # | -| :---: | :---: | -| ETIMat6 C10 | 1 | -| ETIMat6 B6 | 1 | -| Raspberry Pi 4 2GB | 1 | -| 4-Relay module 230V 10A | 1 | -| Huawei LTE modem | 1 | -| CS5460 power meter | 4x (for each outlet) | -| PN532 NFC/RFID reader | 1 | -| WS281x LED strip | a few meters | +| Item | # | +|:-----------------------:|:--------------------:| +| ETIMat6 C10 | 1 | +| ETIMat6 B6 | 1 | +| Raspberry Pi 4 2GB | 1 | +| 4-Relay module 230V 10A | 1 | +| Huawei LTE modem | 1 | +| CS5460 power meter | 4x (for each outlet) | +| PN532 NFC/RFID reader | 1 | +| WS281x LED strip | a few meters | ## Misc -| Item| # | -| :---: | :---: | -| M2,5 20mm screws | 4 | -| M2 or M2,5 6mm screws | 2 | -| __optionally__ 3D printed DIN mounts | 2 | \ No newline at end of file +| Item | # | +|:------------------------------------:|:---:| +| M2,5 20mm screws | 4 | +| M2 or M2,5 6mm screws | 2 | +| __optionally__ 3D printed DIN mounts | 2 | \ No newline at end of file diff --git a/docs-services/logging/_category_.json b/docs-services/logging/_category_.json new file mode 100644 index 0000000..53031d5 --- /dev/null +++ b/docs-services/logging/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Logging", + "position":5 +} diff --git a/docs-services/graylog.md b/docs-services/logging/graylog.md similarity index 70% rename from docs-services/graylog.md rename to docs-services/logging/graylog.md index 2bd0f69..7555d4e 100644 --- a/docs-services/graylog.md +++ b/docs-services/logging/graylog.md @@ -1,21 +1,21 @@ --- -sidebar_position: 1 +sidebar_position: 2 --- -# Graylog logging server +# πŸ“œ Graylog logging server ## Prerequisites -You should have a publicly accessible Linux or Windows server with Docker and docker-compose installed. Check -out [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) +You should have a publicly accessible Linux or Windows server with Docker and docker-compose installed. + +See [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) for installation guides. -## Running Graylog server with docker-compose +## πŸƒ Deploying Graylog server with docker-compose -1. Copy the following code into a docker-compose.yaml or use the - provided [docker-compose](https://github.com/xBlaz3kx/ChargePi-go/blob/main/docs/services/docker-compose.yaml). There - are two docker-compose files - the first one is the base and the second one uses [Traefik](https://traefik.io/) as a - reverse proxy for routing. +1. Copy the following code into a docker-compose.yaml or use the provided [docker-compose](../../docker-compose.yaml). There + are two docker-compose files - the first one is the base and the second one uses Traefik as a reverse proxy for + routing. ```yaml version: '3' @@ -53,11 +53,11 @@ services: - mongo - elasticsearch ports: - - 8081:9000 - - 1514:1514 - - 1514:1514/udp - - 12201:12201 - - 12201:12201/udp + - "8081:9000" + - "1514:1514" + - "1514:1514/udp" + - "12201:12201" + - "12201:12201/udp" networks: graylog: driver: bridge @@ -70,7 +70,7 @@ volumes: driver: local ``` -2. Change the `GRAYLOG_ROOT_PASSWORD_SHA2` as well as the external `GRAYLOG_HTTP_EXTERNAL_URI` environment variable. +2. Change the password hint and SHA256 as well as the external `GRAYLOG_HTTP_EXTERNAL_URI` environment variable. 3. Run using: diff --git a/docs-services/logging/logging.md b/docs-services/logging/logging.md new file mode 100644 index 0000000..41c276e --- /dev/null +++ b/docs-services/logging/logging.md @@ -0,0 +1,44 @@ +--- +sidebar_position: 1 +--- + +# πŸ“œ Logging + +Logging is configured in the `settings` file. There are multiple ways of logging: + +1. Remote logging + - Using Graylog and GELF + - Using Syslog + +2. File logging + - Log to the `/var/logs` in a JSON format + - Read the logs from the file and send them to a remote Loki instance using Promtail (or any other client) + +3. Console logging + - Only output the logs in the console. + +## πŸ› οΈ Logging configuration + +| Attribute | Valid values | Default | Description | +|:---------:|:---------------------------:|:---------:|:----------------------------------------------------:| +| `type` | `remote`, `file`, `console` | `console` | Where to output the logs. Can have multiple outputs. | +| `format` | `json`, `syslog`, `gelf` | `json` | The format the logs are in. | +| `host` | Any valid IP/hostname | / | Only needed when the type is `remote`. | +| `port` | / | / | Only needed when the type is `remote`. | + +Example logging settings: + +```json +{ + // ... other settings + "logging": { + "type": [ + "remote", + "file" + ], + "format": "gelf", + "host": "logging.example.com", + "port": 12201 + } +} +``` \ No newline at end of file diff --git a/docs/go-client/adding-support-for-hardware.md b/docs/go-client/adding-support-for-hardware.md index ba254e3..97a6830 100644 --- a/docs/go-client/adding-support-for-hardware.md +++ b/docs/go-client/adding-support-for-hardware.md @@ -2,7 +2,7 @@ sidebar_position: 4 --- -# Adding support for hardware +# ➑️Adding support for hardware There are four hardware component groups that are included in the project: @@ -14,17 +14,21 @@ There are four hardware component groups that are included in the project: These hardware components have corresponding interfaces that are included in the `ChargePointHandler` struct. This allows adding support for other models of hardware with similar functionalities. -## Reader hardware +You're welcome to submit a Pull Request with any additional hardware model implementations! Be sure to test and document +your changes, update the [supported hardware](../hardware/hardware.md) table(s) with the new hardware model(s). It would +be nice to have a wiring sketch or a connection table included for the new model(s). + +## πŸ’³ Reader hardware All readers must implement the `Reader` interface. It is recommended that you implement the interface in a new file named after the model of the reader in the `hardware/reader` package. Then you should add a **constant** named after the **model** of the reader in the `reader` file in the package and add a switch case with the implementation and the necessary logic that returns a pointer to the struct. -The settings of the reader are read from the `settings` file, which is stored in the cache and are available in the +The settings of the reader are read from the `settings.json` file, which is stored in the cache and are available in the NewTagReader method. -```go +```golang package reader const ( @@ -57,14 +61,14 @@ func NewTagReader() Reader { } ``` -## Display hardware +## πŸ–₯️ Display hardware All displays must implement the `LCD` interface. It is recommended that you implement the interface in a new file named after the model of the display/LCD in the `hardware/display` package. Then you should add a **constant** named after the **model** of the display in the `display` file in the package and add a switch case with the implementation and the necessary logic that returns a pointer to the struct. -```go +```golang package display const ( @@ -113,7 +117,7 @@ func NewDisplay() LCD { The process is the same as the previous description. -```go +```golang package indicator const ( @@ -146,11 +150,11 @@ func NewIndicator(stripLength int) Indicator { } ``` -## Power meters +## ⚑ Power meters The process is the same as the previous description. -```go +```golang package power_meter const ( @@ -187,4 +191,3 @@ func NewPowerMeter(connector *settings.Connector) (PowerMeter, error) { return nil, fmt.Errorf("power meter not enabled") } ``` - diff --git a/docs/go-client/configuration.md b/docs/go-client/configuration.md index 7325c5c..be296e5 100644 --- a/docs/go-client/configuration.md +++ b/docs/go-client/configuration.md @@ -2,35 +2,42 @@ sidebar_position: 1 --- -# Configuration +# πŸ› οΈ Configuration -## Configuring connectivity and basic information of the Charging Point +There are three **required** configuration files: -Settings can be found in the `settings` file and feature basic Charge Point information such as: +1. `settings` +2. `configuration` +3. `connector` -- vendor and model, -- unique registered charging point ID, server URI and logging server IP, +The settings files are supported in `YAML`, `JSON` or `TOML` format. All files must be only in one format. The format is +configurable though program flags. + +## The `settings` file + +The `settings` file contains basic information about the charge point and provide connectivity details: + +- Charge Point ID, +- central system URI and OCPP protocol version, +- OCPP information (vendor, model, firmware, etc.), +- logging settings, +- TLS settings, - default max charging time, -- OCPP protocol version, -- client current and target version for tracking updates, - hardware settings for LCD, RFID/NFC reader and LEDs. -The settings file is supported in YAML or JSON format. - The table represents attributes, their values and descriptions that require more attention and might not be -self-explanatory. Some attributes can have multiple possible values, if any are empty, they will be treated as disabled or -might not work properly. - -| Attribute| Description |Possible values | -| :---: | :---: | :---: | -| id | ID of the charging point. Must be registered in the Central System | Default:"ChargePi" | -| protocolVersion | Version of the OCPP protocol. | "1.6", "2.0.1" | -| serverUri | URI of the Central System with the port and endpoint. | Default: "172.0.1.121:8080/steve/websocket/CentralSystemService" | -| logServer | IP of the logging server. | Any valid IP | -| info: maxChargingTime | Max charging time allowed on the Charging point in minutes. | Default:180 | -| rfidReader: readerModel | RFID/NFC reader model used. | "PN532", ""| -| ledIndicator: type | Type of the led indicator. | "WS281x", ""| -| hardware: minPower| Minimum power draw needed to continue charging, if Power meter is configured. | Default:20| +self-explanatory. Some attributes can have multiple possible values, if any are empty, they will be treated as disabled +or might not work properly. + +| Attribute | Description | Possible values | +|:-----------------------:|:-----------------------------------------------------------------------------:|:----------------------------------------------------------------:| +| id | ID of the charging point. Must be registered in the Central System | Default:"ChargePi" | +| protocolVersion | Version of the OCPP protocol. | "1.6", "2.0.1" | +| serverUri | URI of the Central System with the port and endpoint. | Default: "172.0.1.121:8080/steve/websocket/CentralSystemService" | +| info: maxChargingTime | Max charging time allowed on the Charging point in minutes. | Default:180 | +| rfidReader: readerModel | RFID/NFC reader model used. | "PN532", "" | +| ledIndicator: type | Type of the led indicator. | "WS281x", "" | +| hardware: minPower | Minimum power draw needed to continue charging, if Power meter is configured. | Default:20 | Example settings: @@ -38,27 +45,37 @@ Example settings: { "chargePoint": { "info": { - "vendor": "UL FE", - "model": "ChargePi", "id": "ChargePi", "protocolVersion": "1.6", - "currentClientVersion": "1.0", - "targetClientVersion": "1.0", - "serverUri": "yourCSMSURL/", - "logServer": "yourLoggingServer:12201", - "maxChargingTime": 180, - "tls": { - "isEnabled": false, - "CACertificatePath": "/usr/share/certs/rootCA.crt", - "clientCertificatePath": "/usr/share/certs/charge-point.crt", - "clientKeyPath": "/usr/share/certs/charge-point.key" + "serverUri": "example.com", + "maxChargingTime": 5, + "ocpp": { + "vendor": "UL FE", + "model": "ChargePi" } }, + "logging": { + "type": [ + "remote", + "file" + ], + "format": "gelf", + "host": "logging.example.com", + "port": 12201 + }, + "tls": { + "isEnabled": false, + "CACertificatePath": "/usr/share/certs/rootCA.crt", + "clientCertificatePath": "/usr/share/certs/charge-point.crt", + "clientKeyPath": "/usr/share/certs/charge-point.key" + }, "hardware": { "lcd": { "isSupported": true, "driver": "hd44780", - "i2cAddress": "0x27" + "i2cAddress": "0x27", + "i2cBus": 1, + "language": "en" }, "tagReader": { "isSupported": true, @@ -82,36 +99,36 @@ Example settings: } ``` -## Configuring EVSEs and connectors +## πŸ”Œ The `connector` file(s) - EVSEs and connectors -### General information +EVSE and connector settings file scan be found in the `connectors` folder. To add and configure the connector, simply +add a new file that contains the structure, defined in [attributes](#attributes) and modify it to your specs. The client +will scan the folder at boot and configure the connectors from the files if all the settings have valid values. -Connector (or equipment, hardware) settings can be found in _/connectors/connector-{id}.json_. To add a connector and -its settings, simply add a new json file that contains the structure below and modify it to your specs. The client will -scan the **connectors** folder at boot and configure the connectors from the files. Charging point can have multiple -EVSE and each can have one or more connectors, but only one connector of the EVSE can charge at a time. +Note: A Charge point can have multiple EVSEs, each oh which can have multiple connectors, but only one connector of the +EVSE can charge at a time. ### Attributes -Connector object contains a connector type and an ID of the connector, which must start with 1 and increment by one. The -status attribute changes according to the OCPP specification. The session object represents a Charging session and is -used to restore the connector's last known state when starting the client. +`Connector` object contains a connector type and an ID of the connector, which must start with 1 and increment by one. +The status attribute changes according to the OCPP specification. The `session` represents a Charging session and is +used to restore the connector's last state when starting the client. -The relay and power meter objects are configurable to specific GPIO pins and SPI bus. The inverseLogic attribute in the -relay object indicates the logic of the relay. If inverseLogic is set to _true_, the relay will use negative logic. The -Power meter also contains some attributes for measurement calibration. +The `relay` and `powerMeter` objects are configurable to specific GPIO pins and SPI bus. The `inverseLogic` attribute in +the relay object indicates the logic of the relay. If `inverseLogic` is set to _true_, the relay will use negative +logic. The `powerMeter` also contains some attributes for measurement calibration. The table represents attributes, their values and descriptions that require more attention and might not be self-explanatory. Some attributes can have multiple possible values, if any are empty, they will be treated as disabled or might not work properly. -| Attribute| Description |Possible values | -| :---: | :---: | :---: | -| evseId | ID of the EVSE | / | -| type | A type of the connector used in the build. | Refer to OCPP documentation. Default: "Schuko" | -| relay: inverseLogic | Uses negative logic for operating with the relay | false| -| powerMeter: shuntOffset | Value of the shunt resistor used in the build to measure power. | Default: 0.01 | -| powerMeter: voltageDividerOffset| Value of the voltage divider used in the build to measure power.| Default:1333 | +| Attribute | Description | Possible values | +|:--------------------------------:|:----------------------------------------------------------------:|:----------------------------------------------:| +| evseId | ID of the EVSE | / | +| type | A type of the connector used in the build. | Refer to OCPP documentation. Default: "Schuko" | +| relay: inverseLogic | Uses negative logic for operating with the relay | false | +| powerMeter: shuntOffset | Value of the shunt resistor used in the build to measure power. | Default: 0.01 | +| powerMeter: voltageDividerOffset | Value of the voltage divider used in the build to measure power. | Default:1333 | Example connector: diff --git a/docs/go-client/installing-libraries.md b/docs/go-client/installing-libraries.md index e0dcee3..c567469 100644 --- a/docs/go-client/installing-libraries.md +++ b/docs/go-client/installing-libraries.md @@ -2,57 +2,71 @@ sidebar_position: 2 --- -# Installing libraries +# πŸ’» Installing libraries -## Building libnfc for PN532 +## Read before continuing + +The process of installing the dependencies was automated by creating a shell script for installing the necessary +dependencies. The script has only one argument: weather or not you want to install Go on your device. It is recommended +you use this if you do not want to (re)configure anything. -Get and extract the libnfc: +Usage: ```bash - cd ~ - mkdir libnfc && cd libnfc/ - wget https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.8.0/libnfc-1.8.0.tar.bz2 - tar -xvjf libnfc-1.8.0.tar.bz2 + cd ~/ChargePi-go/docs + chmod +x install-dependencies.sh + ./install-dependencies.sh 1 ``` -**Next two steps may vary for your reader** +## Building libnfc for PN532 -Create PN532 configuration: +1. Get and extract the libnfc: -```bash - cd libnfc-1.8.0 - sudo mkdir /etc/nfc - sudo mkdir /etc/nfc/devices.d - sudo cp contrib/libnfc/pn532_uart_on_rpi.conf.sample /etc/nfc/devices.d/pn532_uart_on_rpi.conf - sudo nano /etc/nfc/devices.d/pn532_uart_on_rpi.conf -``` + ```bash + cd ~ + mkdir libnfc && cd libnfc/ + wget https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.8.0/libnfc-1.8.0.tar.bz2 + tar -xvjf libnfc-1.8.0.tar.bz2 + ``` -Add the line at the end of the file: + **Next two steps may vary for your reader and communication protocol** -```text -allow_intrusive_scan = true -``` +2. Create PN532 configuration: -Install dependencies and configure: + ```bash + cd libnfc-1.8.0 + sudo mkdir /etc/nfc + sudo mkdir /etc/nfc/devices.d + sudo cp contrib/libnfc/pn532_uart_on_rpi.conf.sample /etc/nfc/devices.d/pn532_uart_on_rpi.conf + sudo nano /etc/nfc/devices.d/pn532_uart_on_rpi.conf + ``` -```bash - sudo apt-get install autoconf - sudo apt-get install libtool - sudo apt-get install libpcsclite-dev libusb-dev - autoreconf -vis - ./configure --with-drivers=pn532_uart --sysconfdir=/etc --prefix=/usr -``` +3. Add the line at the end of the file: -Build the library: + ```text + allow_intrusive_scan = true + ``` -```bash -sudo make clean -sudo make install all -``` +4. Install dependencies and configure: + + ```bash + sudo apt-get install autoconf + sudo apt-get install libtool + sudo apt-get install libpcsclite-dev libusb-dev + autoreconf -vis + ./configure --with-drivers=pn532_uart --sysconfdir=/etc --prefix=/usr + ``` + +5. Build the library: + + ```bash + sudo make clean + sudo make install all + ``` ## Installing rpi-ws281x library -Follow the instructions on [maintainer's repository](https://github.com/jgarff/rpi_ws281x). +Follow the instructions from the [maintainer's repository](https://github.com/jgarff/rpi_ws281x). **TLDR; Use the instructions here** @@ -68,4 +82,4 @@ sudo make install To be able to use this C library in Go, it must be installed. You can do this by copying `*.h` to `/usr/local/include` and `'.a` files to `/usr/local/lib`. If not working, check the Go wrapper library -instructions [here](https://github.com/rpi-ws281x/rpi-ws281x-go). +instructions [here](https://github.com/rpi-ws281x/rpi-ws281x-go). \ No newline at end of file diff --git a/docs/go-client/running-the-client.md b/docs/go-client/running-the-client.md index 6c7d4eb..117fe74 100644 --- a/docs/go-client/running-the-client.md +++ b/docs/go-client/running-the-client.md @@ -2,27 +2,28 @@ sidebar_position: 3 --- -# Running the client +# πŸƒ Running the client ## Standalone This client uses **[SteVe](https://github.com/RWTH-i5-IDSG/steve)** for the Central System, but can connect to other -Central Systems as well. +Central Systems as well. Before you run/connect the client, make sure the backend is available and the charge point is +registered. -Running the program in Golang: +1. Running the program in Golang: ```bash go run . ``` -Compiling and executing the program: +2. Compiling and executing the program: ```bash go build -o chargepi . ./chargepi ``` -### Client flags/options +### 🚩 Client flags/options The client comes with flags for configurations' filepath, so you can specify where your configuration files are located. All the paths must be absolute. If no flags are provided, the client will default to the working directory. You can also @@ -46,11 +47,12 @@ Example: Path to the settings file (default "/home/pi/ChargePi-go/configs/settings.json") ``` -## Deploying on Docker +## 🐳 Deploying on Docker 1. Build the client image on Docker: ```bash + cd ChargePi/client docker build -t chargepi . ``` @@ -66,7 +68,7 @@ Alternatively, you can run the client, SteVe server and Watchtower on the same P The **[Watchtower](https://github.com/containrrr/watchtower)** service will automatically pull the newest image and run it when it is available. -1. Change the IP address under `serverUri` in the settings file to **172.0.1.121**. +1. Change the IP address under __serverUri__ in the settings file to **172.0.1.121**. 2. Build services: diff --git a/docs/intro.md b/docs/intro.md index 93f55d8..42db033 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -11,14 +11,14 @@ ChargePi client can be deployed/run in multiple ways: - Docker-compose to be deployed with SteVe Central System and Watchtower (**recommended for dev/testing only**) - Docker-compose by running the client -## Charging station specifications +## πŸ”Œ Charge point specifications -| Protocol implementation | Core functionalities | Offline charging | Local authorization | Charging profiles | -| :---: | :---: | :---: |:---: | :---: | -| OCPP 1.6 JSON/WS | βœ”οΈ | βœ”οΈ | βœ”οΈ | ❌ | -| OCPP 2.0.1 JSON/WS | Will be implemented | Will be implemented | Will be implemented | ❌ | +| OCPP version | Core functionalities | Offline charging | Local authorization | Charging profiles | +|:-------------:|:--------------------:|:-------------------:|:-------------------:|:-----------------:| +| 1.6 JSON/WS | βœ”οΈ | βœ”οΈ(partial) | βœ”οΈ | ❌ | +| 2.0.1 JSON/WS | Will be implemented | Will be implemented | Will be implemented | ❌ | -## Initial setup +## ⚑ Quickstart 1. Wire your hardware according to the schematics. @@ -39,16 +39,21 @@ ChargePi client can be deployed/run in multiple ways: 5. Run the client. -### Configuration and settings +### πŸ› οΈ Configuration and settings To configure the ChargePi client, check out the [**configuration for Go**](go-client/configuration) or [**configuration for Python**](python-client/py-configuration). Client comes with predefined settings which require minimal configuration. -## Graylog logging server +### πŸ“‘ Logging -ChargePi uses [Graylog](https://www.graylog.org/) logging server for remote logging, so a server should be up and -running if you want the logs to be stored. Logs are sent through GELF UDP protocol. +ChargePi supports multiple logging outputs. Configure the `logging` property in the `settings`file. Check out the list +below: -Configure the **"logServer"** property in the `settings` file with your server IP/domain name with the port. Setting up -the logging server is described in the services section. \ No newline at end of file +| Logging type | Supported | +|:-----------------------------------:|:---------:| +| [Graylog](https://www.graylog.org/) | βœ” | +| Syslog | βœ” | +| File | βœ” | + +For details, check out the [logging](/docs/logging/logging.md) docs. \ No newline at end of file diff --git a/docs/python-client/py-configuration.md b/docs/python-client/py-configuration.md index 4a2d1e4..28d5e4f 100644 --- a/docs/python-client/py-configuration.md +++ b/docs/python-client/py-configuration.md @@ -19,16 +19,16 @@ The table represents attributes, their values and descriptions that require more self-explanatory. Some examples can have multiple possible values, if any are empty, they will be treated as disabled or might not work properly. -| Attribute| Description |Possible values | -| :---: | :---: | :---: | -| id | ID of the charging point. Must be registered in the Central System | Default:"ChargePi" | -| protocol_version | Version of the OCPP protocol. | "1.6", "2.0.1" | -| server_uri | URI of the Central System with the port and endpoint. | Default: "172.0.1.121:8080/steve/websocket/CentralSystemService" | -| log_server | IP of the logging server. | Any valid IP | -| info: max_charging_time | Max charging time allowed on the Charging point in minutes. | Default:180 | -| rfid_reader: reader_model | RFID/NFC reader model used. | "PN532", "MFRC522" | -| LED_indicator: type | Type of the led indicator. | "WS281x", ""| -| hardware: min_power| Minimum power draw needed to continue charging, if Power meter is configured. | Default:20| +| Attribute | Description | Possible values | +|:-------------------------:|:-----------------------------------------------------------------------------:|:----------------------------------------------------------------:| +| id | ID of the charging point. Must be registered in the Central System | Default:"ChargePi" | +| protocol_version | Version of the OCPP protocol. | "1.6", "2.0.1" | +| server_uri | URI of the Central System with the port and endpoint. | Default: "172.0.1.121:8080/steve/websocket/CentralSystemService" | +| log_server | IP of the logging server. | Any valid IP | +| info: max_charging_time | Max charging time allowed on the Charging point in minutes. | Default:180 | +| rfid_reader: reader_model | RFID/NFC reader model used. | "PN532", "MFRC522" | +| LED_indicator: type | Type of the led indicator. | "WS281x", "" | +| hardware: min_power | Minimum power draw needed to continue charging, if Power meter is configured. | Default:20 | Example settings: @@ -85,13 +85,13 @@ The table represents attributes, their values and descriptions that require more self-explanatory. Some examples can have multiple possible values, if any are empty, they will be treated as disabled or might not work properly. -| Attribute| Description |Possible values | -| :---: | :---: | :---: | -| EVSEs | List of EVSEs, which each contain a list of connectors. | Default: example | -| connector: type | A type of the connector used in the build. | Refer to OCPP documentation. Default: "Schuko" | -| relay: default_state | Logic of the relay. It is used to combat different relay configurations. |0, 1| -| power_meter: shunt_offset | Value of the shunt resistor used in the build to measure power. | Default: 0.1 | -| power_meter: voltage_divider_offset| Value of the voltage divider used in the build to measure power.| Default:1333 | +| Attribute | Description | Possible values | +|:-----------------------------------:|:------------------------------------------------------------------------:|:----------------------------------------------:| +| EVSEs | List of EVSEs, which each contain a list of connectors. | Default: example | +| connector: type | A type of the connector used in the build. | Refer to OCPP documentation. Default: "Schuko" | +| relay: default_state | Logic of the relay. It is used to combat different relay configurations. | 0, 1 | +| power_meter: shunt_offset | Value of the shunt resistor used in the build to measure power. | Default: 0.1 | +| power_meter: voltage_divider_offset | Value of the voltage divider used in the build to measure power. | Default:1333 | Example with two connectors: diff --git a/docusaurus.config.js b/docusaurus.config.js index 51ce212..1045c94 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -36,7 +36,7 @@ module.exports = { docsPluginId: 'docs-hardware', }, { type: 'doc', - docId: 'graylog', + docId: 'modem-setup', label: 'Services', docsPluginId: 'docs-services', }, @@ -64,7 +64,7 @@ module.exports = { to: '/hardware/hardware' }, { label: 'Services', - to: '/services/graylog' + to: '/services/modem-setup' } ] }, diff --git a/src/components/HomepageFeatures.js b/src/components/HomepageFeatures.js index 81709ca..6a2f672 100644 --- a/src/components/HomepageFeatures.js +++ b/src/components/HomepageFeatures.js @@ -8,8 +8,8 @@ const FeatureList = [ Svg: require('../../static/img/rpi-3.svg').default, description: ( <> - ChargePi uses off-the-shelf widely available hardware. The base of the project is the Raspberry Pi. - It supports NFC/RFID readers, LCD, RGB LED strips for indicating the status and can perform + ChargePi uses off-the-shelf, widely available hardware. The base of the project is the Raspberry Pi. + You can add an NFC/RFID reader, an LCD, RGB LED strips for indicating the status and can perform power measurement with the CS5460 chip. ), @@ -19,8 +19,9 @@ const FeatureList = [ Svg: require('../../static/img/ocpp.svg').default, description: ( <> - ChargePi client uses Open Charging Point Protocol and implements basic functionality. - It is written in Golang, uses open source libraries and utilizes multithreading. + ChargePi client is written in Go and uses Open Charging Point Protocol (OCPP) for communication with the + Central System of your choice. It implements core functionalities (Boot, Start, Stop, Meter Values) and + Reservations. It is highly configurable and can be simply customized. ), }, @@ -29,8 +30,8 @@ const FeatureList = [ Svg: require('../../static/img/opensource.svg').default, description: ( <> - ChargePi uses open source software as a part of the Charging Point. Mender Over-the-Air upgrade service - as well as Graylog logging server are used to enable remote control and insight over the Charging Point. + ChargePi only uses open-source software. It can be used in combination with Mender Over-the-Air update + service and other services. ), }, { @@ -38,9 +39,9 @@ const FeatureList = [ Svg: require('../../static/img/golang.svg').default, description: ( <> - ChargePi client is written in Golang and uses open source software. We aim it to be well documented. - Using Graylog and Mender, it is easy to debug, fix, develop and deploy the client. You can also run the - client using Docker. + Check out the docs! We aim it to be well documented for people to build the Charge Point! It provides + remote and file log output options with context. It is easy to configure, debug, develop, deploy and + even customize the client. You're welcome to submit any contributions to GitHub. ), }, diff --git a/src/pages/index.js b/src/pages/index.js index 1cb1ca9..739ffdf 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -41,7 +41,7 @@ export default function Home() { return ( + description="⚑ChargePi is an open-source ⚑Charging PointπŸ”Œ project based on the Raspberry Pi.">