Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - Beschattungssteuerung

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

    #46
    Zum Testen habe ich einmal geändert:
    Code:
      # Prüfen, ob das Telegramm etwas am aktuellen Status ändert und ggf. merken
      if ($gv_elevation >  0 and $gv_elevation <= 10 and $gv_helligkeit >= 100) { $gv_beschattungEin = 'J'; }
      if ($gv_elevation > 10 and $gv_elevation <= 20 and $gv_helligkeit >= 20000) { $gv_beschattungEin = 'J'; }
      if ($gv_elevation > 20 and $gv_elevation <= 30 and $gv_helligkeit >= 30000) { $gv_beschattungEin = 'J'; }
      if ($gv_elevation > 30 and $gv_elevation <= 40 and $gv_helligkeit >= 40000) { $gv_beschattungEin = 'J'; }
      if ($gv_elevation > 40 and $gv_elevation <= 50 and $gv_helligkeit >= 50000) { $gv_beschattungEin = 'J'; }
      if ($gv_elevation > 50 and $gv_elevation <= 90 and $gv_helligkeit >= 75000) { $gv_beschattungEin = 'J'; }
    
      if ($gv_elevation <  0) { $gv_beschattungEin = 0; }
      if ($gv_elevation >  0 and $gv_elevation <= 10 and $gv_helligkeit < 100) { $gv_beschattungEin = 'N'; }
      if ($gv_elevation > 10 and $gv_elevation <= 20 and $gv_helligkeit < 20000) { $gv_beschattungEin = 'N'; }
      if ($gv_elevation > 20 and $gv_elevation <= 30 and $gv_helligkeit < 30000) { $gv_beschattungEin = 'N'; }
      if ($gv_elevation > 30 and $gv_elevation <= 40 and $gv_helligkeit < 40000) { $gv_beschattungEin = 'N'; }
      if ($gv_elevation > 40 and $gv_elevation <= 50 and $gv_helligkeit < 50000) { $gv_beschattungEin = 'N'; }
      if ($gv_elevation > 50 and $gv_elevation <= 90 and $gv_helligkeit < 75000) { $gv_beschattungEin = 'N'; }
    Ich vergleiche also bei 0<gv_elevation<=10 mit dem Helligkeitswert 100. Aktuell haben wir 357 Lux.

    Plugin Debug Infos:
    beschattung_v2.pl_azimuth 290.351747376989
    beschattung_v2.pl_beschattungEin EIN
    beschattung_v2.pl_beschattungEinTime 1203
    beschattung_v2.pl_beschattungFreigabe EIN
    beschattung_v2.pl_beschattungFreigabeOld EIN
    beschattung_v2.pl_cycle 60
    beschattung_v2.pl_elevation 6.59716245989438
    beschattung_v2.pl_gt_raffstores_dyn UG_BUERO_TUER->A->0->EIN;UG_BUERO_S->A->1->EIN
    beschattung_v2.pl_last 1343931697.22061
    beschattung_v2.pl_lastsaved 1343930586
    beschattung_v2.pl_meminc 0.299999999999999
    beschattung_v2.pl_memstart 0
    beschattung_v2.pl_result UG_BUERO_TUER->A->0->EIN;UG_BUERO_S->A->1->EIN
    beschattung_v2.pl_runtime 0
    beschattung_v2.pl_sperre 0
    beschattung_v2.pl_ticks 253
    beschattung_v2.pl_timeout_err 0

    Letzte Änderung durchgeführt: ca. 20:03h.
    Helligkeitsverlauf (siehe screenshot) (vor 19:50h passte der Datentyp für die Helligkeit noch nicht)

    Herzlichen Dank, dass Du einmal draufschauen möchtest.

    Gruß, Joachim
    Angehängte Dateien
    EibPC - Wiregate

    Kommentar


      #47
      Hallo Marcus,

      Elevation ist inzwischen 0 und sinkt weiter (Sonne geht eben auch hier mal unter). Habe den Vergleich mit der Helligkeit daher wieder auf den originalen zurück-geändert. Vielleicht haben wir ja morgen noch eine Idee, was ich testen kann.

      Besten Dank für Deine Unterstützung!

      Gruß, Joachim
      EibPC - Wiregate

      Kommentar


        #48
        Hi,

        bin gerade erst heimgekommen und schau mir gerade deine Daten an.

        Also wieso vor 19:50 nichts funktioniert hat ist klar, es war dunkel (wegen dem falschen Datentyp bei der Helligkeit).

        Mit den Daten im Posting #46 kann auch kein Raffstore herunterfahren, weil sie bei Azimuth-Winkel 220 bzw. 265 aufhören und da der Azimuth schon auf 290 war.

        Außerdem ist im Büro die Sperre gesetzt, ich geh mal davon aus, dass du auf die GA 0/4/9 eine 1 gesendet hast. In dem Fall wird die Beschattung gesperrt und extern (also von dir selbst) gesteuert.
        beschattung_v2.pl_gt_raffstores_dyn UG_BUERO_TUER->A->0->EIN;UG_BUERO_S->A->1->EIN

        Die Werte heißen soviel wie:
        UG_BUERO_TUER ist die ID, die du angegeben hast
        A heißt die Automatik ist aktiv (I wäre inaktiv)
        0 heißt es gibt keine externe Sperre (1 wäre extern gesperrt)
        EIN heißt das Fenster ist geschlossen, es wird also automatisch beschattet (AUS wäre das Fenster offen, keine Automatik -> Beschattung fährt ganz rauf)

        Im Prinzip hätte das Makro um 19:50 beschattet, behaupte ich, sofern einer deiner Rolläden in der richtigen Ausrichtung gewesen wäre.
        beschattung_v2.pl_beschattungEin = EIN heißt, dass es seit einer bestimmten Zeit sonnig genug zum beschatten ist.
        beschattung_v2.pl_beschattungEinTime ist die Zeit zu der es sonnig genug wurde (bei dir 20:03)
        beschattung_v2.pl_beschattungFreigabe = EIN heißt, dass es lang genug sonnig war, dass die Beschattung losläuft (sind 5 Minuten)

        Wenns blöd hergeht, dann läufts morgen schon einfach so.

        Was mich noch interessieren würde, du hast ja keine gesonderte Rückmeldeadresse für die Rollo-Position. Ist bei dir dann die Rollo-Position auslesbar? Also die gaRolloPos?

        LG
        Marcus

        Kommentar


          #49
          Hallo Marcus,Herzlichen Dank für die Analyse. Ja - so macht das natürlich Sinn. Die Sperren der beiden Rollos waren absichtlich so gesetzt - ein laufendes Rollo hätte ich da erwartet. Mein Fehler war, dass ich den Azimuth nicht beachtet hatte. Also vermutlich alles ok. Das werde ich dann morgen sehen. Ich werde berichten.
          Danke Dir und Gute Nacht!
          Gruß, Joachim
          EibPC - Wiregate

          Kommentar


            #50
            Hallo Marcus!

            Ich habe heute noch ein wenig getestet: 100% erfolgreich!
            Das Plugin läuft echt klasse!
            Wenn die Sonne ins Fenster scheint (also die Winkel passen), fahren die Rolladen herunter und später wieder hoch - so soll es sein!

            Herzlichen Dank dafür!

            Ich könnte mir noch ein paar Ergänzungen vorstellen:
            1) Variable in ein Conf-File
            So könnte das Plugin weiterentwickelt und updated werden, ohne dass man die eigenen Variablen nach-editieren muss
            2) Bei Rolladen: Beschattung nur auf "Schlitz"
            Ich würde ich zur Beschattung nicht gern komplett verdunkeln wollen (das Thema hast Du bei Raffstores nicht), sondern nur bis zu einem fenster-individuellen Prozentwert. Eben auf "Ritze".

            Mal sehen, ob ich etwas davon hinbekomme...

            Gruß, Joachim
            EibPC - Wiregate

            Kommentar


              #51
              Hi,

              das freut mich zu hören! :-)

              Deine Vorschläge hab ich auch schon im Hinterkopf, nur bisher noch nicht eingebaut.

              Außerdem weiß ich noch zumindest einen Fehler, der noch behoben gehört. Ist nichts Schlimmes, aber wenn man während des Tages (wenn beschattet werden soll) die Raffstores manuell sperrt und die Sperre erst am Abend (wenn nicht mehr beschattet werden soll) wegnimmt, fahren sie nicht automatisch nach oben. Ist mir vor Kurzem mal aufgefallen ... muss ich noch beheben.

              LG
              Marcus

              Kommentar


                #52
                Hallo Marcus,

                ich habe die Änderungen einmal eingepflegt:

                1) Variable in ein Conf-File
                Somit kann man seine lokalen Gegebenheiten in diesem Conf-File festlegen. Das eigentliche Plugin ist allgemeingültig einsetzbar.

                2) Bei Rolladen: Beschattung nur auf "Schlitz"
                Mit einer zusätzlichen Variablen je Rolladen kann nun angegeben werden, auf welche Position beschattet werden soll. Du bist bisher immer auf 100% heruntergefahren. Bei Rolladen kann 50% oder auch 75% - eben eine beliebige Beschattungsposition konfiguriert werden.

                Das Einlesen der Konfiguration aus einem Conf-File wurde aus einem anderen Plugin (Russound_RIO) von Chris M. übernommen. Herzlichen Dank dahingehend an Chris M.

                Mein Conf-File:
                Code:
                # [BOF /etc/wiregate/plugin/generic/conf.d/beschattung_v2.conf]
                
                # Geografische Lage
                ($gv_lat, $gv_lon, $gv_elev) = (
                 52.184513777643,       # Breitengrad in Grad
                 8.7655314803123,       # Längengrad in Grad
                 55 / 1000              # Höhe über NN in Kilometer (deswegen geteilt durch 1000)
                );
                
                # Gruppenadressen
                # GA für die Helligkeit
                $gv_gaHelligkeit = '6/6/20';
                # GA um die gesamte Beschattungs-Automatik zu sperren
                $gv_gaSperre = '0/4/10';
                
                # Alle Raffstores
                # id: ID des Raffstores (evtl. für Variablen, die benötigt werden)
                # name: Name, falls irgendwelche Meldungen ausgegeben werden
                # ausrichtung: Ausrichtung des Raffstores (z.B.: Süd = 180) Wird zur Berechnung des Start- und Endwinkels der Beschattung verwendet, sofern die Werte nicht direkt vorgegeben werden
                # startWinkel: Startwinkel der Beschattung
                # endWinkel: Endwinkel der Beschattung
                # aktiv: Beschattung aktiv für dieses Fenster
                # sperre: Beschattung für diesen Raffstore gesperrt (von außen)
                # automatik: Automatik für diesen Raffstore aktiv (von innen, z.B. wenn das Fenster geöffnet wird -> automatik aus, Raffstore ganz nach oben)
                # lamellenNachfuehrung: Wird die Lamelle dem Sonnenstand nachgeführt, oder sobald beschattet werden soll einfach ganz zugeklappt
                # rolloBeschattungspos: Das Rollo wird zur Beschattung auf diese Position gefahren (z.B. 100 = 100% = runter)
                # gaRollo: GA des Rollo-Objekts für den Raffstore
                # gaRolloRM: Rückmelde-GA des Rollo-Objekts für den Raffstore
                # gaLamellePos: GA des Lamellen-Objekts für den Raffstore
                # gaLamellePosRM: Rückmelde-GA des Lamellen-Objekts für den Raffstore
                # gaFensterStatus: GA des Reed-Kontakts des Fensters (Wenn das Fenster geöffnet wird, fährt der Raffstore ganz nach oben)
                # gaTemperatur: Wird dzt. nicht verwendet! GA des Temperatursensores für das Fenster (kann verwendet werden, damit erst ab einer bestimmten Temperatur beschattet wird)
                # gaSperre: GA zum Sperren der Beschattungs-Automatik für desen Raffstore (z.B. wenn eine andere Funktion einen Raffstore fix ganz nach oben oder unten fährt)
                ##push @gt_raffstores, { id => "UG_WZ_SUE_FEN", name => "Wohnzimmer Süd Fenster", ausrichtung => 180, startWinkel => 95, endWinkel => 265, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/3", gaRolloPosRM => "3/4/3", gaLamellePos => "3/3/3", gaLamellePosRM => "3/5/3", gaFensterStatus => "", gaTemperatur => "4/1/0", gaSperre => "3/6/3" };
                ##push @gt_raffstores, { id => "UG_WZ_WES_FEN", name => "Wohnzimmer West Fenster", ausrichtung => 270, startWinkel => 185, endWinkel => 300, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/4", gaRolloPosRM => "3/4/4", gaLamellePos => "3/3/4", gaLamellePosRM => "3/5/4", gaFensterStatus => "4/0/24", gaTemperatur => "4/1/0", gaSperre => "3/6/4" };
                ##push @gt_raffstores, { id => "UG_KUE_SUE_TUE", name => "Küche Süd Tür", ausrichtung => 180, startWinkel => 170, endWinkel => 265, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/5", gaRolloPosRM => "3/4/5", gaLamellePos => "3/3/5", gaLamellePosRM => "3/5/5", gaFensterStatus => "4/0/25", gaTemperatur => "4/1/0", gaSperre => "3/6/5" };
                ##push @gt_raffstores, { id => "UG_KUE_SUE_FEN", name => "Küche Süd Fenster", ausrichtung => 180, startWinkel => 120, endWinkel => 265, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/6", gaRolloPosRM => "3/4/6", gaLamellePos => "3/3/6", gaLamellePosRM => "3/5/6", gaFensterStatus => "4/0/26", gaTemperatur => "4/1/0", gaSperre => "3/6/6" };
                ##push @gt_raffstores, { id => "UG_KUE_WES_FEN", name => "Küche West Fenster", ausrichtung => 270, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/7", gaRolloPosRM => "3/4/7", gaLamellePos => "3/3/7", gaLamellePosRM => "3/5/7", gaFensterStatus => "4/0/27", gaTemperatur => "4/1/0", gaSperre => "3/6/7" };
                ##push @gt_raffstores, { id => "OG_SZE_SUE_FEN", name => "SZE Süd Fenster", ausrichtung => 180, startWinkel => 95, endWinkel => 265, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_AUS, gaRolloPos => "3/2/11", gaRolloPosRM => "3/4/11", gaLamellePos => "3/3/11", gaLamellePosRM => "3/5/11", gaFensterStatus => "", gaTemperatur => "4/1/0", gaSperre => "3/6/11" };
                ##push @gt_raffstores, { id => "OG_K1_SUE_FEN", name => "K1 Süd Fenster", ausrichtung => 180, startWinkel => 95, endWinkel => 265, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/12", gaRolloPosRM => "3/4/12", gaLamellePos => "3/3/12", gaLamellePosRM => "3/5/12", gaFensterStatus => "", gaTemperatur => "4/1/0", gaSperre => "3/6/12" };
                ##push @gt_raffstores, { id => "OG_K1_WES_FEN", name => "K1 West Fenster", ausrichtung => 270, startWinkel => 185, endWinkel => 355, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/13", gaRolloPosRM => "3/4/13", gaLamellePos => "3/3/13", gaLamellePosRM => "3/5/13", gaFensterStatus => "4/0/33", gaTemperatur => "4/1/0", gaSperre => "3/6/13" };
                ##push @gt_raffstores, { id => "OG_K3_WES_TUE", name => "K3 West Tür", ausrichtung => 270, startWinkel => 185, endWinkel => 355, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_EIN, gaRolloPos => "3/2/14", gaRolloPosRM => "3/4/14", gaLamellePos => "3/3/14", gaLamellePosRM => "3/5/14", gaFensterStatus => "4/0/34", gaTemperatur => "4/1/0", gaSperre => "3/6/14" };
                
                # Ost-Fenster:
                push @gt_raffstores, { id => "UG_BUERO_O",    name => "UG Büro Ost", ausrichtung =>  90, startWinkel =>  5, endWinkel => 135, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_AUS, rolloBeschattungspos => 68, gaRolloPos => "0/0/9" , gaRolloPosRM => "0/0/9" , gaLamellePos => "0/0/0", gaLamellePosRM => "0/0/0", gaFensterStatus => "", gaTemperatur => "0/0/0", gaSperre => "0/4/11" };
                
                # Süd-Ost-Fenster:
                push @gt_raffstores, { id => "UG_BUERO_TUER", name => "UG Büro Tür", ausrichtung => 135, startWinkel => 50, endWinkel => 180, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_AUS, rolloBeschattungspos => 70, gaRolloPos => "0/0/15", gaRolloPosRM => "0/0/15", gaLamellePos => "0/0/0", gaLamellePosRM => "0/0/0", gaFensterStatus => "", gaTemperatur => "0/0/0", gaSperre => "0/4/9" };
                
                # Süd-Fenster:
                push @gt_raffstores, { id => "UG_BUERO_S",    name => "UG Büro Süd", ausrichtung => 180, startWinkel => 95, endWinkel => 220, aktiv => AKTIV, sperre => SPERRE_INAKTIV, automatik => AUTOMATIK_EIN, lamellenNachfuehrung => NACHF_AUS, rolloBeschattungspos => 68, gaRolloPos => "0/0/12", gaRolloPosRM => "0/0/12", gaLamellePos => "0/0/0", gaLamellePosRM => "0/0/0", gaFensterStatus => "", gaTemperatur => "0/0/0", gaSperre => "0/4/8" };
                
                
                $show_debug = 1;  # switches debug information that will be shown in the log
                
                
                # [EOF /etc/wiregate/plugin/generic/conf.d/beschattung_v2.conf]
                Der Plugin-Code:
                Code:
                # Abhängigkeiten:
                # - Paket libastro-satpass-perl
                #   - Astro::Coord::ECI;
                #   - Astro::Coord::ECI::Sun;
                #   - Astro::Coord::ECI::TLE;
                #   - Astro::Coord::ECI::Utils qw{rad2deg deg2rad};
                #   - Installation:
                #     - Wiregate Web-IF unter Updates Paket installieren libastro-satpass-perl oder
                #     - in der Konsole apt-get -install libastro-satpass-perl
                
                # plugin_info-Werte
                # - beschattungEin: Beschattung wäre aktuell ein oder aus (ohne Verzögerung)
                # - beschattungEinTime: Zeitpunkt zu dem die Beschattung zuletzt ein- oder ausgeschaltet wurde
                # - beschattungFreigabe: Nach 5 Minuten ein oder 15 Minuten aus, wird die Freigabe erteilt, oder aufgehoben
                # - elevation: Aktueller Elevation-Winkel
                # - azimuth: Aktueller Azimuth-Winkel
                
                # Offene Punkte:
                # - Im Winter nur auf 90% nach unten fahren (Aneisungsgefahr)
                # - Beschattung abhängig von der Raumtemperatur
                
                # Änderungen:
                # 20120804 - joda123 - rollo_beschattungsposition eingeführt: Rollos können bei
                #            Beschattung jetzt n% geschlossen werden (vorher immer 100%)
                # 20120805 - joda123 - Lokale Definitionen in conf Datei ausgelagert: Es sind keine
                #            site-spezifischen Definitionen in diesem Script mehr erforderlich.
                #            Alle lokalen Anpassungen in /etc/wiregate/plugin/generic/conf.d/beschattung_v2.conf
                
                # Konstanten für Aufrufart
                use constant EVENT_RESTART => 'restart';
                use constant EVENT_MODIFIED => 'modified';
                use constant EVENT_BUS => 'bus';
                use constant EVENT_SOCKET => 'socket';
                use constant EVENT_CYCLE => 'cycle';
                # Konstanten für Beschattung ein/aus
                use constant BESCHATTUNG_AUS => 'AUS';
                use constant BESCHATTUNG_EIN => 'EIN';
                # Konstanten für Beschattung Freigabe ein/aus
                use constant FREIGABE_AUS => 'AUS';
                use constant FREIGABE_EIN => 'EIN';
                # Konstanten für Nachführung ein/aus
                use constant NACHF_AUS => 'AUS';
                use constant NACHF_EIN => 'EIN';
                # Konstanten für Raffstore-Attribute
                use constant AKTIV => 'A';
                use constant INAKTIV => 'I';
                use constant SPERRE_AKTIV => 1;
                use constant SPERRE_INAKTIV => 0;
                use constant AUTOMATIK_EIN => 'EIN';
                use constant AUTOMATIK_AUS => 'AUS';
                # Konstanten für die Trennung der dynamischen Raffstore-Definitionen
                use constant SEPARATOR1 => ';';
                use constant SEPARATOR2 => '->';
                
                # Variablendefinitionen
                my $gv_lat;
                my $gv_lon;
                my $gv_elev;
                my $gv_gaHelligkeit;
                my $gv_gaSperre;
                my $gv_helligkeit;
                my $gv_azimuth;
                my $gv_elevation;
                my $gv_beschattungEin;
                my $gv_zeitpunkt;
                my $gv_zeitdifferenz;
                my $gs_raffstore;
                my @gt_raffstores;
                my $gv_raffstore_dyn;
                my @gt_raffstores_dyn;
                my $gv_id;
                my $gv_aktiv;
                my $gv_sperre;
                my $gv_automatik;
                my $gv_startWinkel;
                my $gv_endWinkel;
                my $gv_rolloPos;
                my $gv_lamellePos;
                my $gv_lamellePosNeu;
                my $gv_index;
                # Zeitpunkt auslesen
                my $gv_sekunden;
                my $gv_minuten;
                my $gv_stunden;
                my $gv_monatstag;
                my $gv_monat;
                my $gv_jahr;
                my $gv_wochentag;
                my $gv_jahrestag;
                my $gv_sommerzeit;
                
                my $show_debug; # switches debug information that will be shown in the log
                
                
                #########################################################################################
                # Ab hier beginnt das Programm -> Sollte im Idealfall nicht mehr verändert werden müssen
                #########################################################################################
                
                # Read config file in conf.d
                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 > 1 )
                  {
                    ($result) and plugin_log($plugname, "conf file [$confFile] returned result[$result]");
                  }
                  if ($@) 
                  {
                    plugin_log($plugname, "conf file [$confFile] returned:") if( $show_debug > 1 );
                    my @parts = split(/\n/, $@);
                    if( $show_debug > 1 )
                    {
                      plugin_log($plugname, "--> $_") foreach (@parts);
                    }
                  }
                }
                
                # Ruf mich alle 60 Sekunden selbst auf, damit ich prüfen kann, ob die Helligkeit über-/unterschritten wurde
                $plugin_info{$plugname.'_cycle'} = 60;
                # Ruf mich auf, wenn sich die Helligkeit ändert, damit ich meine Helligkeits-Variable setzen kann
                if ($gv_gaHelligkeit ne '') {
                 $plugin_subscribe{$gv_gaHelligkeit}{$plugname} = 1;
                }
                # Ruf mich auf, wenn die Automatik gesperre oder freigegeben wird
                if ($gv_gaSperre ne '') {
                 $plugin_subscribe{$gv_gaSperre}{$plugname} = 1;
                }
                # Ruf mich auf, wenn sich an der Sperr-GA eines Raffstores etwas ändert
                # Ruf mich auf, wenn sich der Fenster-Status ändert
                foreach $gs_raffstore (@gt_raffstores) {
                 if ($gs_raffstore->{gaSperre} ne "") {
                  $plugin_subscribe{$gs_raffstore->{gaSperre}}{$plugname} = 1;
                 }
                 if ($gs_raffstore->{gaFensterStatus} ne "") {
                  $plugin_subscribe{$gs_raffstore->{gaFensterStatus}}{$plugname} = 1;
                 }
                }
                
                # Dynamische Teile der Raffstore-Definition einlesen
                @gt_raffstores_dyn = split(SEPARATOR1, $plugin_info{$plugname.'_gt_raffstores_dyn'});
                foreach $gv_raffstore_dyn (@gt_raffstores_dyn) {
                 ($gv_id, $gv_aktiv, $gv_sperre, $gv_automatik) = split(SEPARATOR2, $gv_raffstore_dyn);
                 
                 # Wegen Update auf gt_raffstores hier eine for-Schleife
                 for ($gv_index=0; $gv_index<@gt_raffstores; $gv_index++) {
                  $gs_raffstore = $gt_raffstores[$gv_index];
                  if ($gs_raffstore->{id} eq $gv_id) {
                   if ($gv_aktiv ne '') {
                    $gs_raffstore->{aktiv} = $gv_aktiv;
                   }
                   if ($gv_sperre ne '') {
                    $gs_raffstore->{sperre} = $gv_sperre;
                   }
                   if ($gv_automatik ne '') {
                    $gs_raffstore->{automatik} = $gv_automatik;
                   }
                   $gt_raffstores[$gv_index] = $gs_raffstore;
                   last();
                  }
                 }
                }
                
                # Module laden
                use Astro::Coord::ECI;
                use Astro::Coord::ECI::Sun;
                use Astro::Coord::ECI::TLE;
                use Astro::Coord::ECI::Utils qw{rad2deg deg2rad};
                
                # Aus welchem Grund läuft das Plugin gerade
                my $gv_event=undef;
                if (!$plugin_initflag) {
                 $gv_event = EVENT_RESTART;            # Restart des daemons / Reboot
                } elsif ($plugin_info{$plugname.'_lastsaved'} > $plugin_info{$plugname.'_last'}) {
                 $gv_event = EVENT_MODIFIED;        # Plugin modifiziert
                } elsif (%msg) {
                 $gv_event = EVENT_BUS;                # Bustraffic
                } elsif ($fh) {
                 $gv_event = EVENT_SOCKET;            # Netzwerktraffic
                } else {
                 $gv_event = EVENT_CYCLE;            # Zyklus
                }
                
                if ($gv_event eq EVENT_RESTART) {
                 # Default nicht beschatten, falls der Wert noch nicht existiert
                 if (!exists $plugin_info{$plugname.'_beschattungFreigabe'}) {
                  $plugin_info{$plugname.'_beschattungFreigabe'} = FREIGABE_AUS;
                 }
                 # Evtl. Sperre setzen, falls noch nicht existent
                 if (!exists $plugin_info{$plugname.'_sperre'}) {
                  $plugin_info{$plugname.'_sperre'} = SPERRE_INAKTIV;
                 }
                 # Evtl. Werte initialisieren, falls es sie noch nicht gibt.
                 if (!exists $plugin_info{$plugname.'_beschattungEin'}) {
                  $plugin_info{$plugname.'_beschattungEin'} = BESCHATTUNG_AUS;
                 }
                 if (!exists $plugin_info{$plugname.'_beschattungEinTime'}) {
                  ($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                  $gv_zeitpunkt = $gv_minuten + ($gv_stunden*60);
                  $plugin_info{$plugname.'_beschattungEinTime'} = $gv_zeitpunkt;
                 }
                } elsif ($gv_event eq EVENT_MODIFIED) {
                 # Default nicht beschatten, falls der Wert noch nicht existiert
                 if (!exists $plugin_info{$plugname.'_beschattungFreigabe'}) {
                  $plugin_info{$plugname.'_beschattungFreigabe'} = FREIGABE_AUS;
                 }
                 # Evtl. Sperre setzen, falls noch nicht existent
                 if (!exists $plugin_info{$plugname.'_sperre'}) {
                  $plugin_info{$plugname.'_sperre'} = SPERRE_INAKTIV;
                 }
                 # Evtl. Werte initialisieren, falls es sie noch nicht gibt.
                 if (!exists $plugin_info{$plugname.'_beschattungEin'}) {
                  $plugin_info{$plugname.'_beschattungEin'} = BESCHATTUNG_AUS;
                 }
                 if (!exists $plugin_info{$plugname.'_beschattungEinTime'}) {
                  ($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                  $gv_zeitpunkt = $gv_minuten + ($gv_stunden*60);
                  $plugin_info{$plugname.'_beschattungEinTime'} = $gv_zeitpunkt;
                 }
                } elsif ($gv_event eq EVENT_BUS) {
                 if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $gv_gaHelligkeit) {
                  # Aufruf durch Helligkeits-Telegramm
                  $gv_helligkeit = $msg{'value'};
                
                  # Helligkeit im RRD mitloggen
                  update_rrd("MyHelligkeit","",$gv_helligkeit);
                
                  # Azimuth und Elevation einlesen, damit ich bestimmen kann, ob beschattet werden muss, oder nicht.  
                  $gv_elevation = $plugin_info{$plugname.'_elevation'};
                  $gv_azimuth = $plugin_info{$plugname.'_azimuth'};
                
                  # Prüfen, ob das Telegramm etwas am aktuellen Status ändert und ggf. merken
                  if ($gv_elevation >  0 and $gv_elevation <= 10 and $gv_helligkeit >=  5000) { $gv_beschattungEin = 'J'; }
                  if ($gv_elevation > 10 and $gv_elevation <= 20 and $gv_helligkeit >= 10000) { $gv_beschattungEin = 'J'; }
                  if ($gv_elevation > 20 and $gv_elevation <= 30 and $gv_helligkeit >= 15000) { $gv_beschattungEin = 'J'; }
                  if ($gv_elevation > 30 and $gv_elevation <= 40 and $gv_helligkeit >= 20000) { $gv_beschattungEin = 'J'; }
                  if ($gv_elevation > 40 and $gv_elevation <= 50 and $gv_helligkeit >= 25000) { $gv_beschattungEin = 'J'; }
                  if ($gv_elevation > 50 and $gv_elevation <= 90 and $gv_helligkeit >= 30000) { $gv_beschattungEin = 'J'; }
                
                  if ($gv_elevation <  0) { $gv_beschattungEin = 0; }
                  if ($gv_elevation >  0 and $gv_elevation <= 10 and $gv_helligkeit <  5000) { $gv_beschattungEin = 'N'; }
                  if ($gv_elevation > 10 and $gv_elevation <= 20 and $gv_helligkeit < 10000) { $gv_beschattungEin = 'N'; }
                  if ($gv_elevation > 20 and $gv_elevation <= 30 and $gv_helligkeit < 15000) { $gv_beschattungEin = 'N'; }
                  if ($gv_elevation > 30 and $gv_elevation <= 40 and $gv_helligkeit < 20000) { $gv_beschattungEin = 'N'; }
                  if ($gv_elevation > 40 and $gv_elevation <= 50 and $gv_helligkeit < 25000) { $gv_beschattungEin = 'N'; }
                  if ($gv_elevation > 50 and $gv_elevation <= 90 and $gv_helligkeit < 30000) { $gv_beschattungEin = 'N'; }
                
                  # Abhängig vom letzten gültigen Wert den neuen beschattungEin setzen
                  if ($gv_beschattungEin eq 'J' and $plugin_info{$plugname.'_beschattungEin'} eq BESCHATTUNG_AUS) {
                   ($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                   $gv_zeitpunkt = $gv_minuten + ($gv_stunden*60);
                   $plugin_info{$plugname.'_beschattungEin'} = BESCHATTUNG_EIN;
                   $plugin_info{$plugname.'_beschattungEinTime'} = $gv_zeitpunkt;
                  } elsif ($gv_beschattungEin eq 'N' and $plugin_info{$plugname.'_beschattungEin'} eq BESCHATTUNG_EIN) {
                   ($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                   $gv_zeitpunkt = $gv_minuten + ($gv_stunden*60);
                   $plugin_info{$plugname.'_beschattungEin'} = BESCHATTUNG_AUS;
                   $plugin_info{$plugname.'_beschattungEinTime'} = $gv_zeitpunkt;
                  }
                 } else {
                  for ($gv_index=0; $gv_index < @gt_raffstores; $gv_index++) {
                   # Muss mittels for-Schleife (und nicht foreach) gemacht werden, weil ich die Werte in der Schleife updaten muss.
                   $gs_raffstore = $gt_raffstores[$gv_index];
                
                   if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $gs_raffstore->{gaSperre}) {
                    # Sperre wurde gesetzt oder aufgehoben
                    $gs_raffstore->{sperre} = $msg{'value'};
                   }
                   if ($msg{'apci'} eq "A_GroupValue_Read" and $msg{'dst'} eq $gs_raffstore->{gaSperre}) {
                    # Sperre wurde abgefragt
                    knx_write($gs_raffstore->{gaSperre}, $gs_raffstore->{sperre});
                   }
                   if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $gs_raffstore->{gaFensterStatus}) {
                    if ($msg{'value'} == 0) {
                     # Wird ein Fenster geöffnet, dann Raffstore nach oben und Automatik aus
                     $gs_raffstore->{automatik} = AUTOMATIK_AUS;
                     $gv_rolloPos = knx_read($gs_raffstore->{gaRolloPosRM}, 5.001);
                     $gv_lamellePos = knx_read($gs_raffstore->{gaLamellePosRM}, 5.001);
                     if ($gv_rolloPos != 0) {
                      knx_write($gs_raffstore->{gaRolloPos}, 0, 5.001);
                     }
                     if ($gv_lamellePos != 0) {
                      knx_write($gs_raffstore->{gaLamellePos}, 0, 5.001);
                     }
                    } elsif ($msg{'value'} == 1) {
                     # Wird ein Fenster geschlossen, dann Automatik aus
                     $gs_raffstore->{automatik} = AUTOMATIK_EIN;
                    }
                   }
                   $gt_raffstores[$gv_index] = $gs_raffstore;
                  }
                 }
                } elsif ($gv_event eq EVENT_SOCKET) {
                } elsif ($gv_event eq EVENT_CYCLE) {
                 # Aufruf durch Zyklus
                 $plugin_info{$plugname.'_beschattungFreigabeOld'} = $plugin_info{$plugname.'_beschattungFreigabe'};
                
                 # Alle 5 Minuten den Sonnenstand neu berechnen
                 # Uhrzeit holen
                 # Wenn Minuten durch 5 teilbar, dann berechnen
                 ($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                 if ($gv_minuten % 5 == 0) {
                  ($gv_azimuth, $gv_elevation) = berechneSonnenstand($gv_lat, $gv_lon, $gv_elev);
                  $plugin_info{$plugname.'_elevation'} = $gv_elevation;
                  $plugin_info{$plugname.'_azimuth'} = $gv_azimuth;
                  # Azimuth und Elevation im RRD aufzeichnen (für schöne Kurve auf der Visu)
                  update_rrd("MyAzimuth","",$gv_azimuth);
                  update_rrd("MyElevation","",$gv_elevation);
                 }
                
                 # Prüfen, ob die Beschattung aktiviert oder deaktiviert werden muss
                 if ($plugin_info{$plugname.'_beschattungEin'} eq BESCHATTUNG_EIN and $plugin_info{$plugname.'_beschattungFreigabe'} eq FREIGABE_AUS) {
                  #($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                  $gv_zeitpunkt = $gv_minuten + ($gv_stunden*60);
                  $gv_zeitdifferenz = $gv_zeitpunkt - $plugin_info{$plugname.'_beschattungEinTime'};
                  if ($gv_zeitdifferenz > 5) {
                   $plugin_info{$plugname.'_beschattungFreigabe'} = FREIGABE_EIN;
                  }
                 } elsif ($plugin_info{$plugname.'_beschattungEin'} eq BESCHATTUNG_AUS and $plugin_info{$plugname.'_beschattungFreigabe'} eq FREIGABE_EIN) {
                  #($gv_sekunden, $gv_minuten, $gv_stunden, $gv_monatstag, $gv_monat, $gv_jahr, $gv_wochentag, $gv_jahrestag, $gv_sommerzeit) = localtime(time);
                  $gv_zeitpunkt = $gv_minuten + ($gv_stunden*60);
                  $gv_zeitdifferenz = $gv_zeitpunkt - $plugin_info{$plugname.'_beschattungEinTime'};
                  if ($gv_zeitdifferenz > 15) {
                   $plugin_info{$plugname.'_beschattungFreigabe'} = FREIGABE_AUS;
                  }
                 }
                
                 # Beschattungs-Automatik
                 if ($plugin_info{$plugname.'_sperre'} == SPERRE_INAKTIV) {
                  # Automatik läuft grundsätzlich
                  foreach $gs_raffstore (@gt_raffstores) {
                   if ($gs_raffstore->{aktiv} eq AKTIV and
                       $gs_raffstore->{sperre} == SPERRE_INAKTIV and
                       $gs_raffstore->{automatik} eq AUTOMATIK_EIN) {
                
                    # Automatik ist aktiv -> also mach nun deine Arbeit
                    if ($plugin_info{$plugname.'_beschattungFreigabe'} eq FREIGABE_AUS) {
                     # Freigabe ist aufgrund der Helligkeit nicht notwendig -> Raffstore nach oben!
                
                     # Aber nur, wenn es sich um den ersten Lauf nach Ende der Freigabe handelt!
                     if ($plugin_info{$plugname.'_beschattungFreigabeOld'} eq FREIGABE_EIN) {
                      # Raffstores hoch
                      $gv_rolloPos = knx_read($gs_raffstore->{gaRolloPosRM}, 5.001);
                      $gv_lamellePos = knx_read($gs_raffstore->{gaLamellePosRM}, 5.001);
                      if ($gv_rolloPos != 0) {
                       knx_write($gs_raffstore->{gaRolloPos}, 0, 5.001);
                      }
                      if ($gv_lamellePos != 0) {
                       knx_write($gs_raffstore->{gaLamellePos}, 0, 5.001);
                      }
                     }
                    } else {
                     if (exists($gs_raffstore->{ausrichtung})) {
                      #Startwinkel berechnen
                      $gv_startWinkel = $gs_raffstore->{ausrichtung} - 85;
                      if ($gv_startWinkel < 0) {
                       $gv_startWinkel = $gv_startWinkel + 360;
                      }
                      # Endwinkel berechnen
                      $gv_endWinkel = $gs_raffstore->{ausrichtung} + 85;
                      if ($gv_endWinkel > 360) {
                       $gv_endWinkel = $gv_endWinkel - 360;
                      }
                     }
                     if (exists($gs_raffstore->{startWinkel})) {
                      $gv_startWinkel = $gs_raffstore->{startWinkel};
                     }
                     if (exists($gs_raffstore->{endWinkel})) {
                      $gv_endWinkel = $gs_raffstore->{endWinkel};
                     }
                     # Aktuelle Sonnenposition verwenden um zu bestimmen, ob der Raffstore gerade beschattet werden muss
                     if ($plugin_info{$plugname.'_azimuth'} >= $gv_startWinkel and
                         $plugin_info{$plugname.'_azimuth'} <= $gv_endWinkel ) {
                    
                      # Beschattung aufgrund der Ausrichtung
                
                      # Raffstore runter
                      $gv_rolloPos = knx_read($gs_raffstore->{gaRolloPosRM}, 5.001);
                      $gv_lamellePos = knx_read($gs_raffstore->{gaLamellePosRM}, 5.001);
                      if ($gv_rolloPos != $gs_raffstore->{rolloBeschattungspos}) {
                       knx_write($gs_raffstore->{gaRolloPos}, $gs_raffstore->{rolloBeschattungspos}, 5.001);
                      }
                      
                      # Lamellennachführung
                      #$gv_lamellePosNeu = (90 - $plugin_info{$plugname.'_elevation'})/90*100;
                      #if ($gv_lamellePos != $gv_lamellePosNeu) {
                       #knx_write($gs_raffstore->{gaLamellePos}, 100, 5.001);
                      #}
                      
                      if ($gv_minuten % 5 == 0) {
                       if ($gs_raffstore->{lamellenNachfuehrung} eq NACHF_AUS) {
                        $gv_lamellePosNeu = 100;
                       } else {
                        $gv_lamellePosNeu = (90 - $plugin_info{$plugname.'_elevation'})/90*100;
                        # Faktor für die Abweichung der Sonne von der Ausrichtung des Fensters miteinbeziehen
                        $gv_lamellePosNeu = $gv_lamellePosNeu * (1 - (abs($plugin_info{$plugname.'_azimuth'} - $gs_raffstore->{ausrichtung}) * 0.01));
                        # Der Wert für den Lamellenwinkel muss immer zwischen 0 und 100 sein! Alles darüber hinaus wird fix auf 0 bzw. 100 gesetzt.
                        if ($gv_lamellePosNeu < 0) { $gv_lamellePosNeu = 0; }
                        if ($gv_lamellePosNeu > 100) { $gv_lamellePosNeu = 100; }
                       }
                       # Nicht wegen jeder Kleinigkeit gleich nachstellen, erst nach einer gewissen Mindeständerung.
                       if (abs($gv_lamellePos - $gv_lamellePosNeu) > 2) {
                        knx_write($gs_raffstore->{gaLamellePos},$gv_lamellePosNeu,5.001);
                       }
                      }
                     } else {
                      # Keine Beschattung aufgrund der Ausrichtung
                
                      # Raffstore hoch
                      $gv_rolloPos = knx_read($gs_raffstore->{gaRolloPosRM}, 5.001);
                      $gv_lamellePos = knx_read($gs_raffstore->{gaLamellePosRM}, 5.001);
                      if ($gv_rolloPos != 0) {
                       knx_write($gs_raffstore->{gaRolloPos}, 0, 5.001);
                      }
                      if ($gv_lamellePos != 0) {
                       knx_write($gs_raffstore->{gaLamellePos}, 0, 5.001);
                      }
                     }
                    }
                   }
                  }
                 }
                }
                
                # Dynamische Werte der Raffstore-Definition im plugin_info merken
                @gt_raffstores_dyn = ();
                foreach $gs_raffstore (@gt_raffstores) {
                 unshift(@gt_raffstores_dyn, join(SEPARATOR2, $gs_raffstore->{id}, $gs_raffstore->{aktiv}, $gs_raffstore->{sperre}, $gs_raffstore->{automatik}));
                }
                $gv_raffstore_dyn = join(SEPARATOR1, @gt_raffstores_dyn);
                $plugin_info{$plugname.'_gt_raffstores_dyn'} = $gv_raffstore_dyn;
                
                
                ####################################################
                # Aufruf mit berechneSonnenstand($lat, $lon, $elev);
                ####################################################
                sub berechneSonnenstand {
                 # Aktuelle Zeit
                 my $lv_time = time ();
                 # Die eigenen Koordinaten
                 my $lv_loc = Astro::Coord::ECI->geodetic(deg2rad(shift), deg2rad(shift), shift);
                 # Sonne instanzieren
                 my $lv_sun = Astro::Coord::ECI::Sun->universal($lv_time);
                 # Feststellen wo die Sonne gerade ist
                 my ($lv_azimuth, $lv_elevation, $lv_range) = $lv_loc->azel($lv_sun);
                 $lv_azimuth = rad2deg($lv_azimuth);
                 $lv_elevation = rad2deg($lv_elevation);
                 return ($lv_azimuth, $lv_elevation);
                }
                Gruß, Joachim
                EibPC - Wiregate

                Kommentar


                  #53
                  Erstmal dickes Lob für so ein aufwendiges Plugin!
                  Wollte es gleich mal in Betrieb nehmen, hab aber noch 1,2 Fragen.

                  Zuerst, kann ma da was Einstellen, oder ist das fest?
                  Wenn letzteres wär es glaub ganz sinnvoll dass unter den Hinweis ab da möglichst nix mehr zu verändern zu setzen.
                  Code:
                  # Konstanten f�r Aufrufart
                  use constant EVENT_RESTART => 'restart';
                  use constant EVENT_MODIFIED => 'modified';
                  use constant EVENT_BUS => 'bus';
                  use constant EVENT_SOCKET => 'socket';
                  use constant EVENT_CYCLE => 'cycle';
                  # Konstanten f�r Beschattung ein/aus
                  use constant BESCHATTUNG_AUS => 'AUS';
                  use constant BESCHATTUNG_EIN => 'EIN';
                  # Konstanten f�r Beschattung Freigabe ein/aus
                  use constant FREIGABE_AUS => 'AUS';
                  use constant FREIGABE_EIN => 'EIN';
                  # Konstanten f�r Nachf�hrung ein/aus
                  use constant NACHF_AUS => 'AUS';
                  use constant NACHF_EIN => 'EIN';
                  # Konstanten f�r Raffstore-Attribute
                  use constant AKTIV => 'A';
                  use constant INAKTIV => 'I';
                  use constant SPERRE_AKTIV => 1;
                  use constant SPERRE_INAKTIV => 0;
                  use constant AUTOMATIK_EIN => 'EIN';
                  use constant AUTOMATIK_AUS => 'AUS';
                  # Konstanten f�r die Trennung der dynamischen Raffstore-Definitionen
                  use constant SEPARATOR1 => ';';
                  use constant SEPARATOR2 => '->';

                  Außerdem, ich hab (leider [noch]) keinen Helligkeitssensor, soll ich dann einfach die entsprechende GA leer lassen oder wie?

                  Kommentar


                    #54
                    Hallo Daviid,
                    Ziel der letzten Änderung war, dass alles, was einzustellen ist, in dem conf-File einzustellen ist.
                    Ohne Helligkeitssensor wird es nicht gehen. Du möchtest beschatten, weil es draußen zu hell ist. Dazu muss das Plugin wissen, wie hell es ist. Daher brauchst Du einen Helligkeitssensor.
                    Gruß, Joachim
                    EibPC - Wiregate

                    Kommentar


                      #55
                      Hi,

                      erst mal freuts mich, dass das Plugin jetzt offenbar doch ein paar Anhänger findet und auch weiterentwickelt wird. :-)

                      @Joachim:
                      Hast du einen Zugang zum Wiregate-SVN, dass du die Änderungen einchecken kannst? Ansonsten würd ich das machen, nachdem ichs mir kurz durchgeschaut hab (nicht, weil ich dir nicht trau, aber halt neugierig bin, wie das jetzt aussieht)

                      @Daviid:
                      Grundsätzlich stellt sich die Frage, wie du triggern willst, dass die Beschattung losläuft. Es hat zwar eh jeder Raffstore/Rolladen eine Ausrichtung, sodass er nur in einem bestimmten von/bis Winkel beschattet, aber wenns draußen regnet, oder relativ dunkel ist, bringt ja die Beschattung nichts.
                      Was funktionieren würde wäre, dass du eine GA definierst, im Plugin als Helligkeit einstellst und mittels Taster (oder sonst irgendeinem Trigger) dort einen Wert >100000 sendest, bzw. zum Deaktivieren der Beschattung 0.
                      Ob sinnvoll, oder nicht, bewerte ich jetzt mal nicht. Aber nachdem du ja anscheinend eh einen Helligkeitssensor bekommst, ists evtl. eine Übergangslösung.

                      LG
                      Marcus

                      Kommentar


                        #56
                        OK, dann schau ich mal was ich da zusammen basteln kann.

                        Oder ich besorg mir halbwegs ungefähre Daten ausem Netz solang ich keinen Sensor hab.

                        Kommentar


                          #57
                          Respekt an Marcus und an alle, die sonst (und in Zukunft) daran mitwirken!
                          Ich freu mich schon, wenn mein Haus endlich steht - mit Außenraffstores und klassischen Rollläden
                          Gute Sache, die Einstellungen in eine eigene Datei auszulagern...
                          CU,
                          Mathias

                          Kommentar


                            #58
                            Zitat von mclb Beitrag anzeigen
                            Hast du einen Zugang zum Wiregate-SVN, dass du die Änderungen einchecken kannst? Ansonsten würd ich das machen, nachdem ichs mir kurz durchgeschaut hab (nicht, weil ich dir nicht trau, aber halt neugierig bin, wie das jetzt aussieht)
                            @Makki,
                            bisher habe ich keinen Zugang zum SVN. Könntest Du mir bitte einen erstellen? Da ich noch ein paar Funktionen hinzufügen möchte, könnte es sinnvoll sein, einen eigenen Zugang zu haben.

                            Gruß, Joachim
                            EibPC - Wiregate

                            Kommentar


                              #59
                              Zitat von joda123 Beitrag anzeigen
                              Könntest Du mir bitte einen erstellen?
                              Schreib ich dir mal das, was er mir geschrieben hat: sourceforge user anlegen und an makki schicken, dann kann er dich freischalten.

                              Kommentar


                                #60
                                Noch mal zu dem trigger für die Beschattung:
                                Viele haben vielleicht keine Wetterstation (mich eingeschlossen), da wäre es wohl sinnvoll über die Außentemperatur zu gehen. Am besten dann noch im Vergleich zur Differenz eines Soll/Ist-Wert um zu Berechnen ob noch solare Gewinne brauchbar sind...

                                Vielleicht kann man das ja noch in die Config einbauen, dann wäre diese sicher für einen größeren Nutzerkreis interessant!

                                Gruß Hannatz

                                Kommentar

                                Lädt...
                                X