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] blockly musikplayer - VIS

    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

    [gelöst] blockly musikplayer - VIS

    This topic has been deleted. Only users with topic management privileges can see it.
    • dslraser
      dslraser Forum Testing Most Active @patrick039212 last edited by dslraser

      @patrick039212

      Damit müsstest Du es schon an und ausschalten können, probiere mal...Um die Alexa Befehle können wir uns ja gleich kümmern. Meinst Du sowas. (im Trigger Deinen Schalter einfügen)

      Bildschirmfoto 2020-04-10 um 22.03.43.png

      <xml xmlns="http://www.w3.org/1999/xhtml">
       <block type="comment" id="Y)^OQX=4qN@eo%N_SI(_" x="-288" y="87">
         <field name="COMMENT">Trigger auswählen</field>
         <next>
           <block type="on_ext" id="n[L!|Z3-!2M2`/YI1VLc">
             <mutation items="1"></mutation>
             <field name="CONDITION">ne</field>
             <field name="ACK_CONDITION"></field>
             <value name="OID0">
               <shadow type="field_oid" id="[;8D5{yn~A$[uJ)r,M5U">
                 <field name="oid">default</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="r4;C-s:gJHryisv4KGb`">
                 <mutation else="1"></mutation>
                 <value name="IF0">
                   <block type="on_source" id="~DD%(.c_8OctNk;?4tW,">
                     <field name="ATTR">state.val</field>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="comment" id="g}TuHbtrA6O!-t0!C#q;">
                     <field name="COMMENT">NDR2</field>
                     <next>
                       <block type="control" id="pdP4]j.R]sG|Kbv{UAOu">
                         <mutation delay_input="false"></mutation>
                         <field name="OID">alexa2.0.Echo-Devices.xxx.Player.TuneIn-Station</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="text" id="s,iZ/qZ?P?P|Z_$-J}W[">
                             <field name="TEXT">NDR 2</field>
                           </block>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <statement name="ELSE">
                   <block type="control" id="ngh%mwu(d(S#=ec1Wvlx">
                     <mutation delay_input="false"></mutation>
                     <field name="OID">alexa2.0.Echo-Devices.xxx.Player.controlPause</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="8,X?-H,Dzv1G,]3ZVC5q">
                         <field name="BOOL">TRUE</field>
                       </block>
                     </value>
                   </block>
                 </statement>
               </block>
             </statement>
           </block>
         </next>
       </block>
      </xml>
      

      P 1 Reply Last reply Reply Quote 0
      • P
        patrick039212 @dslraser last edited by patrick039212

        @dslraser testneu.png

        Ich habe einen neuen Datenpunkt "echoshow" angelegt ...

        Das Problem ist das letzte sonst fals, wenn ich jetzt zu Alexa sage spiele z.B Ö3 schaltet er den Schalter auf True dadurch wird oben im Skript der Sender wieder auf Kronehit gewechselt...
        Es müsste nach dem letzten "sonst fals" das Skript beendet werden ...

        ED
        Sry jetzt erst deinen Beitrag gesehen, ja das würde funktionieren.

        dslraser 2 Replies Last reply Reply Quote 0
        • dslraser
          dslraser Forum Testing Most Active @patrick039212 last edited by

          @patrick039212

          ich habe das jetzt mal mit einer Steckdose probiert (das ist quasi Dein eigener Datenpunkt)
          Funktioniert. Meinst Du es so ?

          Bildschirmfoto 2020-04-10 um 22.24.07.png

          1 Reply Last reply Reply Quote 0
          • dslraser
            dslraser Forum Testing Most Active @patrick039212 last edited by

            @patrick039212 sagte in blockly musikplayer - VIS:

            schaltet er den Schalter auf True dadurch wird oben im Skript der Sender wieder auf Kronehit gewechselt...

            achso..., ja stimmt...dann muss das anders

            P 1 Reply Last reply Reply Quote 0
            • P
              patrick039212 @dslraser last edited by

              @dslraser

              ja nur wie, komme auf keine Lösung

              dslraser 2 Replies Last reply Reply Quote -1
              • dslraser
                dslraser Forum Testing Most Active @patrick039212 last edited by

                @patrick039212
                ich probiere gerade...

                1 Reply Last reply Reply Quote 0
                • dslraser
                  dslraser Forum Testing Most Active @patrick039212 last edited by dslraser

                  @patrick039212 sagte in blockly musikplayer - VIS:

                  @dslraser

                  ja nur wie, komme auf keine Lösung

                  so könnte es klappen. Der controlPause braucht eine ganz schöne Verzögerung, sonst ging es bei mir nicht aus.
                  Bildschirmfoto 2020-04-10 um 23.38.33.png

                  <xml xmlns="http://www.w3.org/1999/xhtml">
                   <block type="on_ext" id="n[L!|Z3-!2M2`/YI1VLc" x="-337" y="62">
                     <mutation items="1"></mutation>
                     <field name="CONDITION">ne</field>
                     <field name="ACK_CONDITION"></field>
                     <value name="OID0">
                       <shadow type="field_oid" id="[;8D5{yn~A$[uJ)r,M5U">
                         <field name="oid">hm-rpc.0.SchalterSTATE</field>
                       </shadow>
                     </value>
                     <statement name="STATEMENT">
                       <block type="controls_if" id="r4;C-s:gJHryisv4KGb`">
                         <value name="IF0">
                           <block type="on_source" id="X2ey^e9~Ky=hL=ap+Ig7">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="controls_if" id=")CPaSYFnC1BV=@+uY.4I">
                             <value name="IF0">
                               <block type="logic_compare" id="Da9}Q3WGE1O0_Uh~2WE;">
                                 <field name="OP">NEQ</field>
                                 <value name="A">
                                   <block type="on_source" id="4R.`#-r4WQ+bCL~c5MO2">
                                     <field name="ATTR">state.from</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="text" id="ZcgMybnh-RIZZdizL}k$">
                                     <field name="TEXT">system.adapter.javascript.0</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="comment" id="g}TuHbtrA6O!-t0!C#q;">
                                 <field name="COMMENT">NDR2</field>
                                 <next>
                                   <block type="control" id="pdP4]j.R]sG|Kbv{UAOu">
                                     <mutation delay_input="false"></mutation>
                                     <field name="OID">alexa2.0.Echo-Devices.xxx.Player.TuneIn-Station</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="text" id="s,iZ/qZ?P?P|Z_$-J}W[">
                                         <field name="TEXT">NDR 2</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="debug" id="bNz}RU6F}hM*W+e{,`-e">
                                         <field name="Severity">log</field>
                                         <value name="TEXT">
                                           <shadow type="text" id="7az6O~^AZ/k@N6uP]u9`">
                                             <field name="TEXT">sender an</field>
                                           </shadow>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                           </block>
                         </statement>
                         <next>
                           <block type="controls_if" id="Ly,HUr0QzAT;OsSx(.Us">
                             <value name="IF0">
                               <block type="logic_negate" id="wuJ{VFmKH,ws({pFl^8@">
                                 <value name="BOOL">
                                   <block type="on_source" id="}TBG3~qCcgUqPB3Z9t#Q">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="control" id="0+z[`l2Zz,^W07pFcVwI">
                                 <mutation delay_input="true"></mutation>
                                 <field name="OID">alexa2.0.Echo-Devices.xxx.Player.controlPause</field>
                                 <field name="WITH_DELAY">TRUE</field>
                                 <field name="DELAY_MS">3000</field>
                                 <field name="UNIT">ms</field>
                                 <field name="CLEAR_RUNNING">TRUE</field>
                                 <value name="VALUE">
                                   <block type="logic_boolean" id="^IkG(Ro4UR:bdnfAd[tl">
                                     <field name="BOOL">TRUE</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="debug" id="rEd#F]iKSO+tQ,U:/r)w">
                                     <field name="Severity">log</field>
                                     <value name="TEXT">
                                       <shadow type="text" id="`/^djKksx}O:nv]qEF[P">
                                         <field name="TEXT">sender aus</field>
                                       </shadow>
                                     </value>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </statement>
                     <next>
                       <block type="on_ext" id="/?mYxi#6K*C8f~d*4Z}3">
                         <mutation items="1"></mutation>
                         <field name="CONDITION">ne</field>
                         <field name="ACK_CONDITION"></field>
                         <value name="OID0">
                           <shadow type="field_oid" id="A%x#r]gw28kiogk%rbXz">
                             <field name="oid">alexa2.0.Echo-Devices.xxx.Player.currentState</field>
                           </shadow>
                         </value>
                         <statement name="STATEMENT">
                           <block type="controls_if" id="X7W43%DS?aL~;O6`)/{(">
                             <mutation else="1"></mutation>
                             <value name="IF0">
                               <block type="on_source" id="*Vex#qEb+mF{LKh@#u|T">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="control" id="5hI#Zp|oP[=tPMv{1FMb">
                                 <mutation delay_input="false"></mutation>
                                 <field name="OID">hm-rpc.0.Schalter.3.STATE</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="logic_boolean" id="dFZ*JU[GbT+,9fR}0~lv">
                                     <field name="BOOL">TRUE</field>
                                   </block>
                                 </value>
                               </block>
                             </statement>
                             <statement name="ELSE">
                               <block type="control" id="6a`dv{_S9_whBP:BcUp.">
                                 <mutation delay_input="false"></mutation>
                                 <field name="OID">hm-rpc.0.Schalter.3.STATE</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="logic_boolean" id="#p|drbt/hX)T-sjS)[oR">
                                     <field name="BOOL">FALSE</field>
                                   </block>
                                 </value>
                               </block>
                             </statement>
                           </block>
                         </statement>
                       </block>
                     </next>
                   </block>
                  </xml>
                  

                  P 1 Reply Last reply Reply Quote 0
                  • P
                    patrick039212 @dslraser last edited by

                    @dslraser
                    Danke, teste ich sofort eine Frage nur was bedeutet "system.adapter,javascript.0"?

                    dslraser 1 Reply Last reply Reply Quote 0
                    • dslraser
                      dslraser Forum Testing Most Active @patrick039212 last edited by dslraser

                      @patrick039212
                      bei mir läuft das Blockly auf der Instanz javascript.0
                      Das soll bewirken, wenn der Ursprüngliche Befehl nicht von da kommt (sondern über die Sprache per Alexa2 Adapter umgeschaltet wird) auf einen anderen Sender, das nicht wieder der Schalter aus geht bzw. wieder auf diesen Sender zurück geschaltet wird. Wenn Du über den Schalter einschaltest, dann geht immer der im Blockly genannte Sender an, dann kannst Du den Sender per Sprache wechseln, aber der Schalter bleibt an. Wenn Du dann den Schalter ausschaltest, oder Alexa stop sagst, dann geht auch der Schalter aus. (immer innerhalb von TuneIn, wenn Du auf einen anderen Provider wechselst geht das nicht)

                      P 1 Reply Last reply Reply Quote 1
                      • P
                        patrick039212 @dslraser last edited by

                        @dslraser

                        Vielen, vielen, vielen dank, es funktioniert perfekt!

                        dslraser 1 Reply Last reply Reply Quote 1
                        • dslraser
                          dslraser Forum Testing Most Active @patrick039212 last edited by dslraser

                          @patrick039212 sagte in [gelöst] blockly musikplayer - VIS:

                          @dslraser

                          Vielen, vielen, vielen dank, es funktioniert perfekt!

                          mach mal so, dann geht es auch wenn die Mediathek gewechselt wird.(weil da wechselt auch currentState von true auf false und umgekehrt.

                          Bildschirmfoto 2020-04-11 um 08.01.28.png

                          <xml xmlns="http://www.w3.org/1999/xhtml">
                           <variables>
                             <variable type="undefined" id="warten">warten</variable>
                             <variable type="undefined" id="warten1">warten1</variable>
                           </variables>
                           <block type="on_ext" id="n[L!|Z3-!2M2`/YI1VLc" x="-462" y="-88">
                             <mutation items="1"></mutation>
                             <field name="CONDITION">ne</field>
                             <field name="ACK_CONDITION"></field>
                             <value name="OID0">
                               <shadow type="field_oid" id="[;8D5{yn~A$[uJ)r,M5U">
                                 <field name="oid">hm-rpc.0.xxx.3.STATE</field>
                               </shadow>
                             </value>
                             <statement name="STATEMENT">
                               <block type="timeouts_cleartimeout" id="f#iR]GJ8lUs`EK5?1]3l">
                                 <field name="NAME">warten</field>
                                 <next>
                                   <block type="controls_if" id="r4;C-s:gJHryisv4KGb`">
                                     <value name="IF0">
                                       <block type="on_source" id="X2ey^e9~Ky=hL=ap+Ig7">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="controls_if" id=")CPaSYFnC1BV=@+uY.4I">
                                         <value name="IF0">
                                           <block type="logic_compare" id="Da9}Q3WGE1O0_Uh~2WE;">
                                             <field name="OP">NEQ</field>
                                             <value name="A">
                                               <block type="on_source" id="4R.`#-r4WQ+bCL~c5MO2">
                                                 <field name="ATTR">state.from</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <block type="text" id="ZcgMybnh-RIZZdizL}k$">
                                                 <field name="TEXT">system.adapter.javascript.0</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <statement name="DO0">
                                           <block type="comment" id="g}TuHbtrA6O!-t0!C#q;">
                                             <field name="COMMENT">NDR2</field>
                                             <next>
                                               <block type="control" id="pdP4]j.R]sG|Kbv{UAOu">
                                                 <mutation delay_input="false"></mutation>
                                                 <field name="OID">alexa2.0.Echo-Devices.xxx.Player.TuneIn-Station</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="text" id="s,iZ/qZ?P?P|Z_$-J}W[">
                                                     <field name="TEXT">NDR 2</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </statement>
                                       </block>
                                     </statement>
                                     <next>
                                       <block type="timeouts_settimeout" id="l]}8z`u4$EnTQ+56jS:;">
                                         <field name="NAME">warten</field>
                                         <field name="DELAY">3000</field>
                                         <field name="UNIT">ms</field>
                                         <statement name="STATEMENT">
                                           <block type="controls_if" id="uQ[6Vx)A8^f[_`ZWBo-I">
                                             <value name="IF0">
                                               <block type="logic_negate" id="zK`x%(ZQA8k#?-Z!t@^t">
                                                 <value name="BOOL">
                                                   <block type="on_source" id="NC?ijjP{R3-qto[S*:Y?">
                                                     <field name="ATTR">state.val</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <statement name="DO0">
                                               <block type="control" id="0+z[`l2Zz,^W07pFcVwI">
                                                 <mutation delay_input="false"></mutation>
                                                 <field name="OID">alexa2.0.Echo-Devices.xxx.Player.controlPause</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="logic_boolean" id="^IkG(Ro4UR:bdnfAd[tl">
                                                     <field name="BOOL">TRUE</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </statement>
                                           </block>
                                         </statement>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                             <next>
                               <block type="on_ext" id="/?mYxi#6K*C8f~d*4Z}3">
                                 <mutation items="1"></mutation>
                                 <field name="CONDITION">ne</field>
                                 <field name="ACK_CONDITION"></field>
                                 <value name="OID0">
                                   <shadow type="field_oid" id="A%x#r]gw28kiogk%rbXz">
                                     <field name="oid">alexa2.0.Echo-Devices.xxx.Player.currentState</field>
                                   </shadow>
                                 </value>
                                 <statement name="STATEMENT">
                                   <block type="timeouts_cleartimeout" id="]zZY~`R|cK#JUQ?o[mcR">
                                     <field name="NAME">warten1</field>
                                     <next>
                                       <block type="controls_if" id="]xyP-o,QmN)`)*i$=/Kj">
                                         <value name="IF0">
                                           <block type="on_source" id="I8m%eC7^e~Q6|A3?l/Ns">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                         <statement name="DO0">
                                           <block type="control" id="--TW.4D{Cr^MBX!}hh|%">
                                             <mutation delay_input="false"></mutation>
                                             <field name="OID">hm-rpc.0.xxx.3.STATE</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="logic_boolean" id="XMyhv9A6+QU6tDZk(m|a">
                                                 <field name="BOOL">TRUE</field>
                                               </block>
                                             </value>
                                           </block>
                                         </statement>
                                         <next>
                                           <block type="timeouts_settimeout" id=")$,Bovlq;z5du7z6G*!_">
                                             <field name="NAME">warten1</field>
                                             <field name="DELAY">3000</field>
                                             <field name="UNIT">ms</field>
                                             <statement name="STATEMENT">
                                               <block type="controls_if" id="X7W43%DS?aL~;O6`)/{(">
                                                 <value name="IF0">
                                                   <block type="logic_negate" id="M.wEb-V%;8ecnBf[^(i7">
                                                     <value name="BOOL">
                                                       <block type="on_source" id="*Vex#qEb+mF{LKh@#u|T">
                                                         <field name="ATTR">state.val</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <statement name="DO0">
                                                   <block type="control" id="6a`dv{_S9_whBP:BcUp.">
                                                     <mutation delay_input="false"></mutation>
                                                     <field name="OID">hm-rpc.0.xxx.3.STATE</field>
                                                     <field name="WITH_DELAY">FALSE</field>
                                                     <value name="VALUE">
                                                       <block type="logic_boolean" id="#p|drbt/hX)T-sjS)[oR">
                                                         <field name="BOOL">FALSE</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </statement>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                               </block>
                             </next>
                           </block>
                          </xml>
                          

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

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          467
                          Online

                          31.9k
                          Users

                          80.1k
                          Topics

                          1.3m
                          Posts

                          blockly javascript multimedia
                          3
                          30
                          2802
                          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