Commit 7ad6e8bb authored by support@panter.ch's avatar support@panter.ch

feat: setup and document hubscreen client service

parent 15712ad4
......@@ -53,6 +53,29 @@ First install python version 3.7 on the rapberry pi. The last time this document
```
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
```
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
......
[[source]]
url = "https://pypi.org/simple"
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "piwheels"
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
......
{
"_meta": {
"hash": {
"sha256": "3b42942c5967ad6fa1bd95507e896e8b50ca7e2cfe1c06723a6ca222db930e95"
"sha256": "62eff94b9e6600987ff216e1de1df2ea679c82a7e9dd854052063f06315728a0"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.5"
},
"sources": [
{
"name": "piwheels",
"url": "https://www.piwheels.org/simple",
"verify_ssl": true
},
{
"name": "pypi",
"url": "https://pypi.org/simple",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
......@@ -18,13 +23,15 @@
"default": {
"envparse": {
"hashes": [
"sha256:4f3b9a27bb55d27f124eb4adf006fec05e4588891c9a054a183a112645056eb7"
"sha256:4f3b9a27bb55d27f124eb4adf006fec05e4588891c9a054a183a112645056eb7",
"sha256:b50a6372c30ff2327c2b2126cafa99750b30503102b4e6c0c3574c1668f5eb3f"
],
"index": "pypi",
"version": "==0.2.0"
},
"graphqlclient": {
"hashes": [
"sha256:96ad5e2e13113a49333edb40634a6915a2612c51f69323876c0d6a7abb38f3ce",
"sha256:b3305f3df88c04839195754d409a49a2dc3adbcba4ebf9133b5663749e1dd92c"
],
"index": "pypi",
......@@ -41,7 +48,8 @@
},
"python-json-logger": {
"hashes": [
"sha256:b7a31162f2a01965a5efb94453ce69230ed208468b0bbc7fdfc56e6d8df2e281"
"sha256:b7a31162f2a01965a5efb94453ce69230ed208468b0bbc7fdfc56e6d8df2e281",
"sha256:d669ca39fa1e3dc289c30a80de07a7c33cabcd025bb45d054dcf1ff200e54226"
],
"index": "pypi",
"version": "==0.1.11"
......@@ -78,7 +86,8 @@
},
"autopep8": {
"hashes": [
"sha256:4d8eec30cc81bc5617dbf1218201d770dc35629363547f17577c61683ccfb3ee"
"sha256:4d8eec30cc81bc5617dbf1218201d770dc35629363547f17577c61683ccfb3ee",
"sha256:c89f04e9a613a5ade6edcea5206d242efdb2eb3a49db31c792357237c4db1c93"
],
"index": "pypi",
"version": "==1.4.4"
......@@ -101,6 +110,7 @@
"hashes": [
"sha256:159a745e61422217881c4de71f9eafd9d703b93af95618635849fe469a283661",
"sha256:23f63c0821cc96a23332e45dfaa83266feff8adc72b9bcaef86c202af765244f",
"sha256:39ada00bea330f16549afe95a072d7ece1c715e31a708feee0b27c3152319abb",
"sha256:3b11be575475db2e8a6e11215f5aa95b9ec14de658628776e10d96fa0b4dac13",
"sha256:3f447aff8bc61ca8b42b73304f6a44fa0d915487de144652816f950a3f1ab821",
"sha256:4ba73f6089cd9b9478bc0a4fa807b47dbdb8fad1d8f31a0f0a5dbf26a4527a71",
......@@ -110,11 +120,13 @@
"sha256:7c7f1ec07b227bdc561299fa2328e85000f90179a2f44ea30579d38e037cb3d4",
"sha256:7c8b1ba1e15c10b13cad4171cfa77f5bb5ec2580abc5a353907780805ebe158e",
"sha256:8559b94b823f85342e10d3d9ca4ba5478168e1ac5658a8a2f18c991ba9c52c20",
"sha256:a1dec3590a8e525f4e4687abc220ae0fc3ec7e6d53490defcb23b24b01c4e1ce",
"sha256:a262c7dfb046f00e12a2bdd1bafaed2408114a89ac414b0af8755c696eb3fc16",
"sha256:acce4e3267610c4fdb6632b3886fe3f2f7dd641158a843cf6b6a68e4ce81477b",
"sha256:be089bb6b83fac7f29d357b2dc4cf2b8eb8d98fe9d9ff89f9ea6012970a853c7",
"sha256:bfab710d859c779f273cc48fb86af38d6e9210f38287df0069a63e40b45a2f5c",
"sha256:c10d29019927301d524a22ced72706380de7cfc50f767217485a912b4c8bd82a",
"sha256:dcd53c06d8b3757c2d7f08501251ee31b6b876b5022f9b2e435eaf8ff409ec1e",
"sha256:dd6e2b598849b3d7aee2295ac765a578879830fb8966f70be8cd472e6069932e",
"sha256:e408f1eacc0a68fed0c08da45f31d0ebb38079f043328dce69ff133b95c29dc1"
],
......@@ -215,16 +227,19 @@
"sha256:262c247a82d005e43b5b7f69aff746370538e176131c32dda9cb0f324d27141e",
"sha256:2b907eb046d049bcd9892e3076c7a6456c93a25bebfe554e931620c90e6a25b0",
"sha256:354c16e5babd09f5cb0ee000d54cfa38401d8b8891eefa878ac772f827181a3c",
"sha256:3fe142e6c113dc390479a21f363464ddee2ae48d20f7ff23e41ac19465761c32",
"sha256:4e0b70c6fc4d010f8107726af5fd37921b666f5b31d9331f0bd24ad9a088e631",
"sha256:630968c5cdee51a11c05a30453f8cd65e0cc1d2ad0d9192819df9978984529f4",
"sha256:66480f95b8167c9c5c5c87f32cf437d585937970f3fc24386f313a4c97b44e34",
"sha256:71211d26ffd12d63a83e079ff258ac9d56a1376a25bc80b1cdcdf601b855b90b",
"sha256:95bd11af7eafc16e829af2d3df510cecfd4387f6453355188342c3e79a2ec87a",
"sha256:a9abe531ff65a6aeedb69d2475b15082470f2b4778b7d1bbb8108861bb3a004d",
"sha256:bc6c7d3fa1325a0c6613512a093bc2a2a15aeec350451cbdf9e1d4bffe3e3233",
"sha256:cc34a6f5b426748a507dd5d1de4c1978f2eb5626d51326e43280941206c209e1",
"sha256:d755f03c1e4a51e9b24d899561fec4ccaf51f210d52abdf8c07ee2849b212a36",
"sha256:d7c45933b1bdfaf9f36c579671fec15d25b06c8398f113dab64c18ed1adda01d",
"sha256:d896919306dd0aa22d0132f62a1b78d11aaf4c9fc5b3410d3c666b818191630a",
"sha256:f9aadde5abd3225e4d94a9fafe3ce6f15fe607b2305a989be7ab4b7938cd96d1",
"sha256:ffde2fbfad571af120fcbfbbc61c72469e72f550d676c3342492a9dfdefb8f12"
],
"markers": "implementation_name == 'cpython'",
......@@ -239,7 +254,10 @@
},
"wrapt": {
"hashes": [
"sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1"
"sha256:3cc636ecac1e47b68dd3af061afbb72dc26323043ac6a1b7199957c8073c4729",
"sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1",
"sha256:59bd7b6ebb54a9e4b161b40293a698c0e86c8b6b5afc5979fd4a745eed968b2e",
"sha256:af5a601a700645225582482151a9a1b927f2149c22a65ac3b2bb1fc06f7eb687"
],
"version": "==1.11.2"
},
......
[Unit]
Description=Default Hubscreen Client
After=network.target
After=flaschentaschen.service
[Service]
Type=simple
Restart=always
User=pi
WorkingDirectory=/home/pi/hubscreen/packages/client
ExecStart=/home/pi/.local/bin/pipenv run python /home/pi/hubscreen/packages/client/src/main.py
[Install]
WantedBy=multi-user.target
#!/usr/bin/env bash
# create symlink of service file in styemd unit directory:
ln -s /home/pi/hubscreen/packages/client/hubscreen_client.service /etc/systemd/system/hubscreen_client.service
# initially start service
systemctl start hubscreen_client
# enable service to restart after stystem reboot:
systemctl enable hubscreen_client
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