Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
wetter:boltek:stormforce_xr_c7 [09.01.2017 16:58. ] – [Server Konfigurationsdatei bearbeiten] djangowetter:boltek:stormforce_xr_c7 [22.07.2019 14:46. ] django
Zeile 459: Zeile 459:
 </code> </code>
  
 +==== Server ====
 Gemäß der **//README//** aus dem aktuellen **//stormforce-xr//** Paket installieren wir nun für die Server-Komponente von Stormforce-XR die benötigten Pakete nach. Gemäß der **//README//** aus dem aktuellen **//stormforce-xr//** Paket installieren wir nun für die Server-Komponente von Stormforce-XR die benötigten Pakete nach.
    # yum install python-twisted-core python-twisted-web pyserial python-psycopg2    # yum install python-twisted-core python-twisted-web pyserial python-psycopg2
 +
 +==== Client ====
 +Für den Stormforce-XR Client wir das Python Paket **pygame** benötigt. Leider gibt es weder im originalen CentOS Repository, noch im  Repository **EPEL** ein passendes RPM. Abhilfe schafft hier das **Nux Dextop Repository**, welches wir nun kurzer Hand in unser System einbinden werden.
 +
 +Zunächst importieren wir den PGP-Key mit dem die Pakete des **Nux Dextop Repositories** signiert wurden.
 +   # rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
 +
 +Anschliessend binden wir das **Nux Dextop Repo** auf unserem Server ein.
 +   # yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
 +
 +Zu guter Letzt installieren wir das Python Paket **pygame**.
 +   # yum install pygame -y
 +
  
 ===== PostgreSQL-Datenbank ===== ===== PostgreSQL-Datenbank =====
Zeile 1664: Zeile 1678:
 Der Port **7397** wird von dem Python Programm**stormforce-xr** gehalten. Der postgresql-Datenbanl-server selbst lauscht auf Port **5432** auf **localhost**. Der Port **7397** wird von dem Python Programm**stormforce-xr** gehalten. Der postgresql-Datenbanl-server selbst lauscht auf Port **5432** auf **localhost**.
  
 +=== systemd service files ===
 +Da wir den Stormforce-XR Server später nicht manuell starten wollen, sondern über den Systemd-Daemon **systemd** benötgen wir noch eine passende Service-Datei. Diese legen wir uns nun im Verzeichnis //**/etc/systemd/system/**// an.
 +   # vim /etc/systemd/system/stormforce-xr.service
  
 +<file bash /etc/systemd/system/stormforce-xr.service>[Unit]
 +Description=Stormforce XR Server Daemo
 +After=postgresql.service
  
