NEWS
Benötige Blockly hilfe
-
Hallo zusammen,
hab vor kurzem mit blockly begonnnen und etwas schwierigkeiten mit der umsetzung.
Ich möchte gerne folgendes realisieren:
Momentan hab ich in Alexa eine routine drin die "Gute Morgen" heißt….dabei schaltet Alexa gewisse geräte ein.
Nun würde ich gerne ein blocky schreiben das nach dieser ansage alexa mir die akuelle raumteperatur von meinem Homematic Wandthermostat ansagt.
Momentan kann ich das manuell über H-Connect machen indem ich zu Alexa sage: Alexa frage home connect wie warm es im Wohnzimmer ist.
Ist sowas überhaupt möglich?
Ich hab mal so begonnen:
passt das? wie mache weiter?
hab das Internet schon durchsucht, aber leider dazu noch nichts gefunden.
Bin dankbar über jede hilfe!
-
Hallo Timur,
dazu bräuchtest du noch den Alexa2 Adapter. Über den kannst du Sprachausgaben an einen Echo Lautsprecher schicken.
Ansonsten könnte dein Blockly dann z.B. so aussehen:
Und hier noch der Block export:
! ````
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="comment" id="nh=7^4;[(@0e@c=@g5@z" x="-363" y="-462"><field name="COMMENT">Guten Morgen Objekt</field></block>
<block type="on_ext" id="g/9v3+5ns~Uj..JX]0" x="-563" y="-437"><mutation items="1"></mutation>
<field name="CONDITION">ne</field><value name="OID0"><shadow type="field_oid" id="wP~2V{/+p:F#3un~e`Yl"><field name="oid">default</field></shadow></value> <statement name="STATEMENT"><block type="controls_if" id="nMIPD=v+5{0bazXth|]g"><mutation elseif="1"></mutation> <value name="IF0"><block type="logic_compare" id="lvrJ=|!)LRdy}/pGk`l="><field name="OP">EQ</field> <value name="A"><block type="get_value" id="Tt5Qr~:^_LBu:H1/0S(y"><field name="ATTR">val</field> <field name="OID">ID auswählen</field></block></value> <value name="B"><block type="logic_boolean" id="t7Qgh(br?VlZmr}Lbga["><field name="BOOL">TRUE</field></block></value></block></value> <statement name="DO0"><block type="comment" id="0VbqLr:/B]D[oZbjvUN~"><field name="COMMENT">Geräte die eingeschaltet werden sollen</field> <next><block type="control" id="dQKT:.D?f_5TN/SU@Dat"><mutation delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="9{!hbfAhIK6+Zx||[1`~"><field name="BOOL">TRUE</field></block></value> <next><block type="control" id="*w-S:+5M~`_2b_WG_2jb"><mutation delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="UN}4wm;D+6(#5Cy*G^kw"><field name="BOOL">TRUE</field></block></value> <next><block type="control" id="N+u6_=;H#c@t^hl6}zT9"><mutation delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="V/ZAF%-Aenx9dyJ#%fUI"><field name="BOOL">TRUE</field></block></value> <next><block type="comment" id="o?x)UM3uD5LNL4bx3(K["><field name="COMMENT">Sprachausgabe über alexa2 Adapter</field> <next><block type="control" id="39-07s8Hs5.GhiGh,*NS"><mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090LF1072151FGN.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="text_join" id="IVVzf,LsV)ES]2i5Uir3"><mutation items="3"></mutation> <value name="ADD0"><block type="text" id="4xh(73]mRe_5xx{:_uM%"><field name="TEXT">Im Schlafzimmer sind es aktuell</field></block></value> <value name="ADD1"><block type="get_value" id="vv0a6*^:]}Nn!W=8{vF`"><field name="ATTR">val</field> <field name="OID">ID auswählen</field></block></value> <value name="ADD2"><block type="text" id="Mq!VXo5WxkAd+2v]~8:;"><field name="TEXT"> Grad</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></statement> <value name="IF1"><block type="logic_compare" id="xwFBw~WA[j-g@kri{ll-"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="I(^UZLC|#z3jfBH6fAt*"><field name="ATTR">val</field> <field name="OID">ID auswählen</field></block></value> <value name="B"><block type="logic_boolean" id="WytMqe,Y].n{tRc!adw^"><field name="BOOL">FALSE</field></block></value></block></value> <statement name="DO1"><block type="comment" id="imUg=MDv.otf^^C5Pf}M"><field name="COMMENT">Geräte die wieder ausgeschaltet werden sollen</field> <next><block type="control" id="l99TNBf3FswOj{w]{mL("><mutation delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="jKve::0msktsz*B2Z{uQ"><field name="BOOL">FALSE</field></block></value> <next><block type="control" id="bj#S*]Vn}Q5#}Hhjq{L9"><mutation delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="P_k-@,bmA*fC:nsYBWje"><field name="BOOL">FALSE</field></block></value> <next><block type="control" id="K!)SCUf@pj??_n=#OMOj"><mutation delay_input="false"></mutation> <field name="OID">Object ID</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="P*n]L:blbMnL.Osh~Z^S"><field name="BOOL">FALSE</field></block></value></block></next></block></next></block></next></block></statement></block></statement></block>
<block type="comment" id="L2ildRM[p1N75_K5+JnW" x="-287" y="-387"><field name="COMMENT">Guten Morgen Objekt</field></block>
<block type="comment" id="O4H0V5!k?0n1[bYd8YAO" x="87" y="-137"><field name="COMMENT">Ist Temperatur Objekt deines Thermostats</field></block>
<block type="comment" id="Jk[xks7^num/~^,ew.b^" x="-262" y="-87"><field name="COMMENT">Guten Morgen Objekt</field></block></xml> -
Und wie immer, wenn der Hinweis bei einer "falls" Bedingung schon heißt "führt eine Aktion aus, wenn der Zustand wahr ist", dann ist es vollkommen unnötig genau das nochmal auf "= wahr" zu prüfen. Denn genau das ist doch die Funktion des Block und steht auch so da