Ankündigung

Einklappen
Keine Ankündigung bisher.

RPI3 - Jessie Lite - KNXD - Linknx - CometVisu - Image

Einklappen
Dieses Thema ist geschlossen.
X
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    RPI3 - Jessie Lite - KNXD - Linknx - CometVisu - Image

    unter Downloads hier im Forum bitte nach "RPI3 Image" schauen...

    Vorab: die gesamte Installation erfolgte auf ein 15GB micro SD. Ich habs ge-shrinkt, danach mit Win32DiskImager auf ne SD Card aufgespielt und erfolgreich getestet
    - das Image ist mit 7-zip gepackt. Entpackt reicht eine 4GB micro SD.
    - RPI eth0 ist auf DCHP eingestellt.
    - Anmelden via putty (ssh) und login mit pi/raspberry
    - in /etc/knxd.conf entsprechend der Umgebung KNX Router oder KNX Tunnel IP Adresse eintragen.
    - in /var/lib/linknx/linknx.xml sind ein paar GAs (TEMP, LUX) konfiguriert. Wenn die Wetterstation die Werte aktualisiert dann bekommt das Linknx (via KNXD ) mit und schreibt die Werte in den jeweiligen Log-Files (/var/lib/linknx/logs/TEMP.log und .../logs/LUX.log).
    - in /var/www/html/visu/config/visu_config.xml sind ein paar GAs konfiguriert. Es wird ein Temperatur-, eine Licht- und ein Rollladen-Status visualisiert.

    Nachdem knxd.conf angepasst und "euere" GAs in den entsprechenden xml-Files eingetragen sind macht ein reboot (sync; sync; sudo shutdown -r now).

    Eine vollständige "step by step" Installationsanleitung ist in Arbeit.

    Viel Spaß

    #2
    Moin
    bin mal gespannt

    Download ist nicht verfügbar

    Kommentar


      #3
      Upload schien abgeschlossen ..
      Es wird geklärt ob ein Space-Limitierung es blockt ...
      Wenn ich es morgen nicht sehe mach ich es in google-drive rein.

      Kommentar


        #4
        Image download

        HINWEIS:
        Im Image nach der Anmeldung noch folgende zwei Paket installieren und Apache neu starten:
        Code:
        pi@raspberrypi:~ $ sudo apt-get install php5-common  
        pi@raspberrypi:~ $ sudo apt-get install libapache2-mod-php5
        pi@raspberrypi:~ $ sudo systemctl restart apache2
        Zuletzt geändert von itarch; 11.04.2017, 13:14.

        Kommentar


          #5
          Das bereitgestellte Image ist wie folgt installiert/konfiguriert worden.

          Download RASPIAN Image von
          https://www.raspberrypi.org/downloads/raspbian/

          Das Download File:
          2017-03-02-raspbian-jessie-lite.zip

          Entpacken und bspw mit Win32DiskImager auf die SD Karte SCHREIBEN(WRITE).
          Mglw muß man die Karte einmal formatieren damit diese unter Windows sichtbar und demnach als Zielmedium auswählbar ist.

          Wenn der Raspberry nicht mit Tastatur und Maus resp Monitor ausgestattet wird und der Zugrigff über putty (ssh) erfolgen soll, dann sollte bevor die uSD Karte in den Raspberry gesteckt wird, auf der Partition, die unter Windows sichbar ist eine leere Date namens "ssh" angelegt werden. Dies bewirkt, dass der Raspberry beim ersten Boot-Vorgang ssh aktiviert. Die Datei ssh wird danach vom System gelöscht, ssh bleibt aber fortfolgend aktiv.

          Der Raspberry startet und versucht über DHCP eine IP Adresse zu erhalten. Wenn es ein RPI3 ist dann hat er neben dem kabelgebunden Netzwerk Interface "eth0" auch das WLAN Interface wlan0. Ich rate hier den Raspberry vorher mit mit einem Netzwerkkabel ins Netz zu bringen.


          Um die IP Adresse, die eth0 über DHCP erhalten hat zu identifizieren, nutze ich ein "ipscan-Tool". Man kann natürlich auf dem Provider/AVM/ETC/WLAN-Router schauen welche IP Adresse hier vergeben wurde, da i.d.R. hier der DHCP-Server läuft.

          Für die SSH-Verbindung mit dem Raspberry nehme ich putty (www.putty.org)

          Login auf das System via putty erfolgt über
          Name: pi
          Password: raspberry

          Danach erscheint folgender Prompt und jetzt geht es los.

          VORBEREITUNG:

          Erst einmal das OS auf dem Raspberry auf dem neusten Stand bringen
          Code:
          pi@raspberrypi:~ : sudo apt-get update
          pi@raspberrypi:~ : sudo apt-get upgrade
          Hiernach wird empfohlen einen Reboot durchzuführen. Hab kein Unterschied festgestellt, wie auch immer, wer es machen will führt aus:
          Code:
          pi@raspberrypi:~ : sync; sync; sudo shutdown -r now
          Nach dem Reboot wie folgt fortfahren:
          Code:
          pi@raspberrypi:~ $ sudo apt-get -y install git-core
          pi@raspberrypi:~ $ sudo apt-get -y install libtool
          pi@raspberrypi:~ $ sudo apt-get -y install automake
          pi@raspberrypi:~ $ sudo apt-get -y install libusb-dev
          pi@raspberrypi:~ $ sudo apt-get -y install libsystemd-dev
          pi@raspberrypi:~ $ sudo apt-get -y install libsystemd-daemon-dev
          pi@raspberrypi:~ $ sudo apt-get -y install libev-dev
          pi@raspberrypi:~ $ sudo apt-get -y install dh-systemd
          pi@raspberrypi:~ $ sudo apt-get -y install cmake
          pi@raspberrypi:~ $ sudo apt-get -y install libusb-1.0-0-dev
          INSTALLATION KNXD:
          Hinweis: weiter unten wird hinter jedem Befehl der Befehl "echo $?" ausgeführt. Kommt da als Ausgabe "0" raus, dann ist der Befehl der zuvor gelaufen ist erfolgreich durchgelaufen.
          Code:
          pi@raspberrypi:~ $ mkdir install
          pi@raspberrypi:~ $ cd install
          pi@raspberrypi:~/install $ git clone https://github.com/knxd/knxd.git
          pi@raspberrypi:~/install $ cd knxd
          pi@raspberrypi:~/install/knxd $ git checkout v0.12.14
          pi@raspberrypi:~/install/knxd $ ./bootstrap.sh
          pi@raspberrypi:~/install/knxd $ echo $?
          0
          pi@raspberrypi:~/install/knxd $ dpkg-buildpackage -b -uc
          pi@raspberrypi:~/install/knxd $ echo $?
          0
          pi@raspberrypi:~/install/knxd $ cd ..
          pi@raspberrypi:~/install $ sudo dpkg -i knxd_*.deb knxd-tools_*.deb
          pi@raspberrypi:~/install $ echo $?
          0
          Installation KNXD ist nun abgeschloßen. Es folgen ein paar Prüfungen und Anpassung der /etc/knxd.conf, wenn erforderlich:
          Code:
          pi@raspberrypi:~/install $ cd ..
          pi@raspberrypi:~ $ which knxd
          /usr/bin/knxd
          pi@raspberrypi:~ $ /usr/bin/knxd -V
          knxd 0.12.14
          pi@raspberrypi:~ $ head /etc/knxd.conf
          # configuration for knxd.service
          KNXD_OPTS="-e 0.0.1 -E 0.0.2:8 -c -b ipt:192.168.1.11"
          
          # The default options are "-u /tmp/eib -b ip:"
          # which tell knxd to route between all of
          #  /tmp/eib (legacy socket (-u))
          #  multicast client (-b ip:).
          # knxd's own bus address is 0.0.1; it will assign 0.0.2; it will assign 0.0.9 to clients.
          # The knxd.socket file also tells knxd to listen to
          #  /run/eib (socket activation via systemd)
          In meiner Umgebung ist ein KNX Interface von Weinzierl (730) im Einsatz. Der ist vom Typ Tunnel-Interface und hat die IP Adresse 192.168.1.11. Siehe Zeile weiter oben ( ... -b ipt:192.168.1.11). Wer ein Tunnel-Interface hat sollte an dieser Stelle die IP Adresse ändern. Wer ein Router-Interface einsetzt sollte die Zeile belassen wie diese im Auslieferungszustand nach der Installation vorliegt ("... -b ip:").
          Danach KNXD wie folgt "restart" und "status" prüfen:
          Code:
          pi@raspberrypi:~ $ sudo systemctl restart  knxd
          pi@raspberrypi:~ $ sudo systemctl status knxd
          ● knxd.service - KNX Daemon
             Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
             Active: active (running) since Fri 2017-04-07 08:42:31 UTC; 20s ago
           Main PID: 3542 (knxd)
             CGroup: /system.slice/knxd.service
                     └─3542 /usr/bin/knxd -e 0.0.1 -E 0.0.2:8 -c -b ipt:192.168.1.11
          
          Apr 07 08:42:31 raspberrypi systemd[1]: Started KNX Daemon.
          Um zu prüfen ob bis hier alles erfolgreich war, starte ich den vbusmonitor1 und betätige ein Licht im Haus. Daraufhin tauchen Einträge in der Konsole. D.h. KNXD kommuniziert mit dem EIB-BUS erfolgreich. Das ganze sieht bspw. wie folgt aus:
          Code:
          pi@raspberrypi:~ $ sudo knxtool vbusmonitor1 ip:localhost
          LPDU: BC 10 D4 12 46 F1 00 81 A3 :L_Data low from 1.0.212 to 2/2/70 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
          LPDU: BC 10 D4 12 46 F1 00 80 A2 :L_Data low from 1.0.212 to 2/2/70 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write (small) 00
          INSTALLATION LINKNX
          Code:
          pi@raspberrypi:~ $ sudo apt-get install cdbs
          pi@raspberrypi:~ $ echo $?
          0
          pi@raspberrypi:~ $ cd install
          pi@raspberrypi:~/install $ wget https://www.auto.tuwien.ac.at/~mkoegler/pth/pthsem_2.0.8.tar.gz
          pi@raspberrypi:~/install $ tar xf pthsem_2.0.8.tar.gz
          pi@raspberrypi:~/install $ cd pthsem-2.0.8
          pi@raspberrypi:~/install/pthsem-2.0.8 $ dpkg-buildpackage -b -uc
          pi@raspberrypi:~/install/pthsem-2.0.8 $ echo $?
          0
          pi@raspberrypi:~/install/pthsem-2.0.8 $ cd ..
          pi@raspberrypi:~/install $ sudo dpkg -i libpthsem*.deb
          pi@raspberrypi:~/install $ wget https://github.com/linknx/linknx/archive/0.0.1.33.zip
          pi@raspberrypi:~/install $ unzip linknx-0.0.1.33.zip
          pi@raspberrypi:~/install $ cd linknx-0.0.1.33
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ ./configure
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ echo $?
          0
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ make    
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ echo $?
          0
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ sudo make install
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ echo $?
          0
          pi@raspberrypi:~/install/linknx-0.0.1.33 $ cd
          
          Ein paar Verzeichnisse anlegen ...
          pi@raspberrypi:~ $ sudo mkdir /var/lib/linknx
          pi@raspberrypi:~ $ sudo mkdir /var/lib/linknx/logs
          pi@raspberrypi:~ $ sudo mkdir /var/lib/linknx/persist
          Die folgende (erforderliche) XML Datei beinhaltet als Beispiel einige GAs - in dem Falle Temperatur (TEMP) und Licht (LUX) - auf die Linknx hört wenn die Wetterstation Änderungen im BUS schreibt. Dazu später mehr
          Code:
          pi@raspberrypi:~ $ sudo vi /var/lib/linknx/linknx.xml
          <?xml version="1.0" ?>
          <config>
          <objects>
            <object id="EG.ALL.ABWESENHEIT" gad="2/0/100" type="1.001" flags="crwtu" init="persist" log="true"></object>
            <object id="TEMP" gad="6/0/2" type="9.001" flags="cwtu" init="request" log="true"></object>
            <object id="LUX" gad="6/0/0" type="9.004" flags="cwtu" init="request" log="true"></object>
          </objects>
          <rules>
          </rules>
          <services>
                  <knxconnection url="ip:127.0.0.1:6720" />
                  <persistence type="file" path="/var/lib/linknx/persist" logpath="/var/lib/linknx/logs/" />
          </services>
          <logging output="/var/log/linknx.log" format="basic" maxfilesize="5000" maxfileindex="5" level="DEBUG" />
          </config>
          Die folgende Datei ist erforderlich damit Linknx über systemd gesteuert (start/stop...) werden kann.
          Code:
          pi@raspberrypi:~ $ sudo vi /lib/systemd/system/linknx.service
          [Unit]
          Description=Linknx Daemon
          Requires=knxd.service
          After=knxd.service
          [Service]
          ExecStart=/usr/local/bin/linknx --config=/var/lib/linknx/linknx.xml --pid-file=/var/run/linknx.pid --daemon=/var/log/linknx.log
          Type=forking
          User=root
          Restart=on-failure
          RestartSec=3
          [Install]
          WantedBy=multi-user.target
          Danach linknx "enable" und einmal "restart" durchführen.
          Code:
          pi@raspberrypi:~ $ sudo systemctl enable linknx
          pi@raspberrypi:~ $ sudo systemctl restart linknx
          pi@raspberrypi:~ $ sudo systemctl status linknx
          ● linknx.service - Linknx Daemon
             Loaded: loaded (/lib/systemd/system/linknx.service; enabled)
             Active: active (running) since Fri 2017-04-07 09:06:26 UTC; 5s ago
            Process: 3592 ExecStart=/usr/local/bin/linknx --config=/var/lib/linknx/linknx.xml --pid-file=/var/run/linknx.pid --daemon=/var/log/linknx.log (code=exited, status=0/SUCCESS)
           Main PID: 3594 (linknx)
             CGroup: /system.slice/linknx.service
                     └─3594 /usr/local/bin/linknx --config=/var/lib/linknx/linknx.xml --pid-file=/var/ru...
          
          Apr 07 09:06:26 raspberrypi systemd[1]: Started Linknx Daemon.
          Weiterhin kann man wie folgt prüfen ob Linknx in der Lage ist über KNXD mit dem KNX-BUS zu kommunizieren...
          Folgende (erste zwei) Zeilen sollten dann im Logfile auftauchen.
          Code:
          pi@raspberrypi:~ $ tail -f /var/log/linknx.log
          ...
          2017-04-07 09:06:26 [ INFO] main: Config file loaded: /var/lib/linknx/linknx.xml
          2017-04-07 09:06:26 [ INFO] KnxConnection: KnxConnection: Group socket opened. Waiting for messages.
          ...
          2017-04-07 09:09:25 [ INFO] Object: New value 11212.8 for object LUX (type: 9.004)
          2017-04-07 09:09:25 [ INFO] FilePersistentStorage: Writing log'11212.8' for object 'LUX'
          Die letzten zwei Zeilen zeigen, dass Linknx den neuen LUX Wert der Wetterstation erhalten hat, als ich grad am tippen war :-)
          Die Werte der einzelenen Linknx Objekte werden zusätzlich in den jeweiligen Log-Files festgehalten (konfigurierbar in linknx.xml). Bspw.
          Code:
          pi@raspberrypi:~ $ tail -f /var/lib/linknx/logs/LUX.log
          ...
          2017-4-7 08:58:38 > 10183.68
          2017-4-7 09:09:25 > 11212.8
          INSTALLATION APACHE und COMETVISU
          Code:
          pi@raspberrypi:~ $ sudo apt-get install apache2
          pi@raspberrypi:~ $ sudo apt-get install php5-common
          pi@raspberrypi:~ $ sudo apt-get install libapache2-mod-php5
          pi@raspberrypi:~ $ sudo a2enmod cgi
          Apache2 neustarten und CometVisu draufbringen
          Code:
          pi@raspberrypi:~ $ sudo systemctl restart apache2
          pi@raspberrypi:~ $ cd /var/www/html
          pi@raspberrypi:/var/www/html $ sudo wget https://github.com/CometVisu/CometVisu/releases/download/v0.10.1/CometVisu-0.10.1.zip
          pi@raspberrypi:/var/www/html $ sudo unzip CometVisu-0.10.1.zip
          pi@raspberrypi:/var/www/html $ sudo ln -s cometvisu/release/ visu
          pi@raspberrypi:/var/www/html $ cd /usr/lib/cgi-bin
          Jetz noch einige Dinge, die erforderlich sind damit CometVisu mit KNXD kommunizieren kann.
          Code:
          pi@raspberrypi:/usr/lib/cgi-bin $ sudo vi l
          #!/bin/sh
          echo "Content-Type: text/plain"
          echo ""
          
          echo "{ \"v\":\"0.0.1\", \"s\":\"SESSION\"}"
          
          pi@raspberrypi:/usr/lib/cgi-bin $ sudo chmod 755 /usr/lib/cgi-bin/l
          pi@raspberrypi:/usr/lib/cgi-bin $ sudo ln -s /usr/lib/knxd/eibread-cgi r
          pi@raspberrypi:/usr/lib/cgi-bin $ sudo ln -s /usr/lib/knxd/eibwrite-cgi w
          Wenn Ihr mit einem Browser "<ip-adresse vom raspberry>/visu/" aufruft, dann seht Ihr die Einstiegsseite von CometVisu über die Ihr die Visualisierung Eures Projektes vornehmen könnt.

          VIEL SPASS

          PS: Anmerkungen/Verbesserung sehr Willkommen


          *** 24.01.2018, ANMERKUNG ***
          Die Anleitung bis einschließlich Linknx, gilt auch in Kombination mit Raspian Stretch Lite - 9.1. - ( soeben auf eine RPI 1B+ installiert, sollte aber auch auf jüngeren RPIs gehen). Allerdings bitte Linknx 0.0.1.36 installieren.
          Zuletzt geändert von itarch; 24.01.2018, 12:03. Grund: *** ANMERKUNG ***

          Kommentar


            #6
            Besten Dank,

            schaue ich mir mal an, ich hatte auch schon angefangen auf den RPI3 - Jessie Lite und Linknx - CometVisu zu installieren.
            Aber KNXD benötige ich nicht, läuft einfach noch zu instabil, ich nehme den Eibd, der macht bei mir was er soll, ohne Probleme.

            Gruß
            Michi

            Kommentar


              #7
              Michixx, folgendes gilt jetzt nicht für. Ich gehe mal davon aus, dass Du weißt was erforderlich ist. Schließlich hab ich noch dein Image auf einem RPI1 im Einsatz. :-)
              <HINWEIS> in der Sektion VORBEREITUNG weiter oben werden Pakete installiert, die teilweise oder nur in Zusammenhang mit KNXD stehen. Wer eibd statt knxd auf dem System packen will, der muß in die entsprechenden Dokus schauen. </HINWEIS>

              Kommentar


                #8
                Hmm. Michixx ich würde mich freuen, wenn du dein Stabilitätsproblem mit dem knxd v0.14 reproduzieren und mir ein Log schicken könntest.
                DistKV, Home Assistant, 1wire, KNX, Python, Asterisk, SMD-Lötkolben

                Kommentar


                  #9
                  ich hab da ein Problem ... image läuft. Cometvisu Startseite auch ... versuch eich den Editor zu laden mit

                  http://192.168.1.104/visu/editor/

                  kommt das hier:

                  Code:
                   
                   <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */  /**  * Pre-Check the configuration using the embedded schema.  * This should make sure that we do not confront the user with javascript-errors  * because of an invalid configuration.  *  *  * LICENSE: This program is free software; you can redistribute it and/or  * modify it under the terms of the GNU General Public License  * as published by the Free Software Foundation; either version 3  * of the License, or (at your option) any later version.  *   * This program is distributed in the hope that it will be useful,  * but WITHOUT ANY WARRANTY; without even the implied warranty of  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  * GNU General Public License for more details.  *   * You should have received a copy of the GNU General Public License  * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.  *  * @category    editor  * @package     CometVisu  * @author      Julian Makowski (julian at makowskis dot de)  * @copyright   2013 Julian Makowski  * @license     GPLv3 or later, http://opensource.org/licenses/gpl-license.php  * @version     SVN: $Id$  * [USER="27066"]Link[/USER]        http://cometvisu.de  * @since       2013-02-05  */  require_once('../lib/library_version.inc.php');  define('CONFIG_FILENAME', '../config/visu_config%s.xml'); define('DEMO_FILENAME', '../demo/visu_config%s.xml'); define('SCHEMA_FILENAME', './%s');

                  Kommentar


                    #10
                    stimmt
                    puhhhh
                    Muss ich nachschauen
                    Wenn man
                    http://<ip-adresse>/visu/check_config.php
                    aufruft dann steht dort mehr drin.
                    Offensichtlich stimmt was mit dem visu_config.xml File nicht.

                    Kommentar


                      #11
                      Nach: http://192.168.1.104/visu/check_config.php

                      dann kommt das:

                      Code:
                      <\\1\\2\\3>",$s); $s = preg_replace("#<([\?])(.*)([\?])>#sU", "[COLOR=\"#800000\"]<\\1\\2\\3>[/COLOR]",$s); $s = preg_replace("#<([^\s\?/=])(.*)([\[\s/]|>)#iU", "<[COLOR=\"#808000\"]\\1\\2[/COLOR]\\3",$s); $s = preg_replace("#<([/])([^\s]*?)([\s\]]*?)>#iU", "<\\1[COLOR=\"#808000\"]\\2[/COLOR]\\3>",$s); $s = preg_replace("#([^\s]*?)\=("|')(.*)("|')#isU", "[COLOR=\"#800080\"]\\1[/COLOR]=[COLOR=\"#FF00FF\"]\\2\\3\\4[/COLOR]",$s); $s = preg_replace("#<(.*)(\[)(.*)(\])>#isU", "<\\1[COLOR=\"#800080\"]\\2\\3\\4[/COLOR]>",$s); return preg_replace( '#
                      $#', '', nl2br($s) ); } function libxml_display_error( $error ) { global $lines, $error_array; $error_array[] = $error->line; switch ($error->level) { case LIBXML_ERR_WARNING: $return .= '[B]Warning ' . $error->code . '[/B]: '; break; case LIBXML_ERR_ERROR: $return .= '[B]Error ' . $error->code . '[/B]: '; break; case LIBXML_ERR_FATAL: $return .= '[B]Fatal Error ' . $error->code . '[/B]: '; break; } $return .= trim( $error->message ); $return .= ' on [URL="http://192.168.1.104/visu/check_config.php#'%20.%20(%24error->line-1)%20.%20'"]line [B]' . $error->line . '[/B][/URL]'; $return .= '  
                       ';   for( $i = max( 0, $error->line - 1 - 3); $i <= $error->line - 1 + 3; $i++ )   {     if( $i == $error->line - 1 ) $return .= '[B]';     $return .= sprintf( '%4d: ', $i+1 );     $return .= xml_highlight( $lines[ $i ] );     if( $i == $error->line - 1 ) $return .= '[/B]';   }   $return .= ' '; return $return; } function checkVersion( $dom ) { echo '  [HR][/HR]'; $pages = $dom->getElementsByTagName("pages"); if( 1 != $pages->length ) { echo 'Fatal error: Could not find <pages> element in config file!
                      '; echo '(Note: this can also be caused by unbalanced elements, bad quotation marks, ...)'; return; } $fileVersion = $pages->item(0)->getAttribute('lib_version'); echo "The config file uses a library version of '" . $fileVersion . "', current version is '" . LIBRARY_VERSION . "', so this is " . ($fileVersion==LIBRARY_VERSION?'':'NOT ') . "up to date."; if( $fileVersion != LIBRARY_VERSION ) echo ' Please run [URL="http://192.168.1.104/visu/upgrade/index.php?config='.%24_GET%5B'config'%5D.%20%20%20%20%20%20'"]Configuration Upgrade[/URL] when you are sure that the config file is valid XML.'; } // Enable user error handling libxml_use_internal_errors(true); $dom = new DomDocument(); $isDemo = false; // something openhab2 specific for autogenerated configs if (substr($_GET['config'],0,3)=="oh_") { $conffile = "http://".$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME']."/config/visu_config"; } else { $conffile = 'config/visu_config'; } if (defined('STDIN')) { $conffile = "visu_config_" . $argv[1]; } else if ($_GET['config']) { $conffile .= "_" . $_GET['config']; } $conffile .= '.xml'; if ( false === is_readable( $conffile ) ) { $conffile = 'demo/visu_config'; if ($_GET['config']) { $conffile .= "_" . $_GET['config']; } $conffile .= '.xml'; $isDemo = true; } if( false === is_readable( $conffile ) ) { $old_conffile = 'visu_config'; if ($_GET['config']) { $old_conffile .= "_" . $_GET['config']; } $old_conffile .= '.xml'; if( true === is_readable( $old_conffile ) ) { $conffile = $old_conffile; echo '[COLOR=#f00][B]WARNING:[/B] Depreciated position of config file![/COLOR]  [HR][/HR]'; } else { echo "File [B]$conffile[/B] (nor the depreciated [B]$old_conffile[/B]) does not exist!"; echo ''; exit; } } $lines = file( $conffile ); $dom->load( $conffile ); if( $dom->schemaValidate( 'visu_config.xsd' ) ) { echo 'config [B]' . $conffile . ' is valid [/B]XML'; if( $_GET['src'] === 'editor' ) echo '. [URL="http://192.168.1.104/visu/editor/editor.html?config='.%24_GET%5B'config'%5D.(%24isDemo?'&demo=true':'').'"]Continue to the editor here.[/URL]'; echo '
                      '; checkVersion( $dom ); } else { echo 'config [B]' . $conffile . ' is NOT valid [/B]XML'; if( $_GET['src'] === 'editor' ) echo '. [URL="http://192.168.1.104/visu/editor/editor.html?config='.%24_GET%5B'config'%5D.(%24isDemo?'&demo=true':'').'"]Still continue to the editor here[/URL] - [B]but this can break the config file completely[/B].'; echo '
                      '; checkVersion( $dom ); echo ' [HR][/HR]'; $errors = libxml_get_errors(); foreach( $errors as $error ) { echo libxml_display_error( $error ); } libxml_clear_errors(); } echo ' [HR][/HR]'; echo ' 
                       '; foreach( $lines as $line_num => $line ) {   $error_in_line = in_array( $line_num+1, $error_array );   if( $error_in_line ) echo '[B]';   printf( '%4d: ', $line_num, $line_num+1 );   echo xml_highlight( $line );   if( $error_in_line ) echo '[/B]'; }  echo ' '; ?>

                      Kommentar


                        #12
                        wahlweise kommt das hier (lese ich in letzter Zeit öfter):

                        The configuration appears to be not valid. Please check with 'check_config.php' for details. Error: 'schema is not valid for this configuration, can not find root-level element pages'


                        Komischerweise läuft die Visu aber ... und genau das xml File hab ich einen Tag vorher noch mit dem Editor editiert

                        Kommentar


                          #13
                          Die Struktur des XML Files scheint oder besser gesagt ist nicht korrekt. Das was ich im Image hinterlassen habe hatte ich schnell mit "vi" aufs minimum reduziert. Offensichtlich nicht sauber. Es wundert mich sehr, dass es geladen wird. Werde ich mir später anschauen.

                          Aus deiner Meldung leite ich ab, dass "pages" am Anfang oder Ende fehlt. Vlt schon im File was ich hinterlassen habe...

                          Kommentar


                            #14
                            ich habe die gleiche Meldung auch auf einem anderen Raspi bekommen, unabhängig von deinem Image ... Visu läuft, alles lässt sich bedienen, aber der Editor geht nicht (mehr) ... Einen Tag vorher lief er noch

                            Kommentar


                              #15
                              Ich kopiere nach einer Neuinstallation das XML File weg und setze mein XML File ein. Alles was das XML File beinhaltet wird angezeigt. Jetzt hab ich eben das original file aktiviert und siehe da Editor und config check geht nicht. Jetzt stimmt entweder was mit dem File nicht, was ich nicht glaube, oder die Kombination Browser mit dem Aufruf des Editor resp config check, oder Apache resp OS Pakete...

                              Kommentar

                              Lädt...
                              X