-http://li.nux.ro/download/nux/dextop/el7/x86_64//pygame-1.9.1-15.el7.nux.x86_64.rpm+[Service] 
 +ExecStart=/usr/bin/python /usr/local/src/stormforce-xr/sxr_server.py 
 +#Restart=on-abort 
 + 
 +[Install] 
 +WantedBy=multi-user.target</file> 
 + 
 +Damit der Stormforce-XR Daemon die Konfigurationsdatei lesen und die Backup-Datei anlegen kann, müssen wir das Ser ver-script unserer umgebung anpassen. Unser Stormforce-XR Installationsverzeichnis lautet //**/usr/local/src/stormforce-xr/**//. Diesen Pfad hinterlegen wir nun im Startscript des Servers. In Zeile __**665**__ finden wir den Eintrag ''self.XML_SETTINGS_FILE = "sxrserver-settings.xml"''; Diesen erweitern wir nun um das vollständige Verzeichnis **/usr/local/src/stormforce-xr/**. Die Zeile lautet also nunmehr. ''self.XML_SETTINGS_FILE = "/usr/local/src/stormforce-xr/sxrserver-settings.xml"'' 
 +   # vim /usr/local/src/stormforce-xr/sxr_server.py 
 + 
 +<code>... 
 + 
 +                 self.XML_SETTINGS_FILE = "/usr/local/src/stormforce-xr/sxrserver-settings.xml" 
 + 
 +...</code> 
 + 
 +Nun können wir unseren Stormforce-Xr Daemon mit Hilfe von systemd starten. 
 +   # systemctl start stormforce-xr.service 
 + 
 +Damit der Deamon beim Neustart des Servers gleich mitgestartet wird, enablen wir noch den Autostart von stormforce-xr. 
 +   # systemctl enable stormforce-xr.service 
 + 
 +  Created symlink from /etc/systemd/system/multi-user.target.wants/stormforce-xr.service to /etc/systemd/system/stormforce-xr.service. 
 + 
 +Den Serverstatus können wir wie gewohnt abfragen. 
 +   # systemctl status stormforce-xr.service 
 + 
 +<html><pre class="code"> 
 +<font style="colorrgb(0, 255, 0)"><b>● </b></font><font style="color: rgb(0, 0, 0)">stormforce-xr.service - Stormforce XR Server Daemo 
 +   Loaded: loaded (/etc/systemd/system/stormforce-xr.service; disabled; vendor preset: disabled) 
 +   Active: <font style="color: rgb(0, 255, 0)"><b>active (running) </b></font><font style="color: rgb(0, 0, 0)"> since Mon 2017-01-09 18:52:46 CET; 5s ago 
 + Main PID: 22791 (python) 
 +   CGroup: /system.slice/stormforce-xr.service 
 +           └─22791 /usr/bin/python /usr/local/src/stormforce-xr/sxr_server.py 
 + 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      # 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   # 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: ######################################################################### 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]:  
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: 09/01/2017 18:52:48.157567/XRXMLRPCFunctions/__init__()/Info  - DanLog has been initialised. 
 +Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: 09/01/2017 18:52:48.158415/SXR/main()/Info  - Starting server...</font> 
 +</pre></html> 
 + 
 +==== Client ==== 
 +=== erster manueller Start === 
 +Nachdem unser **stormforce-xr Server** installiert und konfiguriert ist und erfolgreich läuft, können wir nun das erste mal den Stormforce-XR-Client starten. Hierzu öffnen wir, nachdem wir uns an der laufenden X-Session angemeldet haben, ein Shell-Fenster, wechseln in das Installationsverzeichnis und starten den Client mit ''python sxr_server.py''.  
 +   $ cd /usr/local/src/stormforce-xr 
 +   $ python sxr_server.py 
 + 
 +<html><pre class="code"> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.766556</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>Main</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- Displaying license for DanLog...</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.772555</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>Main</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>-  
 +######################################################################### 
 +# Copyright/License Notice (BSD License)                                # 
 +######################################################################### 
 +######################################################################### 
 +# Copyright (c) 2012-2014, Daniel Knaggs                                # 
 +# All rights reserved.                                                  # 
 +#                                                                       # 
 +# Redistribution and use in source and binary forms, with or without    # 
 +# modification, are permitted provided that the following conditions    # 
 +# are met: -                                                            # 
 +#                                                                       # 
 +#   * Redistributions of source code must retain the above copyright    # 
 +#     notice, this list of conditions and the following disclaimer.     # 
 +#                                                                       # 
 +#   * Redistributions in binary form must reproduce the above copyright # 
 +#     notice, this list of conditions and the following disclaimer in   # 
 +#     the documentation and/or other materials provided with the        # 
 +#     distribution.                                                     # 
 +#                                                                       # 
 +#   * Neither the name of the author nor the names of its contributors 
 +#     may be used to endorse or promote products derived from this      # 
 +#     software without specific prior written permission.               # 
 +#                                                                       # 
 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   # 
 +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     # 
 +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # 
 +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # 
 +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      # 
 +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # 
 +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # 
 +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   # 
 +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # 
 +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 +######################################################################### 
 +</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.773321</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>Main</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- DanLog has been initialised.</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.774004</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>Main</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>info()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- Prepearing...</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.813491</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- Displaying license for DanLog...</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.814349</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- </b></font> 
 +######################################################################### 
 +# Copyright/License Notice (BSD License)                                # 
 +######################################################################### 
 +######################################################################### 
 +# Copyright (c) 2012-2014, Daniel Knaggs                                # 
 +# All rights reserved.                                                  # 
 +#                                                                       # 
 +# Redistribution and use in source and binary forms, with or without    # 
 +# modification, are permitted provided that the following conditions    # 
 +# are met: -                                                            # 
 +#                                                                       # 
 +#   * Redistributions of source code must retain the above copyright    # 
 +#     notice, this list of conditions and the following disclaimer.     # 
 +#                                                                       # 
 +#   * Redistributions in binary form must reproduce the above copyright # 
 +#     notice, this list of conditions and the following disclaimer in   # 
 +#     the documentation and/or other materials provided with the        # 
 +#     distribution.                                                     # 
 +#                                                                       # 
 +#   * Neither the name of the author nor the names of its contributors 
 +#     may be used to endorse or promote products derived from this      # 
 +#     software without specific prior written permission.               # 
 +#                                                                       # 
 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   # 
 +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     # 
 +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # 
 +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # 
 +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      # 
 +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # 
 +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # 
 +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   # 
 +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # 
 +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 +######################################################################### 
 + 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.815258</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- DanLog has been initialised.</b></font> 
 + 
 +######################################################################### 
 +# Copyright/License Notice (Modified BSD License)                       # 
 +######################################################################### 
 +######################################################################### 
 +# Copyright (c) 2008-2012, 2014, Daniel Knaggs - 2E0DPK/M6DPK           # 
 +# All rights reserved.                                                  # 
 +#                                                                       # 
 +# Redistribution and use in source and binary forms, with or without    # 
 +# modification, are permitted provided that the following conditions    # 
 +# are met: -                                                            # 
 +#                                                                       # 
 +#   * Redistributions of source code must retain the above copyright    # 
 +#     notice, this list of conditions and the following disclaimer.     # 
 +#                                                                       # 
 +#   * Redistributions in binary form must reproduce the above copyright # 
 +#     notice, this list of conditions and the following disclaimer in   # 
 +#     the documentation and/or other materials provided with the        # 
 +#     distribution.                                                     # 
 +#                                                                       # 
 +#   * Neither the name of the author nor the names of its contributors 
 +#     may be used to endorse or promote products derived from this      # 
 +#     software without specific prior written permission.               # 
 +#                                                                       # 
 +#   * This Software is not to be used for safety purposes.              # 
 +#                                                                       # 
 +#   * You agree and abide the Disclaimer for your Boltek products.      # 
 +#                                                                       # 
 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   # 
 +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     # 
 +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # 
 +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # 
 +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      # 
 +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # 
 +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # 
 +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   # 
 +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # 
 +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 +######################################################################### 
 + 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.816056</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- </b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.816672</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- StormForce XR - Client</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.817369</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- ======================</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.818004</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- Checking settings...</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.818641</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(252, 233, 79"><b>Warn  </b></font><font style="color: rgb(0, 0, 0)"><b>- The XML settings file doesn't exist, create one...</b></font> 
 +<font style="color: rgb(69, 71, 67)"><b>09/01/2017 19:12:45.820399</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(150, 110, 146)"><b>SXRClient</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(42, 181, 181)"><b>__init__()</b></font><font style="color: rgb(0, 0, 0)">/</font><font style="color: rgb(130, 213, 49"><b>Info  </b></font><font style="color: rgb(0, 0, 0)"><b>- The XML settings file has been created using the default settings.  Please edit it and restart the SXR client once you're happy with the settings.</b></font> 
 +</pre></html> 
 + 
 +=== Client Konfigurationsdatei bearbeiten === 
 +Das Programm hat uns freundlich daraufhin gewiesen, dass wir nun noch die **Client-XML**-Konfigurationsdatei //**/usr/local/src/stormforce-xr/sxrclient-settings.xml**// bearbeiten müssen. 
 + 
 +   # vim /usr/local/src/stormforce-xr/sxrclient-settings.xml 
 +<file xml /usr/local/src/stormforce-xr/sxrclient-settings.xml><?xml version="1.0" ?> 
 +<SXRClient> 
 +        <Setting StormForceXRServer="http://127.0.0.1:7397/xmlrpc/"/> 
 +        <Setting DemoMode="False"/> 
 +        <Setting StrikeShape="1"/> 
 +        <Setting ShowCrosshair="True"/> 
 +        <Setting ShowRangeCircles="False"/> 
 +        <Setting UpdatePeriodCapture="15.0"/> 
 +        <Setting UpdatePeriodCurrentTime="1.0"/> 
 +        <Setting UpdatePeriodEFM100="5.0"/> 
 +        <Setting UpdatePeriodGraphs="60.0"/> 
 +        <Setting UpdatePeriodLD250="2.0"/> 
 +        <Setting UpdatePeriodStrikes="15.0"/> 
 +        <Setting DebugMode="False"/> 
 +</SXRClient> 
 +</file> 
 + 
 +Starten wir nun erneut unseren Client wird uns der erste Startbildschirm des StormForce XR Clients präsentiert. 
 + 
 +{{ :wetter:boltek:stormforce-rx-client-01.png?direct&800 |Bild: Stormforce-XR Client}} 
 + 
 + 
 +Mit der Taste "**Q**" können wir das Programm wieder beenden. 
 + 
 + 
 +=== Startscript für Programmstart === 
 +Für den Programmstart des Client erstellen wir uns erst einmal ein rudimentäres Shellscript, mit Hilfe dessen wir den Client später starten können. 
 + 
 +   # vim /usr/local/bin/stormforce.sh 
 +<file bash /usr/local/bin/stormforce.sh>#!/bin/sh 
 +# Django : 2012-05-03  
 +# Schellscript zum vereinfachten Starten des StormForce Clients 
 + 
 +cd /usr/local/src/stormforce-xr 
 +python sxr_client.py 
 +</file> 
 + 
 +Zum Starten statten wir das Script nun noch mit den **x**-Dateirechten aus. 
 +   # chmod +x /usr/local/bin/stormforce.sh 
 + 
 +=== Starter anlegen === 
 +Zum Starten von Stormforce legen wir uns am Desktop einen entsprechenden Starter an. Das Icon => {{:ws:stormforce.png}} Legen wir am besten unter **/usr/share/pixmaps/** ab. 
 + 
 +  * **Typ** : Anwendung 
 +  * **Name** : StormForce XR 
 +  * **Befehl** : /usr/local/bin/stormforce.sh 
 +  * **Kommentar** : Visualisierung des Boltek LD-250 mit StormForce XR 
 + 
 +=== Kartenhintergrund === 
 +Einen passenden Kartenhintergrund können wir uns entweder über das [[http://www.openstreetmap.org|freie Kartenprojekt von Openstreetmap]], bei den [[http://earthobservatory.nasa.gov/Features/BlueMarble/|Blue Marble Satellitenbilder der NASA]], oder  
 +mit Hilfe des [[http://www.primap.com/de/index.html|MapCreator 2.0 von primap]] erstellen. Genau in der Reihenfolge bin ich vorgegangen, bei letzterem bin ich dann auf Grund er schnellen, einfachen und guten Ergebnisse hängen geblieben. 
 + 
 +{{ :ws:blitzkarte_mit_ort_und_namen.png?400 }} 
 + 
 +Die Karte hat eine Größe von 600 x 600 Pixel, mit dem Standort in der Bildmitte. Die Karte selbst hat dabei eine Ausdehnung (Radius um den Standort) von 300 Meilen bzw. ca. 480 Kilometer. 
 + 
 +Unsere eigene neue Karte speichern wir dann als **//map-300.png//** im Verzeichnis **//png//** ab. 
 +   #  ll /usr/local/src/stormforce/png/ 
 +   -rw-r--r-- 1 root root 362544 28. Sep 11:36 map-300.png 
 + 
 +{{ :wetter:boltek:stormforce-rx-client-02.png?direct&800 |Bild: Stromforce-XR mit individuellem Kartenhintergrund}} 
 + 
 +=== storm2web.sh === 
 +Zum Kopieren unserer, von Stormforce alle 10 Sekunden akutalisierten, Bildschirmhardcopy auf unseren Webserver, legen wir ein kleines Shellscript an: 
 +   # vim /usr/local/bin/storm2web.sh 
 + 
 +<file bash /usr/local/bin/storm2web.sh>#!/bin/sh  
 +# Script zum "Hochladen" der Strormforce-Bilder auf den Webserver der NSS 
 +# zur Weiterleitung an den virtuellen Host "Webcam" 
 +# (c) Michael Nausch  
 +# Version 0.01: 2008-12-29 
 +#         0.02: 2009-11-07 
 +#         0.03: 2012-05-04 
 +#         0.04: 2013-02-16 
 +#         0.05: 2014-01-06 
 +#         0.06: 2017-01-09 
 + 
 +QUELLE="/usr/local/src/stormforce-xr/capture/stormforce-xr.png" 
 +ZIEL="10.0.0.20:/usr/local/var/wview/img/" 
 +QUELLE2="/tmp/stormforce_small.png" 
 + 
 +convert -geometry 280x183 $QUELLE $QUELLE2 
 +rsync -av $QUELLE $ZIEL"stormforce_2.png" 
 +rsync -av $QUELLE2 $ZIEL"stormforce_small.png" 
 +</file>
  
-# yum install python-pyglet+Anschliessend versehen wir unser kleines shell-script noch mit dem **"X"-Rechten**. 
 +   # chmod +x /usr/local/bin/storm2web.sh
  
 +In der **crontab** unseres Wetterusers hinterlegen wir nun eine Konfigurationszeile, damit das Script einmal pro Minute ausgeführt werden kann. 
 +   $ crontab -e
  
 +<code># Django : 2017-01-09 - Alle 60 Sekunden das Stormforce-Bild auf den Webserver kopieren
 +*/1 * * * * /usr/local/bin/storm2web.sh</code>
  
 +====== Links ======
 +  * **[[wetter:start|Zurück zum Kapitel >>Wetterbeobachtung und -datenerfassung bei der Wetterstation Pliening<<]]**
 +  * **[[wiki:start|Zurück zu >>Projekte und Themenkapitel<<]]**
 +  * **[[http://dokuwiki.nausch.org/doku.php/|Zurück zur Startseite]]**
  
  
  
  • wetter/boltek/stormforce_xr_c7.txt
  • Zuletzt geändert: 31.10.2023 18:40.
  • von 127.0.0.1