Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Gelöst] Ein- und Ausschaltzeiten aus einem Datenpunkt holen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [Gelöst] Ein- und Ausschaltzeiten aus einem Datenpunkt holen

    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      Uwe2020 @FredF last edited by

      @FredF said in Ein- und Ausschaltzeiten aus einem Datenpunkt holen:

      @Uwe2020 Und was kommt dabei:
      38859168-bc3b-489f-a97a-fc2ae37d90b3-grafik.png

      '2020-03-12T05:47:47.161Z'

      U 1 Reply Last reply Reply Quote 0
      • U
        Uwe2020 @Uwe2020 last edited by

        @Uwe2020 said in Ein- und Ausschaltzeiten aus einem Datenpunkt holen:

        @FredF said in Ein- und Ausschaltzeiten aus einem Datenpunkt holen:

        @Uwe2020 Und was kommt dabei:
        38859168-bc3b-489f-a97a-fc2ae37d90b3-grafik.png

        '2020-03-12T05:47:47.161Z'

        Ich glaube, dass ist der Wurm drin. Sieht jedenfalls nicht richtig aus.

        paul53 FredF 2 Replies Last reply Reply Quote 0
        • paul53
          paul53 @Uwe2020 last edited by

          @Uwe2020 sagte:

          Sieht jedenfalls nicht richtig aus.

          Doch, das ist die UTC-Zeit. Konvertiere mal die Zeit nach SS:mm. Dann sollte der Sonnenaufgang in MEZ angezeigt werden.

          U 1 Reply Last reply Reply Quote 0
          • FredF
            FredF Most Active Forum Testing @Uwe2020 last edited by

            @Uwe2020 sagte in Ein- und Ausschaltzeiten aus einem Datenpunkt holen:

            Ich glaube, dass ist der Wurm drin. Sieht jedenfalls nicht richtig aus.

            Wieso? Das stimmt so. Bei mir

            2020-03-12T05:48:27.937Z
            

            Die Uhrzeit ist etwas anders da wir unterschiedliche Wohnorte haben.
            Die Astrofunktion sollte also funktionieren...

            1 Reply Last reply Reply Quote 0
            • U
              Uwe2020 @paul53 last edited by

              @paul53 said in Ein- und Ausschaltzeiten aus einem Datenpunkt holen:

              @Uwe2020 sagte:

              Sieht jedenfalls nicht richtig aus.

              Doch, das ist die UTC-Zeit. Konvertiere mal die Zeit nach SS:mm. Dann sollte der Sonnenaufgang in MEZ angezeigt werden.

              Ja, nach der Konfertierung stimmt es.

              variable3.png

              Aber trotzdem schaltet er nicht immer morgen oder abends. Seit einer Woche suche ich nach dem Fehler, ohne ihn zu finden. Deshalb kam ich auf die Idee mit dem Script, dass mir die Zeiten in einem Datenpunkt anlegt. Das klappt seltsamerweise.

              1 Reply Last reply Reply Quote 0
              • U
                Uwe2020 last edited by

                So, ich habe mein altes Script nochmal herovrgeholt. So sieht es aus:

                <xml xmlns="http://www.w3.org/1999/xhtml">
                  <block type="schedule" id="6v:E`i:KkLx9#rR7npVo" x="213" y="-637">
                    <field name="SCHEDULE">{"time":{"exactTime":true,"start":"05:00"},"period":{"days":1}}</field>
                    <statement name="STATEMENT">
                      <block type="control" id="e)sw2([OVmq`w^*N`1yZ">
                        <mutation delay_input="false"></mutation>
                        <field name="OID">scene.Hofbeleuchtung</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="!bQWa+Stff`zLjG[n3A^">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                        <next>
                          <block type="sendto_custom" id="Ukeu[)A;rlc~Rdza/60#">
                            <mutation items="parameter1" with_statement="false"></mutation>
                            <field name="INSTANCE">admin.0</field>
                            <field name="COMMAND">send</field>
                            <field name="WITH_STATEMENT">FALSE</field>
                            <field name="LOG">log</field>
                            <value name="ARG0">
                              <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                <field name="TEXT"></field>
                              </shadow>
                              <block type="text_join" id="M4ag,[bUYA!8p6Pt!H{j">
                                <mutation items="3"></mutation>
                                <value name="ADD0">
                                  <block type="text" id="iltl|!?eN/j2xSyGx_k-">
                                    <field name="TEXT">Hofbeleuchtung um </field>
                                  </block>
                                </value>
                                <value name="ADD1">
                                  <block type="time_get" id="o3Xe3IB.!CN!2y!q)(+!">
                                    <mutation format="false" language="false"></mutation>
                                    <field name="OPTION">hh:mm</field>
                                  </block>
                                </value>
                                <value name="ADD2">
                                  <block type="text" id="|#}l=c,hNMYS)j8Kj-Jp">
                                    <field name="TEXT"> eingeschaltet"</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>
                    <next>
                      <block type="schedule" id="*,%,u.h9y)N=dyJgfa_5">
                        <field name="SCHEDULE">{"time":{"exactTime":true,"start":"sunrise"},"period":{"days":1},"valid":{"from":"12.03.2020","to":""}}</field>
                        <statement name="STATEMENT">
                          <block type="control" id="@N{:eT4L%Be[wKVf[cn;">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">scene.Hofbeleuchtung</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="=z5/V,G:nqKy?nhd^FkH">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                            <next>
                              <block type="sendto_custom" id="/H.?+nWb;glyt.y@^YMx">
                                <mutation items="parameter1" with_statement="false"></mutation>
                                <field name="INSTANCE">admin.0</field>
                                <field name="COMMAND">send</field>
                                <field name="WITH_STATEMENT">FALSE</field>
                                <field name="LOG">log</field>
                                <value name="ARG0">
                                  <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                    <field name="TEXT"></field>
                                  </shadow>
                                  <block type="text_join" id="K^h?i/df)zajho1cdE|u">
                                    <mutation items="3"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id="ncpDk9.[DSHFT[48iScF">
                                        <field name="TEXT">Hofbeleuchtung um </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="time_get" id="b!0[=BHozYodCb@nc#^@">
                                        <mutation format="false" language="false"></mutation>
                                        <field name="OPTION">hh:mm</field>
                                      </block>
                                    </value>
                                    <value name="ADD2">
                                      <block type="text" id="UqR?8?1du%S;9?}H%5@K">
                                        <field name="TEXT"> ausgeschaltet"</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="schedule" id="!4QUxBVJYiysUBiiGf_K">
                            <field name="SCHEDULE">{"time":{"exactTime":true,"start":"sunsetStart"},"period":{"days":1}}</field>
                            <statement name="STATEMENT">
                              <block type="control" id="h+DHeT-%/v]1s|^4E#oT">
                                <mutation delay_input="false"></mutation>
                                <field name="OID">scene.Hofbeleuchtung</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="%#yrv7,0Y/R./nYg.PfP">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="sendto_custom" id="Se`pY;]Gv,K8@3eN)J}{">
                                    <mutation items="parameter1" with_statement="false"></mutation>
                                    <field name="INSTANCE">admin.0</field>
                                    <field name="COMMAND">send</field>
                                    <field name="WITH_STATEMENT">FALSE</field>
                                    <field name="LOG">log</field>
                                    <value name="ARG0">
                                      <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                        <field name="TEXT"></field>
                                      </shadow>
                                      <block type="text_join" id="i)LM3X5Lw0^T2[`C:Sc9">
                                        <mutation items="3"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="`mK}a?Rd|8OY*^_,9%e4">
                                            <field name="TEXT">Hofbeleuchtung um </field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="time_get" id="|_VtOFne=I/f8n@!@sTR">
                                            <mutation format="false" language="false"></mutation>
                                            <field name="OPTION">hh:mm</field>
                                          </block>
                                        </value>
                                        <value name="ADD2">
                                          <block type="text" id="H7`Iv45Hak61$4Gpdzt|">
                                            <field name="TEXT"> eingeschaltet"</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="schedule" id="g!-7BmaXumrPQMr%TG?d">
                                <field name="SCHEDULE">{"time":{"exactTime":true,"start":"22:00"},"period":{"days":1}}</field>
                                <statement name="STATEMENT">
                                  <block type="control" id="?VgY85I[hdQj-QG)DCJ.">
                                    <mutation delay_input="false"></mutation>
                                    <field name="OID">scene.Hofbeleuchtung</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="vjL;i??NTKtVZ.tzt,~y">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="sendto_custom" id="ftn@#jzSd0gMpzo2XtP~">
                                        <mutation items="parameter1" with_statement="false"></mutation>
                                        <field name="INSTANCE">admin.0</field>
                                        <field name="COMMAND">send</field>
                                        <field name="WITH_STATEMENT">FALSE</field>
                                        <field name="LOG">log</field>
                                        <value name="ARG0">
                                          <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                            <field name="TEXT"></field>
                                          </shadow>
                                          <block type="text_join" id="S7p:5M?zMy=6A$VFTLnw">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="s$q+3t8(Yq9=Yi0a5U3.">
                                                <field name="TEXT">Hofbeleuchtung um </field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="time_get" id="vQ`hJHSojqRsFE@/E2$y">
                                                <mutation format="false" language="false"></mutation>
                                                <field name="OPTION">hh:mm</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="text" id="FZQAQ|!Hc!|!2//V0Z_q">
                                                <field name="TEXT"> ausgeschaltet"</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </xml>
                
                FredF paul53 2 Replies Last reply Reply Quote 0
                • FredF
                  FredF Most Active Forum Testing @Uwe2020 last edited by

                  @Uwe2020 sagte in Ein- und Ausschaltzeiten aus einem Datenpunkt holen:

                  So, ich habe mein altes Script nochmal herovrgeholt. So sieht es aus:

                  Da nimmst du ja den Zeitplan als Trigger und nicht die Astrofunktion.

                  U 1 Reply Last reply Reply Quote 0
                  • paul53
                    paul53 @Uwe2020 last edited by paul53

                    @Uwe2020 sagte:

                    altes Script nochmal herovrgeholt

                    Anstelle von Zeitplan-Wizard verwende mal CRON und Astro-Trigger. Bei mir funktionieren die zuverlässig.

                    <xml xmlns="http://www.w3.org/1999/xhtml">
                     <block type="schedule" id="6v:E`i:KkLx9#rR7npVo" x="213" y="-637">
                       <field name="SCHEDULE">0 5 * * *</field>
                       <statement name="STATEMENT">
                         <block type="control" id="e)sw2([OVmq`w^*N`1yZ">
                           <mutation delay_input="false"></mutation>
                           <field name="OID">scene.Hofbeleuchtung</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="!bQWa+Stff`zLjG[n3A^">
                               <field name="BOOL">TRUE</field>
                             </block>
                           </value>
                           <next>
                             <block type="sendto_custom" id="Ukeu[)A;rlc~Rdza/60#">
                               <mutation items="parameter1" with_statement="false"></mutation>
                               <field name="INSTANCE">admin.0</field>
                               <field name="COMMAND">send</field>
                               <field name="WITH_STATEMENT">FALSE</field>
                               <field name="LOG">log</field>
                               <value name="ARG0">
                                 <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                   <field name="TEXT"></field>
                                 </shadow>
                                 <block type="text_join" id="M4ag,[bUYA!8p6Pt!H{j">
                                   <mutation items="3"></mutation>
                                   <value name="ADD0">
                                     <block type="text" id="iltl|!?eN/j2xSyGx_k-">
                                       <field name="TEXT">Hofbeleuchtung um </field>
                                     </block>
                                   </value>
                                   <value name="ADD1">
                                     <block type="time_get" id="o3Xe3IB.!CN!2y!q)(+!">
                                       <mutation format="false" language="false"></mutation>
                                       <field name="OPTION">hh:mm</field>
                                     </block>
                                   </value>
                                   <value name="ADD2">
                                     <block type="text" id="|#}l=c,hNMYS)j8Kj-Jp">
                                       <field name="TEXT"> eingeschaltet"</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </statement>
                       <next>
                         <block type="astro" id="_.Yl4!%XdR|ATuCVNA10">
                           <field name="TYPE">sunrise</field>
                           <field name="OFFSET">0</field>
                           <statement name="STATEMENT">
                             <block type="control" id="@N{:eT4L%Be[wKVf[cn;">
                               <mutation delay_input="false"></mutation>
                               <field name="OID">scene.Hofbeleuchtung</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="logic_boolean" id="=z5/V,G:nqKy?nhd^FkH">
                                   <field name="BOOL">FALSE</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="sendto_custom" id="/H.?+nWb;glyt.y@^YMx">
                                   <mutation items="parameter1" with_statement="false"></mutation>
                                   <field name="INSTANCE">admin.0</field>
                                   <field name="COMMAND">send</field>
                                   <field name="WITH_STATEMENT">FALSE</field>
                                   <field name="LOG">log</field>
                                   <value name="ARG0">
                                     <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                       <field name="TEXT"></field>
                                     </shadow>
                                     <block type="text_join" id="K^h?i/df)zajho1cdE|u">
                                       <mutation items="3"></mutation>
                                       <value name="ADD0">
                                         <block type="text" id="ncpDk9.[DSHFT[48iScF">
                                           <field name="TEXT">Hofbeleuchtung um </field>
                                         </block>
                                       </value>
                                       <value name="ADD1">
                                         <block type="time_get" id="b!0[=BHozYodCb@nc#^@">
                                           <mutation format="false" language="false"></mutation>
                                           <field name="OPTION">hh:mm</field>
                                         </block>
                                       </value>
                                       <value name="ADD2">
                                         <block type="text" id="UqR?8?1du%S;9?}H%5@K">
                                           <field name="TEXT"> ausgeschaltet"</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                 </block>
                               </next>
                             </block>
                           </statement>
                           <next>
                             <block type="astro" id="M_ofS_1*{Xl1R%i6N-]Z">
                               <field name="TYPE">sunsetStart</field>
                               <field name="OFFSET">0</field>
                               <statement name="STATEMENT">
                                 <block type="control" id="h+DHeT-%/v]1s|^4E#oT">
                                   <mutation delay_input="false"></mutation>
                                   <field name="OID">scene.Hofbeleuchtung</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="logic_boolean" id="%#yrv7,0Y/R./nYg.PfP">
                                       <field name="BOOL">TRUE</field>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="sendto_custom" id="Se`pY;]Gv,K8@3eN)J}{">
                                       <mutation items="parameter1" with_statement="false"></mutation>
                                       <field name="INSTANCE">admin.0</field>
                                       <field name="COMMAND">send</field>
                                       <field name="WITH_STATEMENT">FALSE</field>
                                       <field name="LOG">log</field>
                                       <value name="ARG0">
                                         <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                           <field name="TEXT"></field>
                                         </shadow>
                                         <block type="text_join" id="i)LM3X5Lw0^T2[`C:Sc9">
                                           <mutation items="3"></mutation>
                                           <value name="ADD0">
                                             <block type="text" id="`mK}a?Rd|8OY*^_,9%e4">
                                               <field name="TEXT">Hofbeleuchtung um </field>
                                             </block>
                                           </value>
                                           <value name="ADD1">
                                             <block type="time_get" id="|_VtOFne=I/f8n@!@sTR">
                                               <mutation format="false" language="false"></mutation>
                                               <field name="OPTION">hh:mm</field>
                                             </block>
                                           </value>
                                           <value name="ADD2">
                                             <block type="text" id="H7`Iv45Hak61$4Gpdzt|">
                                               <field name="TEXT"> eingeschaltet"</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                               <next>
                                 <block type="schedule" id="g!-7BmaXumrPQMr%TG?d">
                                   <field name="SCHEDULE">0 22 * * *</field>
                                   <statement name="STATEMENT">
                                     <block type="control" id="?VgY85I[hdQj-QG)DCJ.">
                                       <mutation delay_input="false"></mutation>
                                       <field name="OID">scene.Hofbeleuchtung</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="logic_boolean" id="vjL;i??NTKtVZ.tzt,~y">
                                           <field name="BOOL">FALSE</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="sendto_custom" id="ftn@#jzSd0gMpzo2XtP~">
                                           <mutation items="parameter1" with_statement="false"></mutation>
                                           <field name="INSTANCE">admin.0</field>
                                           <field name="COMMAND">send</field>
                                           <field name="WITH_STATEMENT">FALSE</field>
                                           <field name="LOG">log</field>
                                           <value name="ARG0">
                                             <shadow type="text" id="%*d*]T},H@`#)1pxsTen">
                                               <field name="TEXT"></field>
                                             </shadow>
                                             <block type="text_join" id="S7p:5M?zMy=6A$VFTLnw">
                                               <mutation items="3"></mutation>
                                               <value name="ADD0">
                                                 <block type="text" id="s$q+3t8(Yq9=Yi0a5U3.">
                                                   <field name="TEXT">Hofbeleuchtung um </field>
                                                 </block>
                                               </value>
                                               <value name="ADD1">
                                                 <block type="time_get" id="vQ`hJHSojqRsFE@/E2$y">
                                                   <mutation format="false" language="false"></mutation>
                                                   <field name="OPTION">hh:mm</field>
                                                 </block>
                                               </value>
                                               <value name="ADD2">
                                                 <block type="text" id="FZQAQ|!Hc!|!2//V0Z_q">
                                                   <field name="TEXT"> ausgeschaltet"</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                    </xml>
                    

                    U 1 Reply Last reply Reply Quote 0
                    • U
                      Uwe2020 @paul53 last edited by

                      @paul53 Okay, versuche ich mal. Bin jetzt gerade unterwegs. Vielen Dank an alle!!!

                      paul53 1 Reply Last reply Reply Quote 0
                      • U
                        Uwe2020 @FredF last edited by

                        @FredF Nur zum Starten um 05:00 Uhr. Nach Sonnenaufgang soll er wieder ausschalten.

                        1 Reply Last reply Reply Quote 0
                        • paul53
                          paul53 @Uwe2020 last edited by

                          @Uwe2020 sagte:

                          versuche ich mal.

                          Mit einer Funktion kann es so aussehen:

                          Blockly_temp.JPG

                          U 1 Reply Last reply Reply Quote 0
                          • U
                            Uwe2020 @paul53 last edited by

                            @paul53 Du bist ein Genie!!! Vielen Dank für die Mühe. Jetzt klappt es auch mit der Astrofunktion perfekt. Danke auch an alle anderen. Ihr seid spitze!!!!

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            784
                            Online

                            32.0k
                            Users

                            80.4k
                            Topics

                            1.3m
                            Posts

                            4
                            21
                            1123
                            Loading More Posts
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes
                            Reply
                            • Reply as topic
                            Log in to reply
                            Community
                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                            The ioBroker Community 2014-2023
                            logo