Hi Leute,
wie ich es hier angekündigt habe, findet ihr unten mein Blockly Skript um den Saugroboter mit Google Home zu steuern.
Das ganze funtioniert mit IFTTT als Vermittler (wie man IFTTT hierfür einstellt, ist in der Videoverlinkung beim oben verlinkten Beitrag beschrieben).
Spoiler anzeigen
schimmer-media.de/index.php?attachment/631/
Code
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on_ext" id="HZ`Mjwz:DIVPas8)X2pn" x="-450" y="33">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="9qBw/ki-_~4Wh[by?PDM">
<field name="oid">cloud.0.services.ifttt</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="p}W8V~hs#zZx*YZ59?L%">
<mutation elseif="5"></mutation>
<value name="IF0">
<block type="logic_compare" id="VZ_!RgOi[rEE2U~0|O4X">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="0^*Vc_C@~;h(;SaLWU0_">
<field name="ATTR">val</field>
<field name="OID">cloud.0.services.ifttt</field>
</block>
</value>
<value name="B">
<block type="text" id="EKGL~GpS%s}4mbR*R,n5">
<field name="TEXT">fritz_clean</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="99CMl2h-%A6zGFrt69Oi">
<mutation delay_input="false"></mutation>
<field name="OID">mihome-vacuum.0.control.start</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="Cx^B`tUCCBEogz~D_%Os">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="D5q*b4r%_04S9{ZrBw[o">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="g#.!;)eUWx;i);Du(s1W">
<field name="ATTR">val</field>
<field name="OID">cloud.0.services.ifttt</field>
</block>
</value>
<value name="B">
<block type="text" id="C9TVyP2Lr-xpOy=]U}%z">
<field name="TEXT">fritz_pause</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="8L7UXFg)~MzJ%S4,8h,_">
<mutation delay_input="false"></mutation>
<field name="OID">mihome-vacuum.0.control.pause</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="xED%03O-|{5yQ2WQ;2+/">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF2">
<block type="logic_compare" id="-J)o=m*%)iBHYy?_Xp`b">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="EE!QDNI%.pDh`A@#oTJV">
<field name="ATTR">val</field>
<field name="OID">cloud.0.services.ifttt</field>
</block>
</value>
<value name="B">
<block type="text" id="FH@VrF,H?7P]Cw9D=KOH">
<field name="TEXT">fritz_home</field>
</block>
</value>
</block>
</value>
<statement name="DO2">
<block type="control" id="ubSxhSaw=5%eL35A+3S0">
<mutation delay_input="false"></mutation>
<field name="OID">mihome-vacuum.0.control.home</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="Z44@)}^3UD.Z_QSUf:FA">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF3">
<block type="logic_compare" id="+FvDX/C49P^0[`Ho1lU?">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="1+GVOr6vj`K#7.Xh?CD*">
<field name="ATTR">val</field>
<field name="OID">cloud.0.services.ifttt</field>
</block>
</value>
<value name="B">
<block type="text" id="C]a)cmpr@lS}E[Xs^xbj">
<field name="TEXT">fritz_piep</field>
</block>
</value>
</block>
</value>
<statement name="DO3">
<block type="control" id="Ym-|(D8eaSW}^tXBE:pI">
<mutation delay_input="false"></mutation>
<field name="OID">mihome-vacuum.0.control.find</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="~QUii](r@1zMf_0FFh/z">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
<value name="IF4">
<block type="logic_compare" id="R,Q--Q-jKs5(hS?rg9CK">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="OflG7NGqNSqIS%fs1xVQ">
<field name="ATTR">val</field>
<field name="OID">cloud.0.services.ifttt</field>
</block>
</value>
<value name="B">
<block type="text" id="bv1Z0Tg|L3~=tM9-Wko]">
<field name="TEXT">fritz_max</field>
</block>
</value>
</block>
</value>
<statement name="DO4">
<block type="control" id="O*tE4=p/S6tCWq_9E}88">
<mutation delay_input="false"></mutation>
<field name="OID">mihome-vacuum.0.control.fan_power</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="lqK)vSK:t-u026QIxw1R">
<field name="TEXT">MAXIMUM</field>
</block>
</value>
</block>
</statement>
<value name="IF5">
<block type="logic_compare" id="!t%~:wd-=:ezQ_1eTnV5">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="N^!uxl@%4k+]I-VR[ds]">
<field name="ATTR">val</field>
<field name="OID">cloud.0.services.ifttt</field>
</block>
</value>
<value name="B">
<block type="text" id="T[kLNdDXG~Y?*1DV%OBC">
<field name="TEXT">fritz_min</field>
</block>
</value>
</block>
</value>
<statement name="DO5">
<block type="control" id="b-HI;`!KHO6vBrh9{t{4">
<mutation delay_input="false"></mutation>
<field name="OID">mihome-vacuum.0.control.fan_power</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="37wqUck,%l[!i3sfelNv">
<field name="TEXT">QUIET</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Alles anzeigen
Die Triggernamen müsst/könnt ihr natürlich euren Vorstellungen anpassen
Vielleicht hilft dieses Skript ja dem Einen oder Anderen - Ihr könnt den Code direkt in Blockly impertieren.
Gruß Markus