Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Hilfe bei request -> http Umstellung Sonos Sprachausgabe

    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

    Hilfe bei request -> http Umstellung Sonos Sprachausgabe

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

      Da ich immer noch an einer Lösung suche...

      Kann es sein, dass der Timeout nicht lang genug wartet?
      Ich habe 200ms und auch 500ms eingestellt bekomme aber nach 1ms die Meldung das die 500ms überschritten sind.

      Habe für diesen Text das Blockly wie folgt aufgebaut:

      851ec6c1-350e-4b96-a870-138b65b7a88e-image.png

      Log:

      javascript.0	20:06:57.237	error	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: httpGet(url=http://192.168.1.251:5005/K%C3%BCche/say/Guten Morgen, Heute ist /de-de, error=timeout of 200ms exceeded)
      javascript.0	20:06:57.237	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: Status Code: null
      javascript.0	20:06:57.237	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: Antwortzeit: undefined
      javascript.0	20:06:57.237	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: response headers: [object Object]
      javascript.0	20:06:57.237	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: Fehlermeldung: timeout of 200ms exceeded
      javascript.0	20:07:11.688	info	Stopping script script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test
      javascript.0	20:07:11.791	info	Start JavaScript script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test (Blockly)
      javascript.0	20:07:11.801	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
      javascript.0	20:07:12.301	error	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: httpGet(url=http://192.168.1.251:5005/K%C3%BCche/say/Guten Morgen, Heute ist /de-de, error=timeout of 500ms exceeded)
      javascript.0	20:07:12.302	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: Status Code: null
      javascript.0	20:07:12.302	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: Antwortzeit: undefined
      javascript.0	20:07:12.302	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: response headers: [object Object]
      javascript.0	20:07:12.302	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: Fehlermeldung: timeout of 500ms exceeded
      

      Irgendwie ist immer eine andere Meldung....

      haus-automatisierung 1 Reply Last reply Reply Quote 0
      • haus-automatisierung
        haus-automatisierung Developer Most Active @XBiT last edited by

        @xbit Kannst Du mal die Leerzeichen mit %20 ersetzen?

        http://192.168.1.251:5005/K%C3%BCche/say/Guten%20Morgen%2C%20Heute%20ist%20/de-de
        

        Klappt es dann?

        XBiT 1 Reply Last reply Reply Quote 0
        • XBiT
          XBiT @haus-automatisierung last edited by

          @haus-automatisierung

          geht leider auch nicht.

          Ich muss aber dazu sagten das trotz der Fehlermeldung mit der Zeitüberschreitung der Text abgespielt wird.
          aber wenn der Text länger wird klappt es nicht mehr.
          Ich habe auch schon alle Sonderzeichen raus gemacht auch ohne Erfolg.

          haus-automatisierung 1 Reply Last reply Reply Quote 0
          • haus-automatisierung
            haus-automatisierung Developer Most Active @XBiT last edited by

            @xbit Hab es gerade mal getestet und bekomme keinen Fehler. Timeout 5 Sek.

            Screenshot 2024-08-04 at 20.46.46.png

            XBiT 1 Reply Last reply Reply Quote 0
            • XBiT
              XBiT @haus-automatisierung last edited by XBiT

              @haus-automatisierung

              ich mit 5 sec auch nicht aber wenn das Script um 20:06:57.237 Startet und die Fehlermeldung 20:06:57.237 kommt das 200ms überschritten sind kann doch was nicht stimmen oder?

              aber wenn du auch Sonos hast und die http-api kannst du da nicht mal das Blockly bei dir testen?

              haus-automatisierung 1 Reply Last reply Reply Quote 0
              • haus-automatisierung
                haus-automatisierung Developer Most Active @XBiT last edited by

                @xbit Da liegen doch exakt 500ms zwischen:

                javascript.0	20:07:11.801	info	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                javascript.0	20:07:12.301	error	script.js.common.0_userdata_0_.Testbereich.Sprechausgabe_Sonos_Test: httpGet(url=http://192.168.1.251:5005/K%C3%BCche/say/Guten Morgen, Heute ist /de-de, error=timeout of 500ms exceeded)
                
                XBiT 1 Reply Last reply Reply Quote 0
                • XBiT
                  XBiT @haus-automatisierung last edited by XBiT

                  @haus-automatisierung

                  ja hast du recht bin bei dem testen schon ganz durch...

                  Falls es möglich ist, da du ja augenscheinlich auch die Sonos http api hast könntest du ja mal den Code aus Post 1 testen ob er geht muss ja nur die IP und der Raumname geändert werden und eventuell die Außentemperatur ausschalten.

                  Ansonsten müsste ich dann einen anderen Weg suchen um wieder die verschiedenen Ansagen zu erhalten.

                  EDIT Sorry hier der Code oben ist ja der alte...

                  <xml xmlns="https://developers.google.com/blockly/xml">
                   <variables>
                     <variable id=".Yvm,6)5C!N]^MT[`GAV">Datum</variable>
                     <variable id=",i|ut(0wYas5^:/cgIlT">Stunde</variable>
                     <variable id="Nao2zPy]Gh:tUN^{,?jw">Minute</variable>
                     <variable id="^IgPDXdy#sa!2)?B34#b">Tag</variable>
                     <variable id="6C%#L[`:Q.Jx1xcMSFWs">Aussentemperatur</variable>
                     <variable id="u.Y-DN^swG=N._[)_Ou;">URL</variable>
                   </variables>
                   <block type="procedures_defcustomreturn" id="$RIGDIe%Xa8Rr#p]Kq%," x="138" y="63">
                     <mutation statements="false"></mutation>
                     <field name="NAME">Aussentemp_umwandeln</field>
                     <field name="SCRIPT">Y29uc3Qgc3RhdGVWYWwgPSBnZXRTdGF0ZSgnaG0tcnBjLjAuS0VRMDE3NDYxOS4xLlRFTVBFUkFUVVJFJykudmFsOw0KLy8gIGxvZyhzdGF0ZVZhbCk7DQogICAgICAgIHZhciBUZW1wID0gKHN0YXRlVmFsLnRvU3RyaW5nKCkucmVwbGFjZSgnLicsICcsJykpOw0KLy8gbG9nKFRlbXApOw0KcmV0dXJuIFRlbXA7</field>
                     <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                   </block>
                   <block type="variables_set" id=";toPl|v_k)-Tvh{jioUv" x="138" y="139">
                     <field name="VAR" id=".Yvm,6)5C!N]^MT[`GAV">Datum</field>
                     <value name="VALUE">
                       <block type="time_get" id="M5KC.YEQGB71]Rw^a|Ln">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                         <field name="OPTION">DD.MM.YYYY</field>
                       </block>
                     </value>
                     <next>
                       <block type="variables_set" id="s4(uxbY$dv=ll;b/Y7i1">
                         <field name="VAR" id=",i|ut(0wYas5^:/cgIlT">Stunde</field>
                         <value name="VALUE">
                           <block type="time_get" id="]jWUOQ-5r6){HrrA_iU4">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                             <field name="OPTION">h</field>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="``pe:#@W+O;]OS(;y9QP">
                             <field name="VAR" id="Nao2zPy]Gh:tUN^{,?jw">Minute</field>
                             <value name="VALUE">
                               <block type="time_get" id="/Bf#x=pCr%ei:n2?Bx73">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                 <field name="OPTION">m</field>
                               </block>
                             </value>
                             <next>
                               <block type="variables_set" id="(Ky*8~7ISEs]7h$ah97n">
                                 <field name="VAR" id="^IgPDXdy#sa!2)?B34#b">Tag</field>
                                 <value name="VALUE">
                                   <block type="time_get" id="C/j?%}+vntB=cg^g|)kn">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="true"></mutation>
                                     <field name="OPTION">wdt</field>
                                     <field name="LANGUAGE">de</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="variables_set" id="wM:Tpw:(q8(E?@Gh14PL">
                                     <field name="VAR" id="6C%#L[`:Q.Jx1xcMSFWs">Aussentemperatur</field>
                                     <value name="VALUE">
                                       <block type="procedures_callcustomreturn" id="|x2g!an;a+E[m=xq21F7">
                                         <mutation name="Aussentemp_umwandeln"></mutation>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="}O4.1lMB$3{U9PIQfK2=">
                                         <field name="VAR" id="u.Y-DN^swG=N._[)_Ou;">URL</field>
                                         <value name="VALUE">
                                           <block type="text_join" id="BlNtE64ngY`sL9,6K2c1">
                                             <mutation items="13"></mutation>
                                             <value name="ADD0">
                                               <block type="text" id="+|8T_n|oBQ*FB0epO^]i">
                                                 <field name="TEXT">http://192.168.1.251:5005/K%C3%BCche/say/</field>
                                               </block>
                                             </value>
                                             <value name="ADD1">
                                               <block type="text" id="/b1#$O(Srgf`?usOT^cx">
                                                 <field name="TEXT">Guten Morgen, Heute ist </field>
                                               </block>
                                             </value>
                                             <value name="ADD2">
                                               <block type="variables_get" id="cYP}$.j)cSLchSN]#LDx">
                                                 <field name="VAR" id="^IgPDXdy#sa!2)?B34#b">Tag</field>
                                               </block>
                                             </value>
                                             <value name="ADD3">
                                               <block type="text" id="E*gE507Aq/r0=qrl~2_Q">
                                                 <field name="TEXT"> der </field>
                                               </block>
                                             </value>
                                             <value name="ADD4">
                                               <block type="variables_get" id="V6P-C-pa}SojJO=]KhLa">
                                                 <field name="VAR" id=".Yvm,6)5C!N]^MT[`GAV">Datum</field>
                                               </block>
                                             </value>
                                             <value name="ADD5">
                                               <block type="text" id="~wx9zhxp76eBE#UpcOo#">
                                                 <field name="TEXT"> es ist </field>
                                               </block>
                                             </value>
                                             <value name="ADD6">
                                               <block type="variables_get" id=",@24GC`!~}[shMtr[!w|">
                                                 <field name="VAR" id=",i|ut(0wYas5^:/cgIlT">Stunde</field>
                                               </block>
                                             </value>
                                             <value name="ADD7">
                                               <block type="text" id="}s}O!O%L8gTG4ajz_hG|">
                                                 <field name="TEXT"> Uhr </field>
                                               </block>
                                             </value>
                                             <value name="ADD8">
                                               <block type="variables_get" id="Rye9.PNb{1V/s${n*:B;">
                                                 <field name="VAR" id="Nao2zPy]Gh:tUN^{,?jw">Minute</field>
                                               </block>
                                             </value>
                                             <value name="ADD9">
                                               <block type="text" id="SerOxNp7CMWQ34lorOH9">
                                                 <field name="TEXT"> ,Die Außentemperatur beträgt </field>
                                               </block>
                                             </value>
                                             <value name="ADD10">
                                               <block type="variables_get" id="$n*K.5Ryc/)mjRz|!uri">
                                                 <field name="VAR" id="6C%#L[`:Q.Jx1xcMSFWs">Aussentemperatur</field>
                                               </block>
                                             </value>
                                             <value name="ADD11">
                                               <block type="text" id="ES{U_ZoXBKp5p=|hJqQ1">
                                                 <field name="TEXT"> °C</field>
                                               </block>
                                             </value>
                                             <value name="ADD12">
                                               <block type="text" id="5pr1s{0t$8Eun9.cQc=)">
                                                 <field name="TEXT">/de-de</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="comment" id="]2RJfLK5VNnHW|-LIuw(">
                                             <field name="COMMENT">Infoansage Morgens</field>
                                             <next>
                                               <block type="http_get" id="HZyjDv(_WWtZJ/N~r)n#">
                                                 <field name="TIMEOUT">5000</field>
                                                 <field name="UNIT">sec</field>
                                                 <field name="TYPE">text</field>
                                                 <value name="URL">
                                                   <shadow type="text" id="]QqbnelmljagyO6(JuII">
                                                     <field name="TEXT">http://</field>
                                                   </shadow>
                                                   <block type="variables_get" id="oG[T`sBKo,TF)U9L=#$l">
                                                     <field name="VAR" id="u.Y-DN^swG=N._[)_Ou;">URL</field>
                                                   </block>
                                                 </value>
                                                 <statement name="STATEMENT">
                                                   <block type="debug" id="`{4Q:A_;0/;v5ObGz@}V">
                                                     <field name="Severity">info</field>
                                                     <value name="TEXT">
                                                       <shadow type="text" id="/t~R~V7vjx6C`.#64r#7">
                                                         <field name="TEXT">test</field>
                                                       </shadow>
                                                       <block type="text_join" id="ejOhZtZ3{#s9#$R]]gY(">
                                                         <mutation items="2"></mutation>
                                                         <value name="ADD0">
                                                           <block type="text" id="]YJDuc77F}fO!;khXoT:">
                                                             <field name="TEXT">Status Code: </field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD1">
                                                           <block type="http_response" id="v~s/TH4lLH(9]rp!c!5G">
                                                             <field name="ATTR">response.statusCode</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="debug" id="Nm$c*oKwv-mg^-!CHgZ%">
                                                         <field name="Severity">info</field>
                                                         <value name="TEXT">
                                                           <shadow type="text" id="/t~R~V7vjx6C`.#64r#7">
                                                             <field name="TEXT">test</field>
                                                           </shadow>
                                                           <block type="text_join" id="wU{//STC-,^TKv,~rW1G">
                                                             <mutation items="2"></mutation>
                                                             <value name="ADD0">
                                                               <block type="text" id="l.oO)Ds5u+Q|hvr@t2br">
                                                                 <field name="TEXT">Antwortzeit: </field>
                                                               </block>
                                                             </value>
                                                             <value name="ADD1">
                                                               <block type="http_response" id="1~;L#P0yMQ.n![GZRat$">
                                                                 <field name="ATTR">response.responseTime</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="debug" id="65R*P%4ZDntHrdpaY%vI">
                                                             <field name="Severity">info</field>
                                                             <value name="TEXT">
                                                               <shadow type="text" id="tLR}z4`p(!vqnl85yERd">
                                                                 <field name="TEXT">test</field>
                                                               </shadow>
                                                               <block type="text_join" id=":/IHh3YZVby/HDYu}vn6">
                                                                 <mutation items="2"></mutation>
                                                                 <value name="ADD0">
                                                                   <block type="text" id="r|=EmI]2L|Ww`-Ek}R}4">
                                                                     <field name="TEXT">response headers: </field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="ADD1">
                                                                   <block type="http_response" id="~80D7|Xs2T66ZnBojvRb">
                                                                     <field name="ATTR">response.headers</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="debug" id=":4IF62d+X?nzq*}dD0%$">
                                                                 <field name="Severity">info</field>
                                                                 <value name="TEXT">
                                                                   <shadow type="text" id="/t~R~V7vjx6C`.#64r#7">
                                                                     <field name="TEXT">test</field>
                                                                   </shadow>
                                                                   <block type="text_join" id="t?crVa1);ldCM{RRPR2K">
                                                                     <mutation items="2"></mutation>
                                                                     <value name="ADD0">
                                                                       <block type="text" id="#JtLY!ix`OLR-3F4XeDN">
                                                                         <field name="TEXT">Fehlermeldung: </field>
                                                                       </block>
                                                                     </value>
                                                                     <value name="ADD1">
                                                                       <block type="http_response" id="C7YLZ{m}C6#$}Bcxu^2b">
                                                                         <field name="ATTR">err</field>
                                                                       </block>
                                                                     </value>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                  </xml>
                  

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jwerlsdf @XBiT last edited by jwerlsdf

                    @xbit
                    Den Fehler "error=socket hang up" habe ich auch manchmal. Und zwar dann, wenn ich mehrere Befehle hintereinander abfeuere, z.b. wenn ich dir Lautstärke schrittweise verändere.
                    Das hat meines Wissens aber nicht mi blockly zu tun oder mit dem httpget Block, sonder an sonos selbst. Ich habe diese Probleme erst seitdem ich damals die neues Software, die nur Probleme macht, installiert habe. Mit der alten Software hatte ich mit meinen blocklys nie Probleme gehabt.

                    XBiT 1 Reply Last reply Reply Quote 0
                    • XBiT
                      XBiT @jwerlsdf last edited by

                      @jwerlsdf

                      Vielen Dank für deine Info, denke mittlerweile auch es liegt nicht am Blockly, auch wenn ich diesen Fehler mit dem request Block nicht hatte (habe aber auch nie schrittweise die Lautstärke geändert).
                      Meinst du mit der neuen Software die node-sonos-http-api also die den Server bereitstellt oder den Sonos S2 Controller?

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        jwerlsdf @XBiT last edited by

                        @xbit
                        Die sonos App auf die Version 80.x. Ging auch ein Firmware Update der sonos Boxen einher. So ganz genau kann ich es aber nicht mehr sagen. Aber mit dieser neuen Version gingen bei mir alle Probleme los.

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        892
                        Online

                        31.8k
                        Users

                        80.0k
                        Topics

                        1.3m
                        Posts

                        5
                        22
                        1024
                        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