Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @WilliKlein last edited by paul53

      @williklein sagte:

      Wenn der Wert (ppv) vom Growatt > 3000 ist
      dann Shelly (switch) on.
      wenn < 2800 dann switch off

      Damit beträgt die Hysterese 200 W (3000 - 2800).

      Ich exportiere mal das Blockly. Du musst nach dem Import nur noch die Datenpunkte austauschen.

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="E,j@%LJR_SW?ayCR!]L,">shelly</variable>
       </variables>
       <block type="variables_set" id="k)@FiWDGHXsZ,SHM}1zS" x="300" y="-111">
         <field name="VAR" id="E,j@%LJR_SW?ayCR!]L,">shelly</field>
         <value name="VALUE">
           <block type="get_value" id="MfV3iIf5#Fx*F#SPbAd`">
             <field name="ATTR">val</field>
             <field name="OID">shelly.0.dev2.Relay0.Switch</field>
           </block>
         </value>
         <next>
           <block type="on_ext" id="_f?n?9+^x32}4r=j(lF0">
             <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
             <field name="CONDITION">ne</field>
             <field name="ACK_CONDITION"></field>
             <value name="OID0">
               <shadow type="field_oid" id="Bbh1E/},e./{_Yf3_;px">
                 <field name="oid">0_userdata.0.Blockly.PV-Leistung</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="5^_]~A*IAxXr.+z+,O|g">
                 <mutation elseif="1"></mutation>
                 <value name="IF0">
                   <block type="logic_compare" id="9@jz$j=TVGPXYwK_N1tl">
                     <field name="OP">GT</field>
                     <value name="A">
                       <block type="on_source" id="3O1($TjuU2zLP#.u6(]l">
                         <field name="ATTR">state.val</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id=")G`AERK`8@25wu`}x;HJ">
                         <field name="NUM">3000</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="variables_set" id="eb+o#xx@Yv#zEjH3[c8,">
                     <field name="VAR" id="E,j@%LJR_SW?ayCR!]L,">shelly</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="^9S9/{$K~z:7}vXy+vXd">
                         <field name="BOOL">TRUE</field>
                       </block>
                     </value>
                   </block>
                 </statement>
                 <value name="IF1">
                   <block type="logic_compare" id="Hk1ghg;eIF}mNq~qg2$N">
                     <field name="OP">LT</field>
                     <value name="A">
                       <block type="on_source" id=";GgYm,hYSX3/.3FCVqb^">
                         <field name="ATTR">state.val</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id="`=4-0(|xgYJ{WIg_dctO">
                         <field name="NUM">2800</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO1">
                   <block type="variables_set" id="SDx9dFe8-XqT~?PP,265">
                     <field name="VAR" id="E,j@%LJR_SW?ayCR!]L,">shelly</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="^aFhyq!(ta2DJm$2qCtt">
                         <field name="BOOL">FALSE</field>
                       </block>
                     </value>
                   </block>
                 </statement>
                 <next>
                   <block type="controls_if" id="9q!Zk#Vc?c9EX$:Z9zUK">
                     <value name="IF0">
                       <block type="logic_compare" id="43Vu=|/wYh`tM*c*dc-J">
                         <field name="OP">NEQ</field>
                         <value name="A">
                           <block type="variables_get" id="*xID|?TLTij`-[+2G4K[">
                             <field name="VAR" id="E,j@%LJR_SW?ayCR!]L,">shelly</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="get_value" id="}|Y8Zi|6j(ivB?Z+tt}8">
                             <field name="ATTR">val</field>
                             <field name="OID">shelly.0.dev2.Relay0.Switch</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="control" id="12N5$JSuj7~#-O,zt39W">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">shelly.0.dev2.Relay0.Switch</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="variables_get" id="P@N|PbiTOZ:Bo}3[.)SG">
                             <field name="VAR" id="E,j@%LJR_SW?ayCR!]L,">shelly</field>
                           </block>
                         </value>
                       </block>
                     </statement>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </next>
       </block>
      </xml>
      

      W 1 Reply Last reply Reply Quote 0
      • W
        WilliKlein @paul53 last edited by Homoran

        @paul53

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id="%f2p3[xiEK;T;hxSX|t5">shelly</variable>
          </variables>
          <block type="variables_set" id="k)@FiWDGHXsZ,SHM}1zS" x="300" y="-111">
            <field name="VAR" id="%f2p3[xiEK;T;hxSX|t5">shelly</field>
            <value name="VALUE">
              <block type="get_value" id="MfV3iIf5#Fx*F#SPbAd`">
                <field name="ATTR">val</field>
                <field name="OID">shelly.0.shellyplus1#7c87ce63d85c#1.Relay0.Switch</field>
              </block>
            </value>
            <next>
              <block type="on_ext" id="_f?n?9+^x32}4r=j(lF0">
                <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                <field name="CONDITION">ne</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="Bbh1E/},e./{_Yf3_;px">
                    <field name="oid">growatt.0.1030054.devices.DFK0BKD00C.historyLast.ppv</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="5^_]~A*IAxXr.+z+,O|g">
                    <mutation elseif="1"></mutation>
                    <value name="IF0">
                      <block type="logic_compare" id="9@jz$j=TVGPXYwK_N1tl">
                        <field name="OP">LT</field>
                        <value name="A">
                          <block type="on_source" id="3O1($TjuU2zLP#.u6(]l">
                            <field name="ATTR">state.val</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id=")G`AERK`8@25wu`}x;HJ">
                            <field name="NUM">3000</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" id="eb+o#xx@Yv#zEjH3[c8,">
                        <field name="VAR" id="%f2p3[xiEK;T;hxSX|t5">shelly</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="^9S9/{$K~z:7}vXy+vXd">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <value name="IF1">
                      <block type="logic_compare" id="Hk1ghg;eIF}mNq~qg2$N">
                        <field name="OP">GT</field>
                        <value name="A">
                          <block type="on_source" id=";GgYm,hYSX3/.3FCVqb^">
                            <field name="ATTR">state.val</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="`=4-0(|xgYJ{WIg_dctO">
                            <field name="NUM">3500</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO1">
                      <block type="variables_set" id="SDx9dFe8-XqT~?PP,265">
                        <field name="VAR" id="%f2p3[xiEK;T;hxSX|t5">shelly</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="^aFhyq!(ta2DJm$2qCtt">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="controls_if" id="9q!Zk#Vc?c9EX$:Z9zUK">
                        <value name="IF0">
                          <block type="logic_compare" id="43Vu=|/wYh`tM*c*dc-J">
                            <field name="OP">NEQ</field>
                            <value name="A">
                              <block type="variables_get" id="*xID|?TLTij`-[+2G4K[">
                                <field name="VAR" id="%f2p3[xiEK;T;hxSX|t5">shelly</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="get_value" id="}|Y8Zi|6j(ivB?Z+tt}8">
                                <field name="ATTR">val</field>
                                <field name="OID">shelly.0.shellyplus1#7c87ce63d85c#1.Relay0.Switch</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="control" id="12N5$JSuj7~#-O,zt39W">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                            <field name="OID">shelly.0.shellyplus1#7c87ce63d85c#1.Relay0.Switch</field>
                            <field name="WITH_DELAY">TRUE</field>
                            <field name="DELAY_MS">1000</field>
                            <field name="UNIT">ms</field>
                            <field name="CLEAR_RUNNING">FALSE</field>
                            <value name="VALUE">
                              <block type="variables_get" id="P@N|PbiTOZ:Bo}3[.)SG">
                                <field name="VAR" id="%f2p3[xiEK;T;hxSX|t5">shelly</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </xml>
        

        MOD-EDIT: Code in code-tags gesetzt!

        W 1 Reply Last reply Reply Quote 0
        • W
          WilliKlein @WilliKlein last edited by

          @williklein said in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

          @paul53

          ich weiss nicht wie ich das zurückschicken kann

          DJMarc75 paul53 2 Replies Last reply Reply Quote 0
          • DJMarc75
            DJMarc75 @WilliKlein last edited by

            @williklein @paul53 hat Dir ein Blockly geschickt.... was willst Du denn warum zurückschicken ??

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

              @williklein sagte: ich weiss nicht wie ich das zurückschicken kann

              Als Bild.

              Was soll das?

              Bild_2022-10-20_195050061.png

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

                @paul53

                ich wollte meine Änderung exportieren. Ich bin nicht gut in der Bedienung. Du hast mir das geschickt, ich habe es importiert, dann geändert und wollte es zurückschicken, ob ich es richtig gemacht habe. Das ist wohl daneben gegangen.

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

                  @williklein sagte: Das ist wohl daneben gegangen.

                  Nein, aber die Bedingungen lauten jetzt bei dir: Bei hohem Solarertrag Shelly ausschalten und bei niedrigem Solarertrag Shelly einschalten.

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

                    @paul53

                    ja ich möchte das natürlich testen und im Moment ist der Ertrag 0.

                    Ich habe an demshelly eine Lampe und möchte die zum Leuchten bringen.

                    Ich habe im Leitfaden gelesen, habs aber auch nicht verstanden

                    If Then variable <10
                    Schalter ein
                    else
                    Schalter aus
                    endif

                    Das ist für mich logisch. In Blockly kriege ich das nicht hin.

                    Bildschirmfoto 2022-10-20 um 22.30.03.png

                    crunchip Homoran 2 Replies Last reply Reply Quote 0
                    • crunchip
                      crunchip Forum Testing Most Active @WilliKlein last edited by

                      @williklein 59371ea7-6d07-406e-a3df-32b034725d49-image.png

                      W 1 Reply Last reply Reply Quote 0
                      • W
                        WilliKlein @crunchip last edited by

                        @crunchip

                        OK, der shelly spinet von false auf true um, aber das Licht geht nicht an.

                        Ist das dann der falsch é Datenpunkt ?

                        DJMarc75 crunchip W 3 Replies Last reply Reply Quote 0
                        • DJMarc75
                          DJMarc75 @WilliKlein last edited by DJMarc75

                          @williklein Wenn Du uns das Blockly zeigen würdest dann kann man bestimmt auch helfen.

                          1 Reply Last reply Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators @WilliKlein last edited by Homoran

                            @williklein sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                            If Then variable <10

                            wenn das dein Kriterium sein soll muss das hier der Trigger sein.
                            und die anschließende Logik machst du genau so wie dort.

                            1 Reply Last reply Reply Quote 0
                            • crunchip
                              crunchip Forum Testing Most Active @WilliKlein last edited by crunchip

                              @williklein das musst du im shelly einstellen, ob schalter, steckdose, taster, ob`s relais geschaltet werden soll....
                              hier als Beispiel
                              cafb69cc-69bf-41e6-b93c-633ce46c36a4-image.png

                              1 Reply Last reply Reply Quote 0
                              • W
                                WilliKlein @WilliKlein last edited by

                                @williklein said in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                @crunchip

                                Warum schaltet der shelly nicht, steht immer noch auf false

                                Bildschirmfoto 2022-10-21 um 11.02.56.png

                                Homoran 1 Reply Last reply Reply Quote 0
                                • Homoran
                                  Homoran Global Moderator Administrators @WilliKlein last edited by Homoran

                                  @williklein sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                  Warum schaltet der shelly nicht, steht immer noch auf false

                                  wie sollte er?

                                  @homoran sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                  @williklein sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                  If Then variable <10

                                  wenn das dein Kriterium sein soll muss das hier der Trigger sein.
                                  und die anschließende Logik machst du genau so wie dort.

                                  die Zeit muss in die Logik.

                                  der Auslöser soll doch die Solareinspeisung/produktion sein
                                  bei dir löst die Uhrzeit (heute 0:01 -0:59) aus

                                  W 1 Reply Last reply Reply Quote 0
                                  • W
                                    WilliKlein @Homoran last edited by

                                    @homoran

                                    OK ich hatte nicht alle Stunden eingestellt. Jetzt schaltet der ein. Ich wollte erst mal sehen ob der überhaupt schaltet.

                                    Bildschirmfoto 2022-10-21 um 11.14.29.png

                                    Unten steht jetzt die Version wie ich sie gerne erstmal zum Schalten bringen möchte. Das geht jetzt noch nicht.

                                    Bildschirmfoto 2022-10-21 um 10.55.15.png

                                    Homoran paul53 crunchip 3 Replies Last reply Reply Quote 0
                                    • Homoran
                                      Homoran Global Moderator Administrators @WilliKlein last edited by

                                      @williklein sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                      OK ich hatte nicht alle Stunden eingestellt.

                                      ist trotzdem Blödsinn.
                                      dann lass lieben den Trigger weg, dann passiertvder Rest einmalig beim Skriptstart/abspeichern.

                                      @williklein sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                      Unten steht jetzt die Version wie ich sie gerne erstmal zum Schalten bringen möchte. Das geht jetzt noch nicht.

                                      ich denke das letzte falls gehört unter das andere falls/sonstfalls und nich in das sonstfalls

                                      W 1 Reply Last reply Reply Quote 0
                                      • W
                                        WilliKlein @Homoran last edited by

                                        @homoran

                                        des erste war nur ein Test, weil ich den shelly überhaupt nicht zum schalten bekommen habe, das lösche ich natürlich.

                                        Homoran 1 Reply Last reply Reply Quote 0
                                        • Homoran
                                          Homoran Global Moderator Administrators @WilliKlein last edited by

                                          @williklein sagte in Mit Blockly das Shelly 1 ein/aus über Solar Ertrag.:

                                          des erste war nur ein Test,

                                          Tests sind wichtig. Muss man aber richtig machen!
                                          ein Zeitraum als Trigger nutzt gar nichts bei diesem Skript. er ist nur gestartet, weil du es innerhalb des Zeitraums gespeichert hast

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

                                            @williklein sagte: Unten steht jetzt die Version wie ich sie gerne erstmal zum Schalten bringen möchte. Das geht jetzt noch nicht.

                                            Ist auch falsch. Richtig:

                                            Bild_2022-10-21_112630018.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            794
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            11
                                            220
                                            18017
                                            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