Commit 88a5cfea authored by Remo Zumsteg's avatar Remo Zumsteg

docs: cleanup

parent 7ad6e8bb
......@@ -14,6 +14,7 @@ sudo apt install git
```
Because both the server and the client are part of this monorepo, the next step is **recursively** cloning this repo under `~/hubscreen` on the RaspberryPi:
```sh
git clone https://git.panter.ch/rmo/hub-screen.git ~/hubscreen
```
......@@ -45,66 +46,47 @@ After executing the commands above, the flaschentaschen server should already be
To verify the correct setup of the flaschentaschen service, use `systemctl` and `journalctl` commands, such as `journalctl -u flaschentaschen.service` or `systemctl status flaschentaschen.service`.
### Setup default Python Client
The code of the python client is located at `./packages/client`. All following commands are executed in this directory.
First install python version 3.7 on the rapberry pi. The last time this documentation was updated, there was no pre-packaged python 3.7 for raspbian. Instead the following command is used to download the source of the required python version and build it locally:
First install the required python version and global python packages to run the hubscreen client:
```sh
~/hubscreen/packages/dependencies/build_install_python3.7.sh
# Install pip3:
sudo apt-get install python3-pip
# Install pipenv:
pip3 install --user pipenv
# pipenv will be installed to ~/.local/bin/pipenv.
# if you want to have it available in your shell, also execute following command:
echo "PATH=$PATH:~/.local/bin" >> ~/.bashrc
```
This might take a while, better grab a coffee after hitting the enter key. After it is done, verify the correct installation by executing `python3.7 --version`.
Before any python dependencies can be installed, some system dependencies have to be added first:
```sh
sudo apt install libgraphicsmagick++1-dev libboost-python-dev -y
```
Next activate the pipenv environement and install all dependencies (make sure your're at `~/hubscreen/packages/client`):
```sh
pipenv shell
pipenv install
pipenv install -v
```
This might take a while, better grab a coffee. If it seems to hang, it probably doesn't. Good measure is to use `htop` to check if any gcc/python process is still heavily working in the background.
To verify the setup, use the following command to start the client manually:
```sh
python src/main.py
```
If everything works, install the systemd service for the Hubscreen client using following commands:
```sh
sudo ./install_service.sh
```
To verify the correct setup of the hubscreen_client service, use `systemctl` and `journalctl` commands, such as `journalctl -u hubscreen_client.service` or `systemctl status hubscreen_client.service`.
Next install
## Setup Raspian
// TODO
## General
1. sudo apt-get update
2. install git: `apt-get install git`
3. create folder `~/hubscreen` (all following commands are executed in this directory)
## Setup ft-server
1. clone flaschen-taschen repo: `git clone --recursive https://github.com/hzeller/flaschen-taschen.git ft-server`
2. compile ft-server with `rgb-matrix` backend: `cd ft-server/server; make FT_BACKEND=rgb-matrix`
3. start the server: `sudo cd ft-server/server; ./ft-server --led-chain=10 --led-brightness=50 --led-slowdown-gpio=2 --led-no-hardware-pulse`
## Setup ft-client
1. Install pip: `sudo apt-get install python3-pip`
2. Install pipenv: `pip3 install --user pipenv`
3. add the following snippet to the bottom of `~/.bashrc`:
```sh
# hubscreen
PATH=$PATH:~/.local/bin # pipenv is installed here
sudo ./install_service.sh
```
4. clone hubscreen repo: `git clone https://git.panter.ch/rmo/hub-screen.git ft-client`
5. navigate to `packages/hubscreen-client`, where the ft-client client is located
6.
To verify the correct setup of the hubscreen_client service, use `systemctl` and `journalctl` commands, such as `journalctl -u hubscreen_client.service` or `systemctl status hubscreen_client.service`.
#!/usr/bin/env bash
sudo apt-get update -y
# install build dependencies:
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
# download source:
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
# extract to current folder:
tar xf Python-3.7.4.tar.xz
pushd Python-3.7.4
# configure and build python:
./configure
make -j 4
sudo make altinstall
# remove source folders
cd ..
sudo rm -r Python-3.7.0
rm Python-3.7.0.tar.xz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment