Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. DreamScreen Befehl wird nicht ausgeführt

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    DreamScreen Befehl wird nicht ausgeführt

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

      Hallo,
      ich benutze DreamScreen und hatte vorher nie Probleme gehabt. Nachdem ich auf Bookworm umgestiegen bin, habe ich das letzte backup vom iobroker aufgespielt. Normalerweise sollte DreamScreen funktonieren, tut es aber leider nicht mehr. Der Befehl in der exec wird nicht ausgeführt.
      In der Konsole kann ich z.B. folgenden Befehl eingeben und es funktioniert direkt:

      python /home/pi/DreamScreen/DreamScreenComander.py -m 1
      

      Die Rechte von Verzeichnis

      python /home/pi/DreamScreen/
      

      habe ich bereits auf 0777 geändert und es wird auch nicht rückgängig gemacht. Es muss wohl an iobroker liegen, der die exec nicht ausführt.
      anbei das Skript, was zuvor tatelos ging:

      <xml xmlns="https://developers.google.com/blockly/xml">
       <block type="on_ext" id="Fx|_D%=B(QPoNHFkNhEj" x="163" y="-38">
         <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="m.T|Vgh#cPW`fxYx9$!D">
             <field name="oid">hm-rpc.1.0001DBE9915A4A.6.POWER</field>
           </shadow>
         </value>
         <statement name="STATEMENT">
           <block type="controls_if" id="x)Gz-(4[{E1vI3gHQJ$!">
             <mutation elseif="1"></mutation>
             <value name="IF0">
               <block type="logic_operation" id="t3{cCYNndr*p+R!xwwDA" inline="false">
                 <field name="OP">AND</field>
                 <value name="A">
                   <block type="logic_compare" id="|T:klgkOuV3gJkn_+)Y`">
                     <field name="OP">GT</field>
                     <value name="A">
                       <block type="get_value" id="aF,gZeVq!?nI[Y)Ah6oh">
                         <field name="ATTR">val</field>
                         <field name="OID">hm-rpc.1.0001DBE9915A4A.6.POWER</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id="W3BfDdN/prR}_r7}#cL/">
                         <field name="NUM">1</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <value name="B">
                   <block type="logic_compare" id="VW$^CBBD*1H2GS`0!Ui+">
                     <field name="OP">LT</field>
                     <value name="A">
                       <block type="get_value" id="tMso4~.xbJ9g4DMWFSr7">
                         <field name="ATTR">val</field>
                         <field name="OID">hm-rpc.1.0001DA49A3482F.6.POWER</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id="0U(9A:y0h?kR#_{LYpi]">
                         <field name="NUM">5</field>
                       </block>
                     </value>
                   </block>
                 </value>
               </block>
             </value>
             <statement name="DO0">
               <block type="control" id=".fx*pMS|^Y#|W4]R9e4@">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">denon.0.settings.powerSystem</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="logic_boolean" id="(c_FG{QO)`zjk0*8sn*x">
                     <field name="BOOL">TRUE</field>
                   </block>
                 </value>
                 <next>
                   <block type="control" id="Y(lCWcKSdjMOK7I4W4)/">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">denon.0.zoneMain.selectInput</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="text" id="P.oP+Y*B!;-g*X0^3zFd">
                         <field name="TEXT">SAT/CBL</field>
                       </block>
                     </value>
                     <next>
                       <block type="exec" id="[K!H9I_UMc39$^/a}h/0">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                         <field name="WITH_STATEMENT">FALSE</field>
                         <field name="LOG">log</field>
                         <value name="COMMAND">
                           <shadow type="text" id="iEK`A$_)Ww5dJl0N/9]S">
                             <field name="TEXT">python /home/pi/DreamScreen/DreamScreenComander.py -m 1</field>
                           </shadow>
                         </value>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </statement>
             <value name="IF1">
               <block type="logic_operation" id="(-t@?9~r(H-Z~iZD:^FU" inline="false">
                 <field name="OP">AND</field>
                 <value name="A">
                   <block type="logic_compare" id="FY1.28aBxqD|Crw6m/e@">
                     <field name="OP">LT</field>
                     <value name="A">
                       <block type="get_value" id="{n11RGVaQQ0jvJs~fuIj">
                         <field name="ATTR">val</field>
                         <field name="OID">hm-rpc.1.0001DBE9915A4A.6.POWER</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id="i@DH2MXkG1-~jZ]~yCYD">
                         <field name="NUM">1</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <value name="B">
                   <block type="logic_operation" id="!(tTB(.P?Z,(yI7$8YYS" inline="false">
                     <field name="OP">AND</field>
                     <value name="A">
                       <block type="logic_compare" id="-?XDL,i-Tede=A6,kUJ~">
                         <field name="OP">LT</field>
                         <value name="A">
                           <block type="get_value" id="piK?iPDRQIEs_c/t27Ty">
                             <field name="ATTR">val</field>
                             <field name="OID">hm-rpc.1.0001DA49A3482F.6.POWER</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="4B@cPlr+jTsR;3bXN7`g">
                             <field name="NUM">5</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_compare" id="Z#2{]0!?T2WA,_(T/bo(">
                         <field name="OP">EQ</field>
                         <value name="A">
                           <block type="get_value" id="nGVfYfcxXzXHQI8QA{#h">
                             <field name="ATTR">val</field>
                             <field name="OID">denon.0.zoneMain.selectInput</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="text" id="x1X,(eWop1!H~TC_Q`Mh">
                             <field name="TEXT">SAT/CBL</field>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
               </block>
             </value>
             <statement name="DO1">
               <block type="control" id="?k/m#uwpTWP!vvWw*/nq">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">denon.0.settings.powerSystem</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="logic_boolean" id="^!VoEym1-xs#L5@j9@Oz">
                     <field name="BOOL">FALSE</field>
                   </block>
                 </value>
                 <next>
                   <block type="exec" id=",YpKq*wGc*yeba5@g(1d">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                     <field name="WITH_STATEMENT">FALSE</field>
                     <field name="LOG">log</field>
                     <value name="COMMAND">
                       <shadow type="text" id="OPsxKe4KPq[{bH4U6R_u">
                         <field name="TEXT">python /home/pi/DreamScreen/DreamScreenComander.py -m 0</field>
                       </shadow>
                     </value>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </statement>
       </block>
       <block type="comment" id="@`s,ARMz+*DZ*ns;z2m_" x="413" y="262">
         <field name="COMMENT">schaltet DreamScreen und </field>
       </block>
       <block type="comment" id="`QrHR4){y0D-$H`Cb4jZ" x="612" y="262">
         <field name="COMMENT">Musikanlage ein</field>
       </block>
       <block type="comment" id="nNJ8BG7M~@beAj{9o0,h" x="413" y="537">
         <field name="COMMENT">schaltet DreamScreen und</field>
       </block>
       <block type="comment" id="u1ce#wS)o^E@*zvKa`lv" x="612" y="538">
         <field name="COMMENT">Musikanlage aus</field>
       </block>
      </xml>
      


      Würde mir bitte jemand helfen?
      PS: exec Befehl ausführen ist im Javascript angekreuzt

      Kleiner Zusatz: Als Info bekomme ich im blockly auch folgendes ausgegeben:

      script.js.EG_Wohnzimmer_Denon_TV: exec: python /home/pi/DreamScreen/DreamScreenComander.py -m 0
      

      Am Blockly liegt es wohl nicht. Aber es gibt keine Reaktion. Nur wieder über die Console mit Befehl
      funktioniert es

      python /home/pi/DreamScreen/DreamScreenComander.py -m 0
      
      ? Thomas Braun 2 Replies Last reply Reply Quote 0
      • ?
        A Former User @jwerlsdf last edited by

        @jwerlsdf sagte in DreamScreen Befehl wird nicht ausgeführt:

        Würde mir bitte jemand helfen?

        Moin,

        ein Tipp am Rande, Du solltest immer die gesamte Befehlszeile bis zum neuen Prompt zeigen, so sieht man nicht, welcher User was ausführt, ein zweiter Tipp, wenn es Blockly ist, dann wäre ein Bild des Blockly hilfreicher als die XML Wüste.

        Zum Problem, kann ich Dir leider nicht weiter helfen.

        VG
        Bernd

        1 Reply Last reply Reply Quote 0
        • Thomas Braun
          Thomas Braun Most Active @jwerlsdf last edited by Thomas Braun

          @jwerlsdf sagte in DreamScreen Befehl wird nicht ausgeführt:

          Leg es nicht im /home/pi sondern in /home/iobroker ab. Besser noch in /usr/local/bin und dann startest du das über eine .service-Datei in systemd.

          So als Anregung meine solix2mqtt.service

          echad@chet:~ $ cat /usr/lib/systemd/system/solix2mqtt.service
          [Unit]
          Description=Pushing Anker Solix data to mosquitto
          After=mosquitto.service
          Before=iobroker.service
          
          [Service]
          User=iobroker
          Group=iobroker
          ExecStart=/usr/local/bin/solix2mqtt/solix2mqtt.sh
          Type=simple
          # Restart=always
          
          
          [Install]
          WantedBy=multi-user.target
          #RequiredBy=network.target
          echad@chet:~ $
          

          Damit wird das Kommando als iobroker ausgeführt. Und zwar nachdem mosquitto gestartet wurde, aber vor dem iobroker.

          J 1 Reply Last reply Reply Quote 1
          • J
            jwerlsdf @Thomas Braun last edited by

            @thomas-braun
            @thomas-braun
            vielen Dank für deine Hilfe. Ich habe die einfachste Lösung von dir genommen die dann auch auf Anhieb geklappt hat und zwar:
            Die Dreamscreen in

            /usr/local/bin 
            

            kopiert und das Skript angepasst (Rechte noch auf 0777 gesetzt) und schon hat es geklappt. Dies funktioniert wie gesagt unter Bookworm.

            Unter der 9er Version hat folgender Pfad funktioniert:

            /home/iobroker/DreamScreenComander.py
            

            Unter der 10er Version war es:

            /home/pi/DreamScreen/DreamScreenComander.py
            

            Schon komisch, das es je nach Version von Raspberry unterschiedliche Pfade sind, die funktionieren

            Thomas Braun 1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @jwerlsdf last edited by Thomas Braun

              @jwerlsdf sagte in DreamScreen Befehl wird nicht ausgeführt:

              Schon komisch, das es je nach Version von Raspberry unterschiedliche Pfade sind, die funktionieren

              Es funktioniert natürlich jeder Pfad, wenn der beim Aufruf des Skripts angegeben wird.
              Und wie ich oben glaube ich bereits ausgeführt habe legt man sowas nicht direkt in /home-Verzeichnisse (wenn überhaupt dann dort in ~/.local/bin), sondern in /usr/local/bin

              Und wenn der Pfad dann auch im $PATH liegt braucht man auch nicht den kompletten Pfad angeben.

              echo $PATH
              
              1 Reply Last reply Reply Quote 1
              • First post
                Last post

              Support us

              ioBroker
              Community Adapters
              Donate

              708
              Online

              32.0k
              Users

              80.4k
              Topics

              1.3m
              Posts

              3
              5
              222
              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