Hi zusammen, ich versuche zur Zeit folgendes zu realisieren:
Ich habe mehrere Echos zuhause stehen und möchte, dass wenn ich eine bestimmte anspreche, diese mir auch antwortet.
Mein erstes Script heißt "wer ist Zuhause" und funktioniert soweit wenn ich den Output auf eine bestimmte Alexa stelle.
Funzt wie folgt: Ich sage"Alexa wer ist Zuhause an" und sie spuckt mir die Namen von den Handys aus, welche im Netzwerk sind.
Nun habe ich ein weiteres Script, welches mir einen Pfad generiert, mit der Alexa, welche als letztes angesprochen wurde.
Für die Interessierten:
Dies funktionert auch soweit.
Ich habe einen Datenpunkt welcher den kompletten Pfad bis zur .speak Datei darstellt.
Nur jetzt der Knackpunkt. Wie sage ich meinem "Wer ist Zuhause" Script, dass es den Pfad von dem Datenpunkt "alexaAntwort" zurückverfolgen soll und nicht versuchen soll den Inhalt von diesem Datenpunkt zu bearbeiten?
Für die stark interessierten:
Script "Wer ist Zuhause"
Spoiler
<xml xmlns="http://www.w3.org/1999/xhtml">
<variables>
<variable type="" id="cD[lHVlE29~KhP}yKt)[">Andrej</variable>
<variable type="" id="zGKIrft(Tex5qUR?f1u{">Lena</variable>
<variable type="" id="J)05WEz*3veH+i^Q`)G4">Alex</variable>
<variable type="" id="r=SWra33_ru4NxtNI(vb">Vladi</variable>
<variable type="" id=".l22V4K0L.E^?@$Fx:26">Nastia</variable>
</variables>
<block type="schedule" id="/g?NDm$pxG:8]2FWR!D=" x="-112" y="-388">
<field name="SCHEDULE">* * * * *</field>
<statement name="STATEMENT">
<block type="controls_if" id="=+ytm7PerXVP8/@]2r~c">
<mutation else="1"></mutation>
<value name="IF0">
<block type="get_value" id="g=n!6=D`S[FHme:yOl~!">
<field name="ATTR">val</field>
<field name="OID">tr-064.0.devices.iPhonevonAndrej.active</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="g[F5Pc-?kss+%~MxOqP(">
<field name="VAR" id="cD[lHVlE29~KhP}yKt)[" variabletype="">Andrej</field>
<value name="VALUE">
<block type="text" id="`YjSV6a1NP@5nU(uqzZ*">
<field name="TEXT">Andrej</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="^Bhuh^.g;^InIpUQ2pG]">
<field name="VAR" id="cD[lHVlE29~KhP}yKt)[" variabletype="">Andrej</field>
<value name="VALUE">
<block type="text" id="|5{.ylqm)^9RHvMctsoh">
<field name="TEXT">" "</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="3djWRkIjRb?of23)yd3@">
<mutation else="1"></mutation>
<value name="IF0">
<block type="get_value" id="/[x]jw1v:{{$XU:Y~`W1">
<field name="ATTR">val</field>
<field name="OID">tr-064.0.devices.HUAWEI-P30-lite-aa2cf40c9.active</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="=]!xo/~Aj};e]aQZjCn.">
<field name="VAR" id="zGKIrft(Tex5qUR?f1u{" variabletype="">Lena</field>
<value name="VALUE">
<block type="text" id="RF-[Vi$$)h=M).QZniCT">
<field name="TEXT">Lena</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="v(2IuqNJE^;cQZyjspxI">
<field name="VAR" id="zGKIrft(Tex5qUR?f1u{" variabletype="">Lena</field>
<value name="VALUE">
<block type="text" id="JFD3jKEZtOGoQN?du(yV">
<field name="TEXT">" "</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="LZ+}jK9p@=0iYM!rv}NG">
<mutation else="1"></mutation>
<value name="IF0">
<block type="get_value" id=":}|72NWY;xC]-y-x0]yI">
<field name="ATTR">val</field>
<field name="OID">tr-064.0.devices.HUAWEI-P30-lite-4e842f70a.active</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="!h?;kh2`mON^%fQyr6/c">
<field name="VAR" id="J)05WEz*3veH+i^Q`)G4" variabletype="">Alex</field>
<value name="VALUE">
<block type="text" id="!-q6FTK{yr;^8;,3rVFc">
<field name="TEXT">Alex</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="ESbeJ,h8tiquLryAP5`/">
<field name="VAR" id="J)05WEz*3veH+i^Q`)G4" variabletype="">Alex</field>
<value name="VALUE">
<block type="text" id="ZY7YfaooX-5bXu%m-3GO">
<field name="TEXT">" "</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="[N)vTZ}Yhig+Gg#wFXav">
<mutation else="1"></mutation>
<value name="IF0">
<block type="get_value" id="8zpj?Z;h06R$`[~6U5I$">
<field name="ATTR">val</field>
<field name="OID">tr-064.0.devices.HUAWEI-P20-Pro-Vlad.active</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="]D#pQ^*znBK.USqzxo-M">
<field name="VAR" id="r=SWra33_ru4NxtNI(vb" variabletype="">Vladi</field>
<value name="VALUE">
<block type="text" id="*dDQzm%;(~FMeH+BDC/M">
<field name="TEXT">Vladi</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="^fU[INL}#bK1{pIA9_?h">
<field name="VAR" id="r=SWra33_ru4NxtNI(vb" variabletype="">Vladi</field>
<value name="VALUE">
<block type="text" id="l=-h{My6{=G+bd8?^u8y">
<field name="TEXT">" "</field>
</block>
</value>
</block>
</statement>
<next>
<block type="controls_if" id="J(H-5K:UdfjfHEGy5,Nj">
<mutation else="1"></mutation>
<value name="IF0">
<block type="get_value" id="YH.$gFMp.(XUim?}CcnR">
<field name="ATTR">val</field>
<field name="OID">tr-064.0.devices.Anastasia-P8.active</field>
</block>
</value>
<statement name="DO0">
<block type="variables_set" id="Rj[)4G~Zge|l_;EBNWjD">
<field name="VAR" id=".l22V4K0L.E^?@$Fx:26" variabletype="">Nastia</field>
<value name="VALUE">
<block type="text" id="_VIip%[VyP|Ed:^OUb|?">
<field name="TEXT">Nastia</field>
</block>
</value>
</block>
</statement>
<statement name="ELSE">
<block type="variables_set" id="/%=RofTwF%8uAy~(Up,x">
<field name="VAR" id=".l22V4K0L.E^?@$Fx:26" variabletype="">Nastia</field>
<value name="VALUE">
<block type="text" id="zr,eGOL4i|^AEWIF-?Kf">
<field name="TEXT">" "</field>
</block>
</value>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
<block type="on_ext" id="sPT^FD[-V-*o8:s}yNDc" x="263" y="-312">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="@zc`VfNe)}AkUSQ9|~OX">
<field name="oid">AlexaFrage.0.Wer_ist_zuHause</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="+`_wPp9ylSco+c9~|od_">
<value name="IF0">
<block type="logic_compare" id="T2L?Q15|J?EXUtO4%bAS">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="mt;Gc:b)sF~S-rHqQKXK">
<field name="ATTR">val</field>
<field name="OID">AlexaFrage.0.Wer_ist_zuHause</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="ags!Zl|!-dMV;2iQd7OB">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control_ex" id="n(])WJW%h{Y6d@ZM^6[~">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="a7tudg)FvFx!7C],XZ@Y">
<field name="oid">alexa2.0.Echo-Devices.G090L91174170WQV.Commands.speak</field>
</shadow>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="_#]oEG:*4?%j1|XZsLDo">
<field name="BOOL">TRUE</field>
</shadow>
<block type="lists_split" id="XeK(#Ep:O2NGgdi2PVcM">
<mutation mode="JOIN"></mutation>
<field name="MODE">JOIN</field>
<value name="INPUT">
<block type="lists_create_with" id="XYjV,wl+.U+0u~UR_Tm:">
<mutation items="5"></mutation>
<value name="ADD0">
<block type="variables_get" id="C]norc)EjVv$g@?B2N3n">
<field name="VAR" id="cD[lHVlE29~KhP}yKt)[" variabletype="">Andrej</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get" id="fx3r8jem7-h=IQ`[F0Z/">
<field name="VAR" id="zGKIrft(Tex5qUR?f1u{" variabletype="">Lena</field>
</block>
</value>
<value name="ADD2">
<block type="variables_get" id="6VaCW+8==q#}cjx_X4|M">
<field name="VAR" id="J)05WEz*3veH+i^Q`)G4" variabletype="">Alex</field>
</block>
</value>
<value name="ADD3">
<block type="variables_get" id="Eji@eaYm+^dZvp9/=bd}">
<field name="VAR" id="r=SWra33_ru4NxtNI(vb" variabletype="">Vladi</field>
</block>
</value>
<value name="ADD4">
<block type="variables_get" id="-#KUo.ofp/=;kQ*=FI^)">
<field name="VAR" id=".l22V4K0L.E^?@$Fx:26" variabletype="">Nastia</field>
</block>
</value>
</block>
</value>
<value name="DELIM">
<shadow type="text" id="vMH+K5CC{[3x*iA7hCVt">
<field name="TEXT">,,,,,,,,,,,,,,,,,</field>
</shadow>
</value>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="ul-.SdKh=U;y1a.xpU*t">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</statement>
<next>
<block type="control" id="yOAe3!Ddrgjj?9h=H|IA">
<mutation delay_input="true"></mutation>
<field name="OID">AlexaFrage.0.Wer_ist_zuHause</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">1000</field>
<field name="UNIT">ms</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="A8wUv.y#]1[l|J-k1OTF">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</next>
</block>
</statement>
</block>
</xml>
Script "Alexa antwort"
Spoiler
<xml xmlns="http://www.w3.org/1999/xhtml">
<variables>
<variable type="" id="SFXC$`0ng*{4~QEoleV3">aktiveAlexa</variable>
</variables>
<block type="on" id=";kQ,R3.9ra/RP*m5ennd" x="-587" y="-137">
<field name="OID">alexa2.0.History.serialNumber</field>
<field name="CONDITION">any</field>
<field name="ACK_CONDITION"></field>
<statement name="STATEMENT">
<block type="variables_set" id="(]W,[bxN%deuU6t8JXJ}">
<field name="VAR" id="SFXC$`0ng*{4~QEoleV3" variabletype="">aktiveAlexa</field>
<value name="VALUE">
<block type="text_join" id="wqSMx4-%E21-3CgIm}k@">
<mutation items="3"></mutation>
<value name="ADD0">
<block type="text" id="!p{,}x3CndnfMa0qnWn3">
<field name="TEXT">alexa2.0.Echo-Devices.</field>
</block>
</value>
<value name="ADD1">
<block type="get_value" id="mQ+)oqwT,.3V*QPhAFj(">
<field name="ATTR">val</field>
<field name="OID">alexa2.0.History.serialNumber</field>
</block>
</value>
<value name="ADD2">
<block type="text" id="|tjrRS:gwL4$3UF?*|Z|">
<field name="TEXT">.Commands.speak</field>
</block>
</value>
</block>
</value>
<next>
<block type="control_ex" id="/Ia2/VuH]r7~p:}grY5T">
<field name="TYPE">false</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="OID">
<shadow type="field_oid" id="{%HgjFT?X$XEz23qs3Ot">
<field name="oid">javascript.0.alexaAntwort</field>
</shadow>
</value>
<value name="VALUE">
<shadow type="logic_boolean" id="veYg?KTXk01fssw6R38.">
<field name="BOOL">TRUE</field>
</shadow>
<block type="variables_get" id="^,(*U8MIVbr~zc#n$BdD">
<field name="VAR" id="SFXC$`0ng*{4~QEoleV3" variabletype="">aktiveAlexa</field>
</block>
</value>
<value name="DELAY_MS">
<shadow type="math_number" id="^/^zf5K?DNns!YJ7IRo#">
<field name="NUM">0</field>
</shadow>
</value>
</block>
</next>
</block>
</statement>
</block>
</xml>
Ich hoffe ich hab nicht extrem viel falsch gemacht mit meinem ersten Post hier und dass mir jemand helfen kann.