Skip to content

Commit 3262083

Browse files
committed
README/docs: General documentation improving
1 parent 5908113 commit 3262083

File tree

3 files changed

+57
-24
lines changed

3 files changed

+57
-24
lines changed

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,26 @@ It includes an iOS widget (using Scriptable) and a webpage for seeing current st
1414
### Setup for beginners
1515

1616
A quick heads-up beforehand: Setting this up for someone who has never set up a webserver before can be challenging.
17-
Don't worry though, the [beginners guide](docs/beginnerguide.md) tries to help you as much as possible and guides you through every step.
17+
Don't worry though, the [beginners guide](docs/beginnerguide.md) guides you through every step you need to take.
18+
Should you have any remaining questions or issues please see [getting help](https://github.com/robske110/IDDataLogger/wiki/Getting-help).
1819

1920
### Setup for advanced users
2021

21-
Prerequisites are:
22+
#### Prerequisites
23+
2224
- PHP 8 cli with pgsql (or mysql), curl, gd and dom
2325
- A webserver serving .php files (PHP 8 with pgsql (or mysql))
2426
- (strongly recommended) HTTPS enabled server with certificate
25-
- A postgresql server (Any version from 9 and up should work, although testing has only been done on 11 and up)
26-
- alternatively mysql / mariadb is supported (alternative db servers may also work)
27+
- A PostgreSQL server (Any version from 9 and up should work, although testing has only been done on 11 and up)
28+
- alternatively MySQL / MariaDB is supported, but PostgreSQL is recommended.
2729

28-
Clone this project.
30+
#### Overview of the setup process
2931

32+
Clone this repository.
33+
3034
`git clone https://github.com/robske110/IDDataLogger.git --recursive`
3135

32-
Create a database (and a user) in your postgresql (or other) server for this project and fill in the details into `config/config.example.json` and `.env.example.` We'll need these files later.
36+
Create a database (and a user) in your PostgreSQL (or other) server for this project and fill in the details into `config/config.example.json` and `.env.example.` We'll need these files later.
3337
You can do this using the config setup wizard by running the `config-wizard.sh` script, or manually.
3438
Note: for a detailed description of the possible config values visit [config.md](docs/config.md).
3539

@@ -53,11 +57,15 @@ After successful start you can now visit idView.php or use the iOS widget after
5357

5458
## Contributing
5559

56-
Contributions are always welcome! You can help to improve the documentation, fix bugs in the code or even add new features.
60+
Contributions are always welcome! You can help to improve the documentation, fix bugs in the code or add new features.
5761

5862
Creating a containerized version (for example docker and especially with letsencrypt/certbot support) or
5963
improving the beginners guide are currently something I would love to have help with. Feel free to open a PR!
6064

65+
### A big 'Thank you!' to the following contributors
66+
67+
- @drego83 - Invaluable help with general testing and MySQL support
68+
6169
## Disclaimer
6270

6371
This project is not endorsed by Volkswagen in any way, shape or form. This project is to be used entirely at your own risk.

docs/beginnerguide.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
11
# Setup Guide for beginners
22
Hi! You want to use this project, but have little to no experience setting up servers?
3-
Please free up a few hours for setting this project up.
3+
Please free up about an hour for setting this project up.
44

5-
Setting this project up is recommended on a raspberrypi for beginners. This guide assumes you are running on a raspberrypi.
6-
If you do not have a raspberrypi handy, any Debian installation will also work with the easy install scripts and this guide.
5+
Setting this project up is recommended on a Raspberry Pi for beginners. This guide assumes you are running raspbian.
6+
If you do not have a Raspberry Pi handy, any Debian installation will also work with the easy install scripts and this guide.
77

88
Before we begin, let's go through what this project needs and does from a technical overview standpoint:
99

1010
This project contains a long-running program which will fetch data from VW APIs regarding your car and store this data in a database.
1111
It also provides a website where you can view this data. Furthermore, it provides an API itself to quickly fetch the current car Status for displaying in, e.g. the iOS widget.
1212

13-
So we have three components: The long-running programm, the database and a webserver to serve you the stats website or the data for the iOS widget.
14-
All of this can run on a raspberrypi.
13+
So we have three components: The long-running programm, the database and a webserver to serve you the statistics website or the data for the iOS widget.
14+
All of this can run on a Raspberry Pi.
1515

1616
Let's get to work then.
1717

1818
## Prerequisites
1919
You'll need
20-
- a raspberrypi with an internet connection and raspbian installed (alternatively any machine with a debian installation works)
20+
- a Raspberry Pi with an internet connection and raspbian installed (alternatively any machine with a debian installation works)
2121
- a publicly routable IPv4 address if you want to use the widget and website from outside your home network (Some fibre plans for example do not include this)
2222

23-
We assume you have your raspberrypi freshly setup and have the command prompt in front of you.
23+
We assume you have your Raspberry Pi freshly setup and have the command prompt in front of you.
2424
There are plenty of guides on the internet on how to archive this.
2525

26-
You should see the following line: `pi@raspberrypi:~ $`
26+
You should see the following line: `pi@Raspberry Pi:~ $`
2727

28-
We strongly recommend changing your password on the raspberrypi to a reasonably strong one.
28+
We strongly recommend changing your password on the Raspberry Pi to a reasonably strong one.
2929

3030
Now you'll need to decide how you want to setup this project.
3131
There is a one-line command which attempts to install this project automagically, but if you prefer to do some things manually and learn some things in the process jump to this [section](#installing-manually).
3232

3333
## Installing using the install script
3434

3535
The install script works and is tested on raspbian and debian.
36-
It assumes you have a fresh OS, especially without any existing postgres or webserver installations.
36+
It assumes you have a fresh OS, especially without any existing PostgreSQL or webserver installations.
3737

3838
Enter (or copy) the following command to download and run the install script:
3939

4040
`wget https://raw.githubusercontent.com/robske110/IDDataLogger/master/docs/install.sh; bash install.sh; rm install.sh`
4141

4242
The install script will produce a lot of output. After a few minutes you will be prompted for your VW account login information.
4343
After you enter the information you should see `Installation complete, ...`.
44-
You can now enter `./start.sh`, which will start the ID DataLogger and help you create an API key for your widget and a user for the web interface.
44+
45+
You can now enter `cd ./IDDatalogger` followed by `./start.sh`, which will start the ID DataLogger and help you create an API key for your widget and a user for the web interface.
4546
For more information on setting up the iOS widget using the API key see [Setting up the iOS Widget](ioswidget.md).
4647

4748
After creating the API key and the user you should see `Done. Ready! Fetching car status...` and `Writing new data for timestamp`.
4849
This means you have successfully setup the ID DataLogger!
49-
Please shutdown the ID DataLogger using the key combination CTRL+C and reboot the raspberrypi using `systemctl reboot`
50+
Please shutdown the ID DataLogger using the key combination CTRL+C and reboot the Raspberry Pi using `systemctl reboot`.
5051

51-
You can now access the ID DataLogger by entering `IP/vwid` into your browser where `IP` is the ip or hostname of your raspberry or using the iOS widget.
52+
You can now access the ID DataLogger by entering `http://IP/vwid` into your browser where `IP` is the ip address or hostname of your raspberry or using the iOS widget.
5253

53-
To find the ip of your raspberrypi simply enter the command `hostname -I`
54+
To find the ip address of your Raspberry Pi simply enter the command `hostname -I`
5455

5556
If you want to view the website and have the iOS widget update outside your home network, please refer to [making the ID DataLogger available from the internet](#making-the-id-datalogger-available-from-the-internet).
5657

@@ -72,9 +73,11 @@ wget -q -O - https://packages.sury.org/php/README.txt | bash -s -
7273
sudo apt install php8.0
7374
```
7475
The first command will install a repository which contains the latest version of PHP.
75-
The second command will install php 8 and setup the webserver apache2.
76+
The second command will install php 8 and install and setup the webserver apache2.
7677
The last command we'll need to execute is
78+
7779
`sudo apt install postgresql`
80+
7881
This will install the PostgreSQL database. It will store our information about the car.
7982

8083
cd

docs/config.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Config
2+
3+
## config.json
4+
25
`username` The E-Mail Address used for your VW ID account
36

47
`password` The password used for your VW ID account
@@ -18,6 +21,8 @@ Can be `null`, which causes the first vehicle to be used. (Recommended when you
1821

1922
`db.password` The password for the database
2023

24+
`db.driver` The driver for the database. See https://www.php.net/manual/en/pdo.drivers.php for possible values.
25+
2126
`carpic.flip` Whether to flip the carpic (default: true)
2227

2328
The keys
@@ -35,10 +40,27 @@ can have the following values:
3540
| front | left |
3641
| front | right |
3742

38-
`timezone` Server timezone. This is used for correct timestamps in logs.
43+
Note: For changes to the carpic settings to apply, delete data/carPic.png
44+
45+
`timezone` Server timezone. This is used for correct timestamps in logs. (Overrides settings in php.ini)
3946

4047
`logging.debug-enable` Enables debug output
4148

4249
`logging.file-enable` Enables debug output
4350

44-
`logging.log-dir` The directory in which to store log files. Can be `null` for default directory. (`program_directory/log`)
51+
`logging.log-dir` The directory in which to store log files. Can be `null` for default directory (`program_directory/log`).
52+
53+
## .env file
54+
55+
`DB_HOST` The host of the postgres db server
56+
57+
`DB_NAME` The name of the database that this application can use
58+
59+
`DB_USER` The username for the database
60+
61+
`DB_PASSWORD` The password for the database
62+
63+
`DB_DRIVER` The driver for the database. See https://www.php.net/manual/en/pdo.drivers.php for possible values.
64+
65+
`FORCE_ALLOW_HTTP` Set this option to true to force the login system to allow http access.
66+
It is strongly recommended to omit this option whenever possible, especially on installations accessible over the internet.

0 commit comments

Comments
 (0)