Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - Multi-RTR-Plugin wird nicht mehr ausgefürt?

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

    [wiregate] - √ - Multi-RTR-Plugin wird nicht mehr ausgefürt?

    Abend,

    ich nutze zur Ansteuerung von E-Heizmatten das Plugin
    Multi-RTR seit einiger Zeit. Bisher lief es auch immer unproblematisch.

    Da ich kürzlich Probleme (selbstverursacht) mit meinen Sensorlinien hatte und keine Werte für die Temp. geliefert wurden könnte das evtl. eine Ursache sein.

    Nach Ausführung des Plugin-subscribe-debug.pl stand zum Plugin nur:
    Plugin Multi_ RTR subscribed to 3/6/3 --> das ist die GA zum Ein/Ausschalten.
    Kann das der Fehler sein.
    Wie kann ich hier systematisch vor gehen umd den Grund für das nicht-Funktionieren einzukreisen?

    Bislang habe ich das Plugin gelöscht und neu erstellt - jetz taucht es gar nicht mehr auf. Auch keine Log-Einträge mehr..
    Im config. verzeichnis kann man auch was resetten:
    PHP-Code:
    $reset      0;  Reset to 1 to reset the statesrun script and change to 0 again 
    Brachte auch keine Besserung.
    Mein WG ignoriert scheinbar dieses Plugin..

    Danke für Support!

    #2
    Schwer zu sagen bei dieser Informationslage..

    Aber mal so als Tipp: Hätte es "in einfach" nicht auch der PI-Regler getan? (https://sourceforge.net/p/openautoma...eric/PI-Regler)
    Da nimmste einen Namen pro Heizkreis, fertig.

    Ich verstehe bei sowas ehrlich gesagt bis heute nicht, warum man das mit "multi" und "conf" künstlich verkomplizieren muss.
    Bei zweitausend Heizkreisen mag das ja einen Sinn ergeben, darunter jedoch nicht, weil man ewig sucht, wenns nicht geht..

    Zurück zum Thema: die Glaskugel braucht mehr Details: komplettes Plugin, /conf, log.

    Makki
    EIB/KNX & WireGate & HS3, Russound,mpd,vdr,DM8000, DALI, DMX
    -> Bitte KEINE PNs!

    Kommentar


      #3
      Zitat von makki Beitrag anzeigen
      Aber mal so als Tipp: Hätte es "in einfach" nicht auch der PI-Regler getan? (https://sourceforge.net/p/openautoma...eric/PI-Regler)
      Da nimmste einen Namen pro Heizkreis, fertig.

      Ich verstehe bei sowas ehrlich gesagt bis heute nicht, warum man das mit "multi" und "conf" künstlich verkomplizieren muss.
      Makki
      Ist so ziemlich das erste Plugin was ich genutzt habe. Kann man sicherlich einfacher machen wenn man einen Plan hat. Mittlerweile ist mein Kenntnisstand leicht gestiegen sodass ein für mich passenderes Plugin zu erstellen realistisch scheint.

      Hier der Plugin-Code:
      PHP-Code:
      #############################################################################
      # Plugin: Multi RTR
      # V0.7 2011-11-20
      # Copyright: Christian Mayer (mail at ChristianMayer.de)
      # License: GPL (v3)
      #
      # Plugin for multiple RTR (room temperature controllers) by using a PI
      # controller
      #
      # Suggested settings:
      # ===================
      # floor heating: ProportionalGain = 5 K, IntegralTime = 240 min (*)
      # hot water heating: ProportionalGain = 5 K, IntegralTime = 150 min (*)
      #
      # Uebersetzungshilfe:
      # ===================
      # ProportionalGain = Proportionalbereich in Kelvin
      # IntegralTime = Nachstellzeit in Minuten
      #
      # ---------
      # (*): GIRA manual for TS2+ with RTR 1052-00 / 1055-00, 01/06, page 71
      #############################################################################
      #############################################################################
      # Configuration:
      # --> change values in the conf.d directory!
      my %controllers = ();
      my %default = ();
      my $GlobalDisableGA '3/6/3';
      my $reset 0# set to 1 to reset the states, run script and change to 0 again
      my $show_debug 0# switches debug information that will be shown in the log
      #############################################################################
      # Do NOT change anything below!
      #############################################################################
      my $confFile '/etc/wiregate/plugin/generic/conf.d/'.basename($plugname,'.pl').'.conf';
      if (! -
      f $confFile)
      {
      plugin_log($plugname" no conf file [$confFile] found.");
      }
      else
      {
      plugin_log($plugname" reading conf file [$confFile].") if( $show_debug 1);
      open(CONF$confFile);
      my @lines = <CONF>;
      close($confFile);
      my $result = eval("@lines");
      if( 
      $show_debug )
      {
      (
      $result) and plugin_log($plugname"conf file [$confFile] returned result[$result]");
      }
      if ($@)
      {
      plugin_log($plugname"conf file [$confFile] returned:") if( $show_debug );
      my @parts split(/\n/, $@);
      if( 
      $show_debug )
      {
      plugin_log($plugname"--> $_") foreach (@parts);
      }
      }
      }
      #############################################################################
      # main()
      #############################################################################
      my $busActive = !(!keys %msg); # true if script was called due to bus traffic
      my $ret_val '';
      #############################################################################
      # Initialisation
      if( !$busActive # unnecesary during bus traffic
      {
      for 
      my $this_controller_name keys %controllers )
      {
      my %this_controller = (%{$controllers$this_controller_name }}, %default);
      # Initialise controller state variables
      if( $reset or not exists $plugin_info$plugname '_' $this_controller_name '_Actuator' } )
      {
      $plugin_info$plugname '_' $this_controller_name '_SetPoint' } = $this_controller'SetPointInit' };
      $plugin_info$plugname '_' $this_controller_name '_Integral' } = 0;
      $plugin_info$plugname '_' $this_controller_name '_Actuator' } = 0# Reset
      if( defined $this_controller'SetPointGA' } and defined $this_controller'SetPointDPT' } )
      {
      knx_write$this_controller'SetPointGA' }, $this_controller'SetPointInit' }, $this_controller'SetPointDPT' } ); # send initial value
      }
      # The ActuatorGA doesn't need to be sent here as !$busActive will also
      # cause the first round of controller calculations
      }
      # subscribe SetPointGA
      if( defined $this_controller'SetPointGA' } )
      {
      $plugin_subscribe$this_controller'SetPointGA' } }{ $plugname } = 1;
      }
      # subscribe SensorGA
      if( defined $this_controller'SensorGA' } )
      {
      $plugin_subscribe$this_controller'SensorGA' } }{ $plugname } = 1;
      }
      # subscribe ActuatorGA
      if( defined $this_controller'ActuatorGA' } )
      {
      $plugin_subscribe$this_controller'ActuatorGA' } }{ $plugname } = 1;
      }
      # subscribe DisableGA
      if( defined $this_controller'DisableGA' } )
      {
      $plugin_subscribe$this_controller'DisableGA' } }{ $plugname } = 1;
      $ret_val .= $this_controller_name ' disabled?';
      my $active knx_read$this_controller'DisableGA' } ) || 1# active if unreadable
      if ( !int($active) and defined $this_controller'ActuatorGA' } ) {
      if (
      knx_read$this_controller'ActuatorGA' } ) ne 0) { # only if not already 0
      knx_write$this_controller'ActuatorGA' }, 0$this_controller'ActuatorDPT' } );
      }
      $plugin_info$plugname '_' $this_controller_name '_Integral' } = 0;
      $plugin_info$plugname '_' $this_controller_name '_Actuator' } = 0# Reset
      $ret_val .= ' yes';
      } else {
      $ret_val .= ' no';
      }
      }
      }
      }
      # Set the update cycle to one minute
      $plugin_info{$plugname.'_cycle'} = 60;
      #############################################################################
      # Handle the bus traffic
      my $SetPointChange 0;
      if( 
      $busActive )
      {
      # Early exit during a response messeage - it's usually from us...
      if( $msg{'apci'eq 'A_GroupValue_Response' )
      {
      return;
      }
      # a linear search isn't smart but OK for only a few states:
      for my $this_controller_name keys %controllers )
      {
      my %this_controller = (%{$controllers$this_controller_name }}, %default);
      if( 
      $msg{'apci'eq 'A_GroupValue_Read' )
      {
      if( 
      $msg{'dst'eq $this_controller'SetPointGA' } and $this_controller'SetPointLFlag' })
      {
      # A read request for this GA was sent on the bus and the L-flag is set
      my $value $plugin_info$plugname '_' $this_controller_name '_SetPoint' };
      my $DPT $this_controller'SetPointDPT' };
      knx_write$msg{'dst'}, $value$DPT); # send response
      $ret_val .= 'read(' $msg{'dst'} . '=' $this_controller_name ') SetPoint -> ' $value;
      elsif$msg{'dst'eq $this_controller'ActuatorGA' } and $this_controller'ActuatorLFlag' })
      {
      # A read request for this GA was sent on the bus and the L-flag is set
      my $value $plugin_info$plugname '_' $this_controller_name '_Actuator' };
      my $DPT $this_controller'ActuatorDPT' };
      knx_write$msg{'dst'}, $value$DPT); # send response
      $ret_val .= 'read(' $msg{'dst'} . '=' $this_controller_name ') Actuator -> ' $value;
      }
      }
      elsif($msg{'apci'eq 'A_GroupValue_Write')
      {
      if( 
      $msg{'dst'eq $this_controller'SetPointGA' } )
      {
      # A new(?) setpoint was sent on the bus => update internal state
      # read from eibd cache, so we'll get the cast for free:
      my $value knx_read$msg{'dst'}, 0$this_controller'SetPointDPT' } );
      $plugin_info$plugname '_' $this_controller_name '_SetPoint' } = $value;
      $SetPointChange 1;
      $ret_val .= 'write(' $msg{'dst'} . '=' $this_controller_name ') ' $value ' -> SetPoint';
      }
      }
      }
      # if( $busActive )
      #############################################################################
      # Update the controllers
      if( !$busActive or $SetPointChange # only at init, cycle or set point change
      {
      my $dt time() - $plugin_info$plugname '_tlast' };
      $plugin_info$plugname '_tlast' } = time();
      $ret_val .= sprintf' dt: %.3f; '$dt );
      for 
      my $this_controller_name keys %controllers )
      {
      my %this_controller = (%{$controllers$this_controller_name }}, %default);
      my $prefix $plugname '_' $this_controller_name;
      my $Sensor knx_read$this_controller'SensorGA' }, 0$this_controller'SensorDPT' } );
      my $SetPoint $plugin_info$prefix '_SetPoint' };
      my $old $plugin_info$prefix '_Actuator' };
      my $kp 1.0 $this_controller'ProportionalGain' };
      my $error $SetPoint $Sensor;
      # caclulate the I part of the PI controller:
      $plugin_info$prefix '_Integral' } = $plugin_info$prefix '_Integral' } + $error $dt;
      my $integral $plugin_info$prefix '_Integral' } / (60.0 $this_controller'IntegralTime' });
      # put together the PI controller:
      $plugin_info$prefix '_Actuator' } = 100.0 $kp * ($error $integral);
      # clip at maximum to avoid windup:
      if( $plugin_info$prefix '_Actuator' } > 100 )
      {
      $ret_val .= '[>]';
      $plugin_info$prefix '_Actuator' } = 100;
      $plugin_info$prefix '_Integral' } = (1.0 $kp) * 60.0 $this_controller'IntegralTime' };
      }
      # clip at minimum
      if( $plugin_info$prefix '_Actuator' } < or $plugin_info$prefix '_Integral' } < )
      {
      $ret_val .= '[<]';
      $plugin_info$prefix '_Actuator' } = if $plugin_info$prefix '_Actuator' } < 0;
      $plugin_info$prefix '_Integral' } = 0;
      }
      #$plugin_info{ $prefix . '_Actuator' } = round( $plugin_info{ $prefix . '_Actuator' } );
      # If a GA is defined, send the new actuator value
      if( defined $this_controller'ActuatorGA' } and (
      (
      $old ne $plugin_info$prefix '_Actuator' }) or (time() - $plugin_info$prefix '_lastSent' } > $this_controller{'MinUpdateRate'} )) )
      {
      knx_write$this_controller'ActuatorGA' }, $plugin_info$prefix '_Actuator' }, $this_controller'ActuatorDPT' } );
      $plugin_info$prefix '_lastSent' } = time();
      }
      if( 
      defined $this_controller'SetPointRRD' } )
      {
      update_rrd$this_controller'SetPointRRD' }, ''$SetPoint );
      }
      if( 
      defined $this_controller'ActuatorRRD' } )
      {
      update_rrd$this_controller'ActuatorRRD' }, ''$plugin_info$prefix '_Actuator' } );
      }
      $ret_val .= $this_controller_name ': ' $SetPoint '<>' $Sensor '=>' $plugin_info$prefix '_Actuator' } . ' [' . ($error*$kp) . '/' $integral*$kp ']; ';
      }
      }
      if( 
      $show_debug ) { return $ret_val; }
      return;
      #############################################################################
      # Version history:
      # ================
      #
      # 0.7:
      # * change to external config (-> conf.d)
      # 0.6:
      # * Bug fix for setups where the WireGate didn't know the ActuatorGA
      # * Force sending of actuator after x seconds/minutes so that the watchdog in
      # the actuator doesn't time out
      # 0.5:
      # * initial release
      #
      #############################################################################
      # ToDo:
      # =====
      # * Limit bus traffic by sending actuator values after a change that is bigger
      # than x%
      # * Add GA for sending delta values for the setpoint
      # * External Config
      # * Actuator overwrite ("Zwangsstellung")
      # * Hard temperature limit (min, max)
      ############################################################################# 
      hier die config:
      PHP-Code:
      #-----------------------------------------------------------------------------
      # ACHTUNG: Variablen duerfen nur im Plugin mit 'my' definiert werden,
      #          'my' hier nicht verwenden!
      #-----------------------------------------------------------------------------

      #############################################################################
      # Configuration:
      %controllers = (
        
      'FBH-Bad'   => {
          
      'SetPointGA' => '3/2/2''SetPointRRD' => 'FBH-Bad_Sollwert'
          
      'SensorGA'   => '5/2/15'
          
      'ActuatorGA' => '3/2/0''ActuatorRRD' => 'FBH-Bad_Regelung'
          
      'ProportionalGain' => 5'IntegralTime' => 150 
        
      },
          
      'FBH-Küche'   => {
          
      'SetPointGA' => '3/1/2''SetPointRRD' => 'FBH-Küche_Sollwert'
          
      'SensorGA'   => '5/1/23'
          
      'ActuatorGA' => '3/1/0''ActuatorRRD' => 'FBH-Küche_Regelung'
          
      'ProportionalGain' => 5'IntegralTime' => 150 
        
      },
      );
      %default = (
        
      'SetPointDPT'   => 9.001,
        
      'SensorDPT'     => 9.001,
        
      'ActuatorDPT'   => 1,
        
      'DisableDPT'    => 1,
        
      'SetPointInit'  => 21.0,
        
      'SetPointLFlag' => 1# true
        
      'ActuatorLFlag' => 1# true
        
      'MinUpdateRate' => 60# 5 minutes
      );

      $GlobalDisableGA '3/6/3';

      $reset      0;  Reset to 1 to reset the statesrun script and change to 0 again
      $show_debug 
      1# switches debug information that will be shown in the log

      #############################################################################
      1
      Als Anhang der Auszug aus dem plugin_subscribe_debug:
      Demnach meldet sich das Plugin MultiRTR_V1 nirgendwo mehr an.
      Warum auch immer?
      Im Log steht demnach auch nix.

      Was kann ich noch an Infos bereit stellen?
      Angehängte Dateien

      Kommentar


        #4
        Da das Multi-RTR Plugin seit Jahren unverändert ohne Probleme läuft, muss es irgendwo in dem Teil liegen, der bei Dir spezifisch ist. Z.B. der Config-Datei.
        Zitat von Ziegelstein Beitrag anzeigen
        Wie kann ich hier systematisch vor gehen umd den Grund für das nicht-Funktionieren einzukreisen?
        Die Plugin-Log-Datei (/var/log/wiregate_plugin.log) gibt mir immer am meisten Infos. Insb. wenn irgendwo ein Syntax-Fehler sich eingeschlichen hat.
        Zitat von Ziegelstein Beitrag anzeigen
        PHP-Code:
        $reset      0;  Reset to 1 to reset the statesrun script and change to 0 again 
        Wieso ist der Kommentar nicht auskommentiert? D.h. wieso fehlt da die Raute '#'?
        Zitat von makki Beitrag anzeigen
        Aber mal so als Tipp: Hätte es "in einfach" nicht auch der PI-Regler getan? (https://sourceforge.net/p/openautoma...eric/PI-Regler)
        Da nimmste einen Namen pro Heizkreis, fertig.

        Ich verstehe bei sowas ehrlich gesagt bis heute nicht, warum man das mit "multi" und "conf" künstlich verkomplizieren muss.
        Weil zig Plugins dafür zum einen unübersichtlich sind und zum anderen blöd in der Wartung. Außerdem alle genau das gleiche machen und identisch sind, außer 1-2 Zeilen.
        Ich dachte ein Admin ist faul und automatisiert deshalb alles? Ein Multi-Skript automatisiert das Anlegen und pflegen von zig Einzel-Skripten
        TS2, B.IQ, DALI, WireGate für 1wire so wie Server für Logik und als KNX Visu die CometVisu auf HomeCockpit Minor. - Bitte keine PNs, Fragen gehören in das Forum, damit jeder was von den Antworten hat!

        Kommentar


          #5
          Zitat von Chris M. Beitrag anzeigen

          Wieso ist der Kommentar nicht auskommentiert? D.h. wieso fehlt da die Raute '#'?
          da haben wir es. mit Raute gehts wieder. Da habe ich mich wohl verdaddelt - wieder mal. (Beim Reseten der durch 1/0.
          So ein kleines Symbol. Wieder Jahre gealtert --> Völlig umsonst.

          Danke Chris!!!

          Kommentar


            #6
            Zitat von Chris M. Beitrag anzeigen
            Weil zig Plugins dafür zum einen unübersichtlich sind und zum anderen blöd in der Wartung. Außerdem alle genau das gleiche machen und identisch sind, außer 1-2 Zeilen.
            Ich dachte ein Admin ist faul und automatisiert deshalb alles? Ein Multi-Skript automatisiert das Anlegen und pflegen von zig Einzel-Skripten
            Genau deswegen finde ich dieses Plugin klasse und es tut seit Jahren. Danke dafür Chris!

            Kommentar


              #7
              Zitat von makki Beitrag anzeigen
              Ich verstehe bei sowas ehrlich gesagt bis heute nicht, warum man das mit "multi" und "conf" künstlich verkomplizieren muss.
              Weil ein studierter Informatiker lernt, Programme und Daten (dazu gehört auch die Config) zu trennen. Das bedeutet, Einstellungen nicht hart zu kodieren.

              Klar ist das zunächst aufwändig, aber die Vorteile überwiegen.

              Es ist schon richtig so, wie Chris das gemacht hat.

              lg

              Stefan

              Kommentar

              Lädt...
              X