Skip to content

Commit 4ab0820

Browse files
authored
Updated docs (#4)
1 parent a6d7886 commit 4ab0820

File tree

9 files changed

+57
-54
lines changed

9 files changed

+57
-54
lines changed

docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ services:
55
context: .
66
target: website
77
volumes:
8-
- ./build/:/usr/share/nginx/html/
98
- ./nginx.conf:/etc/nginx/nginx.conf
109
labels:
1110
- "traefik.enable=true"

docs-hardware/hardware.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The pinout will also vary depending on your preferred communication protocol. Th
3939

4040
| Display | Is supported |
4141
| :---: | :---: |
42-
| HD44780 | Yes |
42+
| HD44780 | |
4343

4444
#### HD44780
4545

@@ -82,7 +82,7 @@ It is highly recommended splitting both GND and VCC between relays or using a re
8282

8383
| Power meter | Is supported |
8484
| :---: | :---: |
85-
| CS5460A | Yes |
85+
| CS5460A | |
8686

8787
#### CS5460A
8888

@@ -99,8 +99,8 @@ It is highly recommended splitting both GND and VCC between relays or using a re
9999

100100
| Indicator | Is supported |
101101
| :---: | :---: |
102-
| WS2812b | Yes |
103-
| WS2811 | Yes |
102+
| WS2812b | |
103+
| WS2811 | |
104104

105105
#### WS2811 and WS2812b
106106

docs-services/graylog.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ sidebar_position: 1
66

77
## Prerequisites
88

9-
You should have a publicly accessible Linux or Windows server with Docker and docker-compose installed.
10-
11-
See [Docker](https://docs.docker.com/engine/install/)
12-
and [docker-compose installation](https://docs.docker.com/compose/install/)
9+
You should have a publicly accessible Linux or Windows server with Docker and docker-compose installed. Check
10+
out [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/)
1311
for installation guides.
1412

1513
## Running Graylog server with docker-compose
1614

17-
1. Copy the following code into docker-compose.yaml. If cloning from GitHub, the docker-compose should be in the
18-
_docs/services_ folder. There are two docker-compose files; the first one is the base and the second one uses Traefik
15+
1. Copy the following code into a docker-compose.yaml or use the
16+
provided [docker-compose](https://github.com/xBlaz3kx/ChargePi-go/blob/main/docs/services/docker-compose.yaml). There
17+
are two docker-compose files - the first one is the base and the second one uses [Traefik](https://traefik.io/) as a
1918
reverse proxy for routing.
2019

2120
```yaml
@@ -71,8 +70,16 @@ volumes:
7170
driver: local
7271
```
7372
74-
2. Run using:
73+
2. Change the `GRAYLOG_ROOT_PASSWORD_SHA2` as well as the external `GRAYLOG_HTTP_EXTERNAL_URI` environment variable.
74+
75+
3. Run using:
76+
77+
```bash
78+
sudo docker-compose up -d
79+
```
80+
81+
or
7582

76-
```bash
77-
sudo docker-compose up -d
78-
```
83+
```bash
84+
sudo docker-compose -f docker-compose.yaml -f docker-compose.traefik.yaml up -d
85+
```

docs-services/mender.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,37 @@ sidebar_position: 1
44

55
# Charging station with Mender
66

7-
We will use [Mender](https://mender.io/) as OTA service for updating Linux, Docker and the client. For the OCPP
8-
server/central system, we will use **[SteVe](https://github.com/RWTH-i5-IDSG/steve)**.
7+
We will use [Mender](https://mender.io/) as OTA service for updating Linux, Docker and the client.
98

109
1. Sign up on Mender. If you want, host a Mender server yourself.
1110
2. Follow this guide
1211
for [installing Mender on the Pi](https://docs.mender.io/get-started/preparation/prepare-a-raspberry-pi-device).
1312
3. Add the Raspberry to the Devices list and test if Mender works.
14-
4. Clone the SteVe repository to ChargePi/. It should automatically create steve folder.
15-
*Skip this step if you do not want the server to be hosted on the same machine. Mostly used for testing purposes.*
16-
5. If you do not wish to automatically update the OCPP client, change this label to false in **docker-compose.yaml**:
13+
4. If you do not wish to automatically update the OCPP client, change this label to false in **docker-compose.yaml**:
1714

18-
```yaml
19-
chargepi:
20-
label:
21-
- com.centurylinklabs.watchtower.enable="false"
22-
```
23-
24-
**Not recommended when using Mender, since you can update the images with Mender.**
15+
```yaml
16+
#Not recommended when using Mender, since you can update the images with Mender.
17+
chargepi:
18+
label:
19+
- com.centurylinklabs.watchtower.enable="false"
20+
#...
21+
```
2522

2623
6. Run docker-compose:
2724

2825
```bash
2926
docker-compose up -d
3027
```
3128

32-
* Optionally, you can run only the client service:
33-
34-
```bash
35-
docker-compose up -d chargepi
36-
```
29+
Optionally, you can run only the client service:
30+
31+
```bash
32+
docker-compose up -d chargepi
33+
```
3734

3835
## Helpful references
3936

4037
- [Installing Docker on Pi](https://www.docker.com/blog/happy-pi-day-docker-raspberry-pi/)
4138
- [Watchtower](https://github.com/containrrr/watchtower)
4239
- [Docker](https://docs.docker.com/)
43-
- [Mender docs](https://docs.mender.io/get-started/preparation/prepare-a-raspberry-pi-device)
40+
- [Mender docs](https://docs.mender.io/get-started/preparation/prepare-a-raspberry-pi-device)s.mender.io/get-started/preparation/prepare-a-raspberry-pi-device)

docs/go-client/adding-support-for-hardware.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ necessary logic that returns a pointer to the struct.
2424
The settings of the reader are read from the `settings` file, which is stored in the cache and are available in the
2525
NewTagReader method.
2626

27-
```golang
27+
```go
2828
package reader
2929

3030
const (
@@ -64,7 +64,7 @@ after the model of the display/LCD in the `hardware/display` package. Then you s
6464
the **model** of the display in the `display` file in the package and add a switch case with the implementation and the
6565
necessary logic that returns a pointer to the struct.
6666

67-
```golang
67+
```go
6868
package display
6969

7070
const (
@@ -113,7 +113,7 @@ func NewDisplay() LCD {
113113

114114
The process is the same as the previous description.
115115

116-
```golang
116+
```go
117117
package indicator
118118

119119
const (
@@ -150,7 +150,7 @@ func NewIndicator(stripLength int) Indicator {
150150

151151
The process is the same as the previous description.
152152

153-
```golang
153+
```go
154154
package power_meter
155155

156156
const (

docs/go-client/running-the-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Alternatively, you can run the client, SteVe server and Watchtower on the same P
6666
The **[Watchtower](https://github.com/containrrr/watchtower)** service will automatically pull the newest image and run
6767
it when it is available.
6868

69-
1. Change the IP address under __serverUri__ in the settings file to **172.0.1.121**.
69+
1. Change the IP address under `serverUri` in the settings file to **172.0.1.121**.
7070

7171
2. Build services:
7272

docs/intro.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ sidebar_position: 1
44

55
# Getting Started
66

7-
ChargePi can be deployed/run in multiple ways:
7+
ChargePi client can be deployed/run in multiple ways:
88

99
- standalone
10-
- Docker by building the image and running the container
11-
- Docker-compose to be deployed with SteVe Central System and Watchtower (**recommended for testing only**)
10+
- Docker 🐳 by building the image and running the container
11+
- Docker-compose to be deployed with SteVe Central System and Watchtower (**recommended for dev/testing only**)
1212
- Docker-compose by running the client
1313

1414
## Charging station specifications
1515

1616
| Protocol implementation | Core functionalities | Offline charging | Local authorization | Charging profiles |
1717
| :---: | :---: | :---: |:---: | :---: |
18-
| OCPP 1.6 JSON/WS | Yes | Yes | Yes | No |
19-
| OCPP 2.0.1 JSON/WS | Will be implemented | Will be implemented | Will be implemented | No |
18+
| OCPP 1.6 JSON/WS | ✔️ | ✔️ | ✔️ | |
19+
| OCPP 2.0.1 JSON/WS | Will be implemented | Will be implemented | Will be implemented | |
2020

2121
## Initial setup
2222

@@ -30,11 +30,10 @@ ChargePi can be deployed/run in multiple ways:
3030
git clone https://github.com/RWTH-i5-IDSG/steve
3131
```
3232

33-
*_When cloning Steve from GitHub, steve directory should be automatically generated._
34-
Replace SteVe's default Dockerfile with Dockerfile provided in ChargePi/steve/Dockerfile to run on Raspberry Pi.
33+
> Replace SteVe's Dockerfile with the one provided in order to run it on the Raspberry Pi.
3534
36-
3. Configure the settings files according to the hardware and desired functionality. Check the docs/configuration folder
37-
for configuration instructions.
35+
3. Configure the settings files according to the hardware and desired functionality with
36+
the [guide](#configuration-and-settings).
3837

3938
4. Build the underlying libraries.
4039

@@ -43,13 +42,13 @@ ChargePi can be deployed/run in multiple ways:
4342
### Configuration and settings
4443

4544
To configure the ChargePi client, check out the [**configuration for Go**](go-client/configuration) or
46-
[**configuration for Python**](python-client/py-configuration). Client comes with predefined settings which require minimal
47-
configuration.
45+
[**configuration for Python**](python-client/py-configuration). Client comes with predefined settings which require
46+
minimal configuration.
4847

4948
## Graylog logging server
5049

5150
ChargePi uses [Graylog](https://www.graylog.org/) logging server for remote logging, so a server should be up and
5251
running if you want the logs to be stored. Logs are sent through GELF UDP protocol.
5352

54-
Configure the **"logServer"** property in the `settings` file with your server IP/domain name with the port.
55-
Setting up the logging server is described in the services section.
53+
Configure the **"logServer"** property in the `settings` file with your server IP/domain name with the port. Setting up
54+
the logging server is described in the services section.

docs/ocpp/ocpp-16.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ sidebar_position: 1
44

55
# OCPP 1.6
66

7-
Configuration for protocol version 1.6 can be found in the `configuration` file.
7+
The default/reference configuration for protocol version 1.6 can be found in the `configuration` file.
88

99
Each OCPP 1.6 configuration variable is represented as a dictionary with key equal to **variable name**, the **value**
10-
and
11-
**permission** attributes. For more information regarding OCPP 1.6 configuration,
10+
and **permission** attributes. For more information regarding OCPP 1.6 configuration,
1211
visit [the official docs](https://www.oasis-open.org/committees/download.php/58944/ocpp-1.6.pdf).
1312

1413
```json

docs/ocpp/ocpp-201.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ sidebar_position: 2
66

77
Configuration for protocol version 2.0.1 can be found in _/charge_point/v201/configuration/configuration.json_.
88

9+
> Note: not available for the Go client (yet).
10+
911
In the protocol version 2.0.1, configuration variables are nested in Controllers (postfix - Ctrlr). Each controller has
1012
variables represented as a dictionary with attributes: **readOnly**, **value** and _optionally_ **unit**. Some
1113
controllers aren't completely supported. For more information regarding OCPP 2.0.1 configuration,

0 commit comments

Comments
 (0)