Ankündigung

Einklappen
Keine Ankündigung bisher.

SmartHome mit Debian 8

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    SmartHome mit Debian 8

    Hallo
    ich habe einen neuen Debianserver eingerichtet und nach dieser Anleitung: https://github.com/mknx/smarthome/wi...ibd-und-1-Wire
    SmartHome und eibd installiert.
    Das Verzeichnis für die Visu musste ich nach /var/www/html wie es eigentlich unter Ubuntu üblich ist ändern.
    Die Smartvisu Seite kann ich öffnen. Auf der Config Seite habe ich als Driver Smarthome.py mit der Adresse vom Server eingestellt.
    Diese Verbindung funktioniert nicht. Beim klicken auf Error kommt die Fehlermeldung:Could not connect to smarthome.py server!
    Websocket error undefined.
    Kann mir da jemand einen Tip geben ? Ich hab die Installation schon 2 mal gemacht . Immer das gleiche Verhalten. Die Anleitung bezieht sich auf Debian 7.4 ich habe
    8.1 . Ist da was zu beachten ?


    #2
    Hi,
    läuft der SmartHome.py Dienst? Ist der Port 2424 offen?
    Gruß Sven

    Kommentar


      #3
      Moin,
      schau dir mal unter "/usr/local/smarthome/var/log" die smarthome.log an, ob es sauber gestartetet ist.
      Gruß
      ElektroRudi

      ............kann,.muß aber net....

      Kommentar


        #4
        Moin zusammen,

        ich häng mich mal mit dran. Ich habe das gleiche Problem wie "Rentner" :-) Hatte SmartHome.py die letzten 2 Jahre mehrfach problemlos als VM
        in ESXI installiert. Die SmartHome-VM habe ich mir leider zerschossen. Eigentlich ja kein Problem -> einfach neu aufsetzen.
        Ich habe es jetzt 3x probiert(Ubuntu 14.04, Debian 8.1 und Debian 7.5) jedesmal steht folgendes im Log :

        2015-08-28 10:39:31,737 INFO Main Start SmartHome.py 1.0-45-g02cf972 -- smarthome.py:__init__:231
        2015-08-28 10:39:31,738 DEBUG Main Python 3.2.3 -- smarthome.py:__init__:232
        2015-08-28 10:39:31,738 INFO Main Init Scheduler -- scheduler.py:__init__:86
        2015-08-28 10:39:31,738 DEBUG Scheduler creating 5 workers -- scheduler.py:run:93
        2015-08-28 10:39:31,738 INFO Main Init Plugins -- smarthome.py:start:274
        2015-08-28 10:39:31,739 DEBUG Main Plugin: knx -- plugin.py:__init__:43
        2015-08-28 10:39:31,740 DEBUG Main Plugin: ow -- plugin.py:__init__:43
        2015-08-28 10:39:31,741 ERROR Main Unhandled exception: 'class_name'
        <class 'KeyError'>
        File "/usr/local/smarthome/bin/smarthome.py", line 606, in <module>
        sh.start()
        File "/usr/local/smarthome/bin/smarthome.py", line 275, in start
        self._plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf)
        File "/usr/local/smarthome/lib/plugin.py", line 50, in __init__
        classname = _conf[plugin]['class_name']
        -- smarthome.py:_excepthook:494

        Vorgenhensweise und Fehler wie bei Rentner. Ich habe leider wenig Linux und keine Pythonkenntnisse. Ich kann den Fehler
        nicht abstellen.

        Danke für die Mühe !!

        Holger

        Kommentar


          #5
          @Holger:

          Mich wundert Dein Python 3.2.3. Ich habe hier 3.4 unter Ubuntu 14.04.x LTS laufen. Nur mal so am Rande: Euer System ist schon mit den neuesten Patches versorgt?

          Bei Ubuntu mache ich dann ein
          Code:
          sudo -i
          apt-get update
          apt-get upgrade
          autoremove
          reboot
          Gruß,
          Bernd

          Kommentar


            #6
            Hallo Bernd,

            Danke für die Antwort. Ich habe die Pakete jetzt aktualisiert. Ging trotzdem evtl. wahrscheinlich nicht :-). Mir ist dann aufgefallen das der Fehler nach dem Onewire plugin kam.
            Hab es wieder aktiviert -> dann funktioniert es. Vllt. habe ich einen Fehler beim ursprünglichen Deaktivieren gemacht.

            # [ow]
            # class_name = OneWire
            # class_path = plugins.onewire

            [ow]
            # class_name = OneWire
            # class_path = plugins.onewire

            Muss [ow] auch auskommentiert werden?

            grüße

            Kommentar


              #7
              Auf jeden Fall. muss [ow] auskommentiert werden. Genau das ist dein Problem.
              Gruß

              Kommentar


                #8
                Hallo

                ich habe inzwischen alles nochmal mit Debian 7.4 eingerichtet . Ohne Erfolg.
                Smarthome log:
                Init SmartHome.py 1.0-45-g02cf972
                2015-09-02 16:04:09 ERROR Connections KNX: could not connect to 127.0.0.1:6720 (TCP): [Errno 111] Verbindungsaufbau abgelehnt

                Port 2424 ist offen. Ich kann mich mit telnet von einen anderen Rechner auf diesen Port verbinden.

                OW aktitivieren oder nicht spielt keine Rolle.

                Beim aufrufen der SmartVISU Seite alle grünen Haken da.

                Kommentar


                  #9
                  Nach langen suchen habe ich jetzt mal ein anderes Startscript aus dem Forum benutzt.

                  Code:
                  #! /bin/sh
                  ### BEGIN INIT INFO
                  # Provides:          EIBD
                  # Required-Start:    $remote_fs
                  # Required-Stop:     $remote_fs
                  # Default-Start:     2 3 4 5
                  # Default-Stop:      0 1 6
                  # Short-Description: Start EIB-Daemon
                  # Description:       This file is used to start the EIB-Daemon during system startup.
                  #                    It should be placed in /etc/init.d.
                  ### END INIT INFO
                  
                  # Author:
                  #
                  # Please remove the "Author" lines above and replace them
                  # with your own name if you copy and modify this script.
                  
                  # Do NOT "set -e"
                  
                  # PATH should only include /usr/* if it runs after the mountnfs.sh script
                  PATH=/sbin:/usr/sbin:/bin:/usr/bin
                  DESC="EIB/KNX network stack"
                  NAME=eibd
                  DAEMON=/usr/bin/$NAME
                  DAEMON_ARGS="-D -T -S -d -i --pid-file=/var/run/eibd.pid ipt:192.168.10.65"
                  PIDFILE=/var/run/$NAME.pid
                  SCRIPTNAME=/etc/init.d/$NAME
                  sleep 5
                  # Exit if the package is not installed
                  [ -x "$DAEMON" ] || exit 0
                  
                  # Read configuration variable file if it is present
                  [ -r /etc/default/$NAME ] && . /etc/default/$NAME
                  
                  # Load the VERBOSE setting and other rcS variables
                  . /lib/init/vars.sh
                  
                  # Define LSB log_* functions.
                  # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
                  . /lib/lsb/init-functions
                  
                  #
                  # Function that starts the daemon/service
                  #
                  do_start()
                  {
                      # Return
                      #   0 if daemon has been started
                      #   1 if daemon was already running
                      #   2 if daemon could not be started
                      start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                          || return 1
                      start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                          $DAEMON_ARGS \
                          || return 2
                      # Add code here, if necessary, that waits for the process to be ready
                      # to handle requests from services started subsequently which depend
                      # on this one.  As a last resort, sleep for some time.
                  }
                  
                  #
                  # Function that stops the daemon/service
                  #
                  do_stop()
                  {
                      # Return
                      #   0 if daemon has been stopped
                      #   1 if daemon was already stopped
                      #   2 if daemon could not be stopped
                      #   other if a failure occurred
                      start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
                      RETVAL="$?"
                      [ "$RETVAL" = 2 ] && return 2
                      # Wait for children to finish too if this is a daemon that forks
                      # and if the daemon is only ever run from this initscript.
                      # If the above conditions are not satisfied then add some other code
                      # that waits for the process to drop all resources that could be
                      # needed by services started subsequently.  A last resort is to
                      # sleep for some time.
                      start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
                      [ "$?" = 2 ] && return 2
                      # Many daemons don't delete their pidfiles when they exit.
                      rm -f $PIDFILE
                      return "$RETVAL"
                  }
                  
                  #
                  # Function that sends a SIGHUP to the daemon/service
                  #
                  do_reload() {
                      #
                      # If the daemon can reload its configuration without
                      # restarting (for example, when it is sent a SIGHUP),
                      # then implement that here.
                      #
                      start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
                      return 0
                  }
                  
                  case "$1" in
                    start)
                      [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
                      do_start
                      case "$?" in
                          0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                          2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
                      esac
                      ;;
                    stop)
                      [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
                      do_stop
                      case "$?" in
                          0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                          2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
                      esac
                      ;;
                    #reload|force-reload)
                      #
                      # If do_reload() is not implemented then leave this commented out
                      # and leave 'force-reload' as an alias for 'restart'.
                      #
                      #log_daemon_msg "Reloading $DESC" "$NAME"
                      #do_reload
                      #log_end_msg $?
                      #;;
                    restart|force-reload)
                      #
                      # If the "reload" option is implemented then remove the
                      # 'force-reload' alias
                      #
                      log_daemon_msg "Restarting $DESC" "$NAME"
                      do_stop
                      case "$?" in
                        0|1)
                          do_start
                          case "$?" in
                              0) log_end_msg 0 ;;
                              1) log_end_msg 1 ;; # Old process is still running
                              *) log_end_msg 1 ;; # Failed to start
                          esac
                          ;;
                        *)
                            # Failed to stop
                          log_end_msg 1
                          ;;
                      esac
                      ;;
                    *)
                      #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
                      echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
                      exit 3
                      ;;
                  esac
                  
                  :
                  Damit funktioniert es nun.
                  Ich versuche den Fehler zu finden.

                  Kommentar


                    #10
                    geändert
                    Zuletzt geändert von Rentner; 03.09.2015, 06:30.

                    Kommentar


                      #11
                      Nach langen suchen habe ich jetzt mal ein anderes Startscript aus dem Forum benutzt.

                      Damit funktioniert es nun.
                      Ich versuche den Fehler zu finden.
                      Hier das funktionierende Script:
                      #! /bin/sh
                      ### BEGIN INIT INFO
                      # Provides: EIBD
                      # Required-Start: $remote_fs
                      # Required-Stop: $remote_fs
                      # Default-Start: 2 3 4 5
                      # Default-Stop: 0 1 6
                      # Short-Description: Start EIB-Daemon
                      # Description: This file is used to start the EIB-Daemon during system startup.
                      # It should be placed in /etc/init.d.
                      ### END INIT INFO

                      # Author:
                      #
                      # Please remove the "Author" lines above and replace them
                      # with your own name if you copy and modify this script.

                      # Do NOT "set -e"

                      # PATH should only include /usr/* if it runs after the mountnfs.sh script
                      PATH=/sbin:/usr/sbin:/bin:/usr/bin
                      DESC="EIB/KNX network stack"
                      NAME=eibd
                      DAEMON=/usr/bin/$NAME
                      DAEMON_ARGS="-D -T -S -d -i --pid-file=/var/run/eibd.pid ipt:192.168.10.65"
                      PIDFILE=/var/run/$NAME.pid
                      SCRIPTNAME=/etc/init.d/$NAME
                      # Exit if the package is not installed
                      [ -x "$DAEMON" ] || exit 0

                      # Read configuration variable file if it is present
                      [ -r /etc/default/$NAME ] && . /etc/default/$NAME

                      # Load the VERBOSE setting and other rcS variables
                      . /lib/init/vars.sh

                      # Define LSB log_* functions.
                      # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
                      . /lib/lsb/init-functions

                      #
                      # Function that starts the daemon/service
                      #
                      do_start()
                      {
                      # Return
                      # 0 if daemon has been started
                      # 1 if daemon was already running
                      # 2 if daemon could not be started
                      start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                      || return 1
                      start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                      $DAEMON_ARGS \
                      || return 2
                      # Add code here, if necessary, that waits for the process to be ready
                      # to handle requests from services started subsequently which depend
                      # on this one. As a last resort, sleep for some time.
                      }

                      #
                      # Function that stops the daemon/service
                      #
                      do_stop()
                      {
                      # Return
                      # 0 if daemon has been stopped
                      # 1 if daemon was already stopped
                      # 2 if daemon could not be stopped
                      # other if a failure occurred
                      start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
                      RETVAL="$?"
                      [ "$RETVAL" = 2 ] && return 2
                      # Wait for children to finish too if this is a daemon that forks
                      # and if the daemon is only ever run from this initscript.
                      # If the above conditions are not satisfied then add some other code
                      # that waits for the process to drop all resources that could be
                      # needed by services started subsequently. A last resort is to
                      # sleep for some time.
                      start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
                      [ "$?" = 2 ] && return 2
                      # Many daemons don't delete their pidfiles when they exit.
                      rm -f $PIDFILE
                      return "$RETVAL"
                      }

                      #
                      # Function that sends a SIGHUP to the daemon/service
                      #
                      do_reload() {
                      #
                      # If the daemon can reload its configuration without
                      # restarting (for example, when it is sent a SIGHUP),
                      # then implement that here.
                      #
                      start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
                      return 0
                      }

                      case "$1" in
                      start)
                      [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
                      do_start
                      case "$?" in
                      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
                      esac
                      ;;
                      stop)
                      [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
                      do_stop
                      case "$?" in
                      0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                      2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
                      esac
                      ;;
                      #reload|force-reload)
                      #
                      # If do_reload() is not implemented then leave this commented out
                      # and leave 'force-reload' as an alias for 'restart'.
                      #
                      #log_daemon_msg "Reloading $DESC" "$NAME"
                      #do_reload
                      #log_end_msg $?
                      #;;
                      restart|force-reload)
                      #
                      # If the "reload" option is implemented then remove the
                      # 'force-reload' alias
                      #
                      log_daemon_msg "Restarting $DESC" "$NAME"
                      do_stop
                      case "$?" in
                      0|1)
                      do_start
                      case "$?" in
                      0) log_end_msg 0 ;;
                      1) log_end_msg 1 ;; # Old process is still running
                      *) log_end_msg 1 ;; # Failed to start
                      esac
                      ;;
                      *)
                      # Failed to stop
                      log_end_msg 1
                      ;;
                      esac
                      ;;
                      *)
                      #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
                      echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
                      exit 3
                      ;;
                      esac

                      :

                      Kommentar


                        #12
                        geändert
                        Zuletzt geändert von Rentner; 02.09.2015, 18:45.

                        Kommentar


                          #13
                          ja die kleinen Dinge im Leben.....
                          NAME=eibd
                          DAEMON=/usr/local/bin/$NAME
                          Die Pfadangabe war falsch.

                          Danke an alle die hier im Forum aktiv sind.
                          Zuletzt geändert von Rentner; 02.09.2015, 18:45.

                          Kommentar


                            #14
                            Jetzt hab ich doch noch ein Problem :
                            Nach kurzer Zeit also ca 5 min kommt das rote Dreieck ERROR mit der Meldung :
                            Could not connect to smarthome.py server!
                            Websocket error undefined.
                            Und nichts geht mehr bis ich die Seite neu aufrufe.
                            In smarthome.log steht nichts drinn.
                            Da komme ich jetzt nicht weiter.
                            Wie kann ich da weiter vorgehen ?

                            Kommentar


                              #15
                              Hallo

                              jetzt hab ich alles noch einmal neu eingerichtet. Debian 8.1
                              Es funktioniert kurz normal.
                              Exakt nach 64 Sekunden wird die Verbindung von smarthome.py getrennt und das rote Dreieck erscheint .
                              In der Debug Ausgabe steht:

                              WebSockedHandler: closing socket IP des Clienten:50656 -- connection.py:close:303

                              Nachdem die Webseite neu geladen wird geht es wieder 64 Sekunden.

                              Kann mir da jemand weiter helfen?

                              Kommentar

                              Lädt...
                              X