Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Fernseher Zeitverzögert ausschalten

    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

    Fernseher Zeitverzögert ausschalten

    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Jan1 @Freakezoid last edited by

      @Freakezoid
      Der Aufbau ist komplett falsch. Ohne Trigger um das ganze wird nix ausgeführt. Grundsätzlicher Aufbau ist Trigger und darin das was gemacht werden soll. Wenn Blöcke alleine stehen, werden die nur beim Script Start abgearbeitet und dann nie wieder.

      1 Reply Last reply Reply Quote 0
      • F
        Freakezoid last edited by

        So habe es nochmal ein wenig umgebaut

        7a16fcbb-3cb6-475e-b625-ff0a37306727-image.png

        wenn ich Jetzt Ausschalttimer auf 3 Setze sollte Calender doch nach 30 Sekunden aktiviert werden oder? wird er aber nicht.

        Hier noch wie ich das Objekt Ausschalttimer angelegt habe.

        303a4316-4dcc-4a4c-a938-e5f81419848b-image.png

        Die Frage was ist falsch.

        1 Reply Last reply Reply Quote 0
        • F
          Freakezoid last edited by

          @Jan1 Und falls Objekt ist doch ein Trigger oder ?

          J 1 Reply Last reply Reply Quote 0
          • J
            Jan1 @Freakezoid last edited by

            @Freakezoid
            Trigger sind die rosa Blöcke. Auch andere Blöcke können ein Trigger sein, dann muss man aber einiges beachten.
            Dei Script hat zuviel Variablen, die man nicht kennt, sprich die DPs die Du da verwendest. So wird es schwer zu sagen was da überhaupt passiert.
            Warte mal was @paul53 dazu sagt, der ist recht fit im Blockly lesen.

            1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @Freakezoid last edited by liv-in-sky

              @Freakezoid

              damit gehts: test ausschaltzeit war eine minute (roter pfeil)

              • die debug-blocklies dienen nur zur sichtbarmachung im log - kann man später deaktivieren

              Image 21.png

              für import - datenpunkt angleichen !


              <block xmlns="http://www.w3.org/1999/xhtml" type="on_ext" id="HXhV]8:d}^}K8?b7[Va(" x="1262" y="812">
              <mutation items="1"></mutation>
              <field name="CONDITION">any</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
              <shadow type="field_oid" id="w_hUg12Mk9RBlmbIE}m]">
              <field name="oid">controll-own.0.AAATEST.TestZahl</field>
              </shadow>
              </value>
              <statement name="STATEMENT">
              <block type="debug" id="7-R(y3)A3b}Hhn9qAYDm">
              <field name="Severity">warn</field>
              <value name="TEXT">
              <shadow type="text" id="ab1lbd(L}AEA2!pALw="> <field name="TEXT">an</field> </shadow> </value> <next> <block type="variables_set" id="6vFjV?lvMLG}1,c7y=[y"> <field name="VAR" id="$M8UD=r,/^k]3im{HLX-" variabletype="">warten</field> <value name="VALUE"> <block type="math_number" id="=$Ypv6$E---iUC28RaG6"> <field name="NUM">0</field> </block> </value> <next> <block type="timeouts_setinterval" id="afmm(8JY;`vG1/!b}?:">
              <field name="NAME">Intervall</field>
              <field name="INTERVAL">1</field>
              <field name="UNIT">min</field>
              <statement name="STATEMENT">
              <block type="math_change" id="o?49A.tCKj3ZAg=#.xr">
              <field name="VAR" id="$M8UD=r,/^k]3im{HLX-" variabletype="">warten</field>
              <value name="DELTA">
              <shadow type="math_number" id="tdp}A{~=x$5aJI{h]n9~">
              <field name="NUM">1</field>
              </shadow>
              <block type="math_number" id="b8799A{f$2K,=i}Qw)N">
              <field name="NUM">1</field>
              </block>
              </value>
              <next>
              <block type="timeouts_settimeout" id="T{!QPpX
              K^Vn9INQU^)]">
              <field name="NAME">timeout</field>
              <field name="DELAY">250</field>
              <field name="UNIT">ms</field>
              <statement name="STATEMENT">
              <block type="controls_if" id="a5vt2QtIR{@LCs].ZYdk">
              <value name="IF0">
              <block type="logic_compare" id="Z(aoX
              Ofc%|BJdTHxc)U">
              <field name="OP">GTE</field>
              <value name="A">
              <block type="variables_get" id="z4fTTUwL.Ul{+K=!G8[n">
              <field name="VAR" id="$M8UD=r,/^k]3im{HLX-" variabletype="">warten</field>
              </block>
              </value>
              <value name="B">
              <block type="get_value" id="b[xuuAE53{j-],U%=cGv">
              <field name="ATTR">val</field>
              <field name="OID">controll-own.0.AAATEST.TestZahl</field>
              </block>
              </value>
              </block>
              </value>
              <statement name="DO0">
              <block type="debug" id=";C#;8fDH%Zr^@ZpsM_mk">
              <field name="Severity">warn</field>
              <value name="TEXT">
              <shadow type="text" id="9p,6fgZrY%-.e0W75F57">
              <field name="TEXT">jetzt aus</field>
              </shadow>
              </value>
              <next>
              <block type="control" id="vSche)0SB-C1%{#gMX1." disabled="true">
              <mutation delay_input="false"></mutation>
              <field name="OID">Object ID</field>
              <field name="WITH_DELAY">FALSE</field>
              <value name="VALUE">
              <block type="text" id="$#+B8L[CSMq?^RuxQqX^">
              <field name="TEXT">hier tv ausschalten</field>
              </block>
              </value>
              <next>
              <block type="timeouts_settimeout" id="}wkr+3XbUwV.5kJx/7e%">
              <field name="NAME">timeout2</field>
              <field name="DELAY">500</field>
              <field name="UNIT">ms</field>
              <statement name="STATEMENT">
              <block type="timeouts_clearinterval" id="T,1W]N,o1kIAguqnPXP$">
              <field name="NAME">Intervall</field>
              </block>
              </statement>
              </block>
              </next>
              </block>
              </next>
              </block>
              </statement>
              </block>
              </statement>
              </block>
              </next>
              </block>
              </statement>
              </block>
              </next>
              </block>
              </next>
              </block>
              </statement>
              </block>

              paul53 1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @liv-in-sky last edited by paul53

                @liv-in-sky
                Die beiden timeout sind überflüssig.

                Variante mit "count down":
                Blockly_temp.JPG

                liv-in-sky 1 Reply Last reply Reply Quote 0
                • liv-in-sky
                  liv-in-sky @paul53 last edited by

                  @paul53

                  danke für den hinweis - ich wollte nur sicher gehen - ich dachte das läuft alles "parallel" ab oder hab ich da noch was falsches im kopf (asynchrones synchrones - javascript) ?

                  paul53 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky last edited by

                    hier die version ohne timeouts - paul hat natürlich recht

                    Image 22.png


                    <block xmlns="http://www.w3.org/1999/xhtml" type="on_ext" id="HXhV]8:d}^}K8?b7[Va(" x="1262" y="812">
                    <mutation items="1"></mutation>
                    <field name="CONDITION">any</field>
                    <field name="ACK_CONDITION"></field>
                    <value name="OID0">
                    <shadow type="field_oid" id="w_hUg12Mk9RBlmbIE}m]">
                    <field name="oid">controll-own.0.AAATEST.TestZahl</field>
                    </shadow>
                    </value>
                    <statement name="STATEMENT">
                    <block type="debug" id="7-R(y3)A3b}Hhn9qAYDm">
                    <field name="Severity">warn</field>
                    <value name="TEXT">
                    <shadow type="text" id="ab1lbd(L}AEA2!pALw="> <field name="TEXT">an</field> </shadow> </value> <next> <block type="variables_set" id="6vFjV?lvMLG}1,c7y=[y"> <field name="VAR" id="$M8UD=r,/^k]3im{HLX-" variabletype="">warten</field> <value name="VALUE"> <block type="math_number" id="=$Ypv6$E---iUC28RaG6"> <field name="NUM">0</field> </block> </value> <next> <block type="timeouts_setinterval" id="afmm(8JY;`vG1/!b}?:">
                    <field name="NAME">Intervall</field>
                    <field name="INTERVAL">1</field>
                    <field name="UNIT">min</field>
                    <statement name="STATEMENT">
                    <block type="math_change" id="o?49A.*tCKj3ZAg=#.xr">
                    <field name="VAR" id="$M8UD=r,/^k]3im{HLX-" variabletype="">warten</field>
                    <value name="DELTA">
                    <shadow type="math_number" id="tdp}A{~=x$5aJI{h]n9~">
                    <field name="NUM">1</field>
                    </shadow>
                    <block type="math_number" id="b8799A{f$2K,=i}Qw)N">
                    <field name="NUM">1</field>
                    </block>
                    </value>
                    <next>
                    <block type="controls_if" id="a5vt2QtIR{@LCs].ZYdk">
                    <value name="IF0">
                    <block type="logic_compare" id="Z(aoX
                    Ofc%|BJdTHxc)U">
                    <field name="OP">GTE</field>
                    <value name="A">
                    <block type="variables_get" id="z4fTTUwL.Ul{+K=!G8[n">
                    <field name="VAR" id="$M8UD=r,/^k]3im{HLX-" variabletype="">warten</field>
                    </block>
                    </value>
                    <value name="B">
                    <block type="get_value" id="b[xuuAE53{j-],U%=cGv">
                    <field name="ATTR">val</field>
                    <field name="OID">controll-own.0.AAATEST.TestZahl</field>
                    </block>
                    </value>
                    </block>
                    </value>
                    <statement name="DO0">
                    <block type="debug" id=";C#;8fDH%Zr^@ZpsM_mk">
                    <field name="Severity">warn</field>
                    <value name="TEXT">
                    <shadow type="text" id="9p,6fgZrY%-.e0W75F57">
                    <field name="TEXT">jetzt aus</field>
                    </shadow>
                    </value>
                    <next>
                    <block type="control" id="vSche)0SB-C1%{#gMX1." disabled="true">
                    <mutation delay_input="false"></mutation>
                    <field name="OID">Object ID</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                    <block type="text" id="$#+B8L[CSMq?^RuxQqX^">
                    <field name="TEXT">hier tv ausschalten</field>
                    </block>
                    </value>
                    <next>
                    <block type="timeouts_clearinterval" id="T,1W]N,o1kIAguqnPXP$">
                    <field name="NAME">Intervall</field>
                    </block>
                    </next>
                    </block>
                    </next>
                    </block>
                    </statement>
                    </block>
                    </next>
                    </block>
                    </statement>
                    </block>
                    </next>
                    </block>
                    </next>
                    </block>
                    </statement>
                    </block>

                    1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @liv-in-sky last edited by

                      @liv-in-sky sagte:

                      ich dachte das läuft alles "parallel" ab oder hab ich da noch was falsches im kopf (asynchrones synchrones - javascript) ?

                      Nein, die meisten Befehle werden nacheinander abgearbeitet. Nur Funktionen mit Callback, wie Trigger, setState(), createState() ... arbeiten asynchron.

                      liv-in-sky 2 Replies Last reply Reply Quote 1
                      • liv-in-sky
                        liv-in-sky @paul53 last edited by

                        @paul53 danke dir- seit 2 jahren falsch gedacht 😞

                        1 Reply Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky @paul53 last edited by liv-in-sky

                          @paul53 darf ich dir noch eine frage stellen?

                          gibt es ein tool oder etwas, dass ausgeschriebene zahlen (fünf, drei, dreiundzwanzig,...) in ein integer verwandelt (5,3,23,...oder muss man da mit einer eigenen tabelle arbeiten ?

                          if ( x=="fünf" ) { y=5;};
                          
                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @liv-in-sky last edited by paul53

                            @liv-in-sky sagte:

                            gibt es ein tool ?

                            Mir ist kein Tool bekannt. Wie weit soll es denn reichen ?
                            Ich würde die Texte in ein Array schreiben und den Index als Ergebnis verwenden.

                            const texte = ['null','eins','zwei',...];
                            
                            liv-in-sky 1 Reply Last reply Reply Quote 0
                            • liv-in-sky
                              liv-in-sky @paul53 last edited by

                              @paul53 eigentlich bis 90

                              im moment nutze ich noch die tabelle und habe halt gängige werte gemacht - es geht um den alexa timer - im summery macht alexa bei: alexa timer 3 minuten -> timer drei minuten

                              habe einfach 1-20 und dann in 5er schritten bis 60 - dabei geht es eigentlich um minutentimer beim kochen - da reicht das erstmal

                              werd mal über das array nachdenken

                              vielen dank

                              1 Reply Last reply Reply Quote 0
                              • F
                                Freakezoid last edited by

                                Vielen Dank für die Hilfe jetzt geht es aber jetzt habe ich das Problem das mein Fernseher den Adapter irgendwie nicht frisst 😞

                                habe nen Samsung MU8009

                                Glasfaser 1 Reply Last reply Reply Quote 0
                                • Glasfaser
                                  Glasfaser @Freakezoid last edited by

                                  @Freakezoid

                                  Welchen Adapter nutzt du denn ???

                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    Freakezoid last edited by

                                    den samsung adapter

                                    Glasfaser 4 2 Replies Last reply Reply Quote 0
                                    • Glasfaser
                                      Glasfaser @Freakezoid last edited by Glasfaser

                                      @Freakezoid
                                      Wäre schon gewesen welcher Samsung Adapter 😉 , da es mehrere Version bzw. Anbieter gibt .

                                      Den Adapter habe ich , Version 0.0.2 und er funktioniert.
                                      Link Text

                                      1 Reply Last reply Reply Quote 0
                                      • 4
                                        4-Real @Freakezoid last edited by

                                        @Freakezoid glaube der ist nicht mehr sehr zuverlässig.
                                        habe auch nichts mehr mit dem adapter steuern können.
                                        glaube da bleibt dir nur der umweg mit nen harmony hub oder broadlink.

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Freakezoid last edited by

                                          will eigentlich nur nen timer für den fernseher bauen wer will ich garnicht

                                          BBTown 1 Reply Last reply Reply Quote 0
                                          • BBTown
                                            BBTown @Freakezoid last edited by BBTown

                                            @Freakezoid

                                            Wäre für deine Anforderung eine einfache "Schaltverzögrung" im Blocky-Element des TV denn nicht ausreichend?
                                            7e3092ef-32df-4ba7-8b1b-69684811ea69-grafik.png

                                            Wenn Du zufällig auch einen "Broadlink" hast (für Fernbedienungssignale?), dann hätte ich eine Alternative für dich zum Ausschalten des SAMSUNG, sofern der Sasmsung Adapter nicht zuverlässig funktioniert.

                                            Brroadlink-Code zum Eiinschalten von SAMSUNG TVs

                                            2600d200949413371237133712121213121212131212123713371238121212121213121212121337121212131138123812121213113812131138123812121212123812381212120006009494123713371238121212121213121212121238123713371212121312121213121212371312121212381237121311131238121212371238121213121237123812121200060094941238123713371212121312121212121312371238123713121212121311131212123812121213113812381212121212381212123812371312121212381237121312000d050000000000000000
                                            

                                            Brroadlink-Code zum Ausschalten von SAMSUNG TVs

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            878
                                            Online

                                            31.9k
                                            Users

                                            80.2k
                                            Topics

                                            1.3m
                                            Posts

                                            7
                                            21
                                            1349
                                            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