Ankündigung

Einklappen
Keine Ankündigung bisher.

LinKNX und Sunset/Sunrise

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

    LinKNX und Sunset/Sunrise

    Hallo,
    ich versuche mit LinKNX (0.0.25) meine Rollo-Steuerung abhängig von Sunrise/Sunset zu optimieren.
    Das Rollo soll unter der Woche 06:24 oder später (wenn Sonnenaufgang später ist) hochfahren. Am Wochenende und an Feiertagen entsprechend frühestens um 08:15. Runter fahren soll der Rollo immer 30min nach Sonnenuntergang.
    Folgendes XML-File habe ich geschrieben:

    <rule id="sunrise Rollo Eltern">
    <condition type="and">
    <condition type="timer" trigger="true">
    <at type="sunrise"/>
    <until hour="10" min="00" />
    </condition>
    <condition type="or">
    <condition type="timer" trigger="true">
    <at hour="06" min="24" exception="no" wdays="12345"/>
    <until hour="10" min="00" />
    </condition>
    <condition type="timer" trigger="true">
    <at hour="08" min="15" exception="no" wdays="67" />
    <until hour="10" min="00" />
    </condition>
    <condition type="timer" trigger="true">
    <at hour="08" min="15" exception="yes"/>
    <until hour="10" min="00" />
    </condition>
    </condition>
    </condition>
    <actionlist>
    <action type="set-value" id="Rollo Eltern" value="0" />
    </actionlist>
    </rule>
    <rule id="sunset Rolladen Eltern">
    <condition type="timer" trigger="true">
    <at type="sunset" wdays="1234567" offset="1800" />
    </condition>
    <actionlist>
    <action type="set-value" id="Rollo Eltern" value="1" />
    </actionlist>
    </rule>

    Leider ist der Rollo heute früh nicht um 06:24 sondern bereits um 05:58 hochgefahren. Dies ist aber der Zeitpunkt des berechneten Sonnenaufgangs. Die Systemzeit auf meinem Rechner passt.
    Hat jemand eine Idee woran das liegt?

    Gruß,
    Jürgen

    #2
    IMHO hat Deine erste UND Bedingung nur ein Argument.
    Linknx triggert also beim Erreichen der Sonnenaufgangszeit und arbeitet Deine actionlist ab.

    Wenn Du willst, dass der Rolo entweder bei Sonnenaufgang, aber frühestens um 6:15 aufgehen soll, solltest Du m.M zwei Regeln bauen, und zwar jeweils mit den bevorzugten Zeiten und der Prüfung, ob der Rolo schon auf ist.

    Also:

    Sonnenaufgang?
    AND
    Rolo schon auf?

    8:15?
    AND Rolo schon auf?

    Oder eine Regel und eine OR Abfrage Deiner zwei ANDs.

    LG,
    B.

    Kommentar


      #3
      Rein logisch habe ich folgenden Ausdruck im XML:

      (Sonnaufgang <= Zeit <= 11:00) AND
      . ((06:24 <= Zeit <= 11:00 Wochentags) OR
      . (08:15 <= Zeit <= 11:00 Wochenende) OR
      . (08:15 <= Zeit <= 11:00 Feiertags))
      Die AND-Bedingung hat somit doch zwei Bedingungen.

      Somit müsste doch der Timer der ersten Zeile ab Sonnenaufgang bis 11 auf TRUE gehen und der andere Timer je nach Tag zwischen 06:24 oder 08:14 ebenfalls auf TRUE gehen.

      Erst wenn beide Bedingungen TRUE sind soll der Rollo hoch fahren.

      Kommentar


        #4
        Hi,

        I think I found the problem. In Linknx 0.0.1.25, I introduced some code to set the timer value at startup, so that if the timer is supposed to be true between 8am and 10am, it will be initialized at TRUE if you start linknx at 9am. For this, I just compute next start time and next stop time and see which one is the first. If stop-time is the first, I set actual timer value to true, and vice-versa. The problem occurs if you say that timer start at 8am in the week-end and stops at 10am (all days). In that case, if you start it on tuesday 11am, it will compute next start time (saturday 8am) and next stop time (wednesday 10am). Since stop-time occurs before start-time, timer will initialize current value to TRUE, and that could be the cause of the problem you see.

        One possible workaround would be to set the same "exception" and "wdays " parameters for "until" than for "at". Or just wait 10am that the "until" sets the actual value back to false.

        Perhaps I should add a parameter to timers to be able to force the initial value.

        Regards,

        Jean-François

        Kommentar


          #5
          Hi Jeff,

          yesterday I changed in my XML-file the UNTIL-condition. I added wdays and exception like in the AT-condition. Today the shutter opened at the estimated time.
          Thank you very much.

          regards Jürgen

          Kommentar

          Lädt...
          X