Skip to content
linx25 edited this page Sep 18, 2021 · 10 revisions

SystaPi install without dnsmasq:

This allow you to use the S-touch app together with the SystaPi server

Configure your DNS

The DNS Name paradigma.remoteportal.de must point to the device where the exporter is running.

Check on windows:

If you are on a windows machine, open CMD and enter nslookup paradigma.remoteportal.de the iP should be the one from your Systapiserver device

Windows / manual installation

  1. Install Raspberry Pi OS following this guide. Raspberry Raspberry Pi OS Lite is sufficient.

  2. Make sure that the boot-partition of the Micro SD card is accessible via file explorer

  3. Enable SSH In the boot volume, create a file without an extension and name it ssh.

    On Windows, right-click anywhere in the boot volume’s white space and select New > Text Document. Delete the .txt extension before you hit Enter. If Windows Explorer on your computer does not show file extensions, click View and enable File name extensions in the menu bar.

  4. Download SystaPi

  5. Copy the SystaRESTServer folder and all of its content to the boot-partition.

  6. adjust the follwowing file in the folder SystaRESTServer/bin/SystaREST.properties

    Don't use the default notepad to edit the file USE Notepad++

    RESTAPI_INTERFACE=wlan0 have to be adjusted to RESTAPI_INTERFACE=eth0

    from

    RESTAPI_INTERFACE=wlan0
    #RESTAPI_PORT should be greater than 1024. Only root can open lower port numbers 
    RESTAPI_PORT=1337
    PARADIGMA_INTERFACE=eth0

    to

    RESTAPI_INTERFACE=eth0
    #RESTAPI_PORT should be greater than 1024. Only root can open lower port numbers 
    RESTAPI_PORT=1337
    PARADIGMA_INTERFACE=eth0

Raspberry OS /SSH

Connect to the Raspberry via SSH

Default credentials of Raspbain:

User: pi and Password: raspberry

  1. set hostname and expand root partition

    open the PI’s configuration screen (in the terminal window) by typing:

    sudo raspi-config

    1 SystemOptions

    S4 Hostname

    set hostname SystaPi

    6 advanced Options

    A1 Expand Filesystem

    click:

    Finish

    select ‘YES‘ when it asks for a reboot

  2. reconnect via ssh and updating the system

    updating the system
    sudo apt update
    sudo apt full-upgrade -y
    
    echo "remove autoinstalled packages" 
    sudo apt -y autoremove
  3. install OpenJDK build from Azul for Pi Zero (ARM 32-bit HF v6)

    sudo mkdir /usr/lib/jvm
    cd /usr/lib/jvm
    sudo wget https://cdn.azul.com/zulu-embedded/bin/zulu11.48.21-ca-jdk11.0.11-linux_aarch32hf.tar.gz
    sudo tar -xzvf zulu11.48.21-ca-jdk11.0.11-linux_aarch32hf.tar.gz 
    sudo rm zulu11.48.21-ca-jdk11.0.11-linux_aarch32hf.tar.gz
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/zulu11.48.21-ca-jdk11.0.11-linux_aarch32hf/bin/java 1
    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/zulu11.48.21-ca-jdk11.0.11-linux_aarch32hf/bin/javac 1
  4. move SystaRESTServer from /boot to /home/pi

    sudo mv /boot/SystaRESTServer /home/pi/
    sudo chown -R pi:pi /home/pi/SystaRESTServer
  5. create service file /etc/systemd/system/SystaRESTServer.service

    sudo nano /etc/systemd/system/SystaRESTServer.service

    instert the following text:

    [Unit]
    Description=Systa REST API Server
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    Type=simple
    User=pi
    WorkingDirectory=/home/pi/SystaRESTServer
    ExecStart=/usr/bin/java -Dfile.encoding=UTF-8 -classpath /home/pi/SystaRESTServer/bin:/home/pi/SystaRESTServer/lib/* de.freaklamarsch.systarest.SystaRESTServer
    Restart=on-failure
    RestartSec=30s
    
    [Install]
    WantedBy=multi-user.target
    

    Save the file with STRG + o and ENTER

  6. reload services and enable SystaRESTServer.service

    sudo systemctl --system daemon-reload

    #enable service

    sudo systemctl enable SystaRESTServer

Windows/WebBrowser: Test if the service is available

open this URL http://systapi:1337/SystaREST/status in a browser (or use the ip instead of systapi)