Frage Yahka <--->Logitech Harmony

  • Hallo,
    bin durch ein paar Videos auf dieses Forum aufmerksam geworden und da ich erst ein paar Tage mit ioBroker arbeite hab ich da mal eine Frage :)

    Ich habe Yahka und Harmony als Adapter installiert, ich kann per Siri jetzt sagen "TV an" und die Harmony schaltet ihre gespeicherte Aktivität "Fernsehn" und schaltet den TV + Receiver ein.
    Ich würde Siri aber auch gerne sagen schalte den TV aus, aber es gibt keine Aktivität die das macht, es gibt nur einen "harmony.0.Harmony-Hub.activities.currentActivity" mit dem Wert "PowerOff" aber ich hab keinen Plan wie ich das in Yahka einbinden soll, jemand eine Idee ?

    Gruß Kai

  • Das geht m.W. nur über ein Script, dass den Wert von „harmony.0.Harmony-Hub.activities.currentActivity” auf „0” setzt. Ist (irgendeine) Harmony-Aktion gestartet, steht der Wert auf „2”. Dieses Script wählst Du dann in YaHka aus und schon funktioniert das.

    Kann Dir momentan leider kein Beispiel-Script liefern, da ich vom Büro aus keinen Zugriff auf ioBroker zuhause habe; aber irgendwo in diesem Forum war das schonmal Thema.

    Viele Grüße

    Stefan

    --

    RASPBERRY Pi 3 B (SSD) • StretchLite + ioBroker + Harmony + Node-RED + yaHKa

    LOGITECH Harmony/-Hub • JBMEDIA LightManager Pro • AMAZON Echo Spot + 4x Echo Dot2

    ELV FS-20 Schalter + Dimmer • INTERTECHNO/COCO/TRUST (UP-) Dosen + Dimmer •

    ELGATO Eve Thermo2 + Sensoren • FIBARO MotionSensor

  • Du könntest das so machen, musst halt noch einen state erstellen.

    Bild scriptyahka.jpg.html

    Spoiler anzeigen

    <xml xmlns="http://www.w3.org/1999/xhtml">

    <block type="on_ext" id="mL6be*SUTiARA?gkfdX5" x="38" y="13">

    <mutation items="3"></mutation>

    <field name="CONDITION">ne</field>

    <field name="ACK_CONDITION"></field>

    <value name="OID0">

    <shadow type="field_oid" id="Sqb;ID``y@n%HgwTNl2?">

    <field name="oid">javascript.0.TV-Dummy</field>

    </shadow>

    </value>

    <value name="OID1">

    <shadow type="field_oid" id="]XNFvB%Ix(?F:{aTV[vz">

    <field name="oid">harmony.0.Harmony_Hub.activities.Fernsehen</field>

    </shadow>

    </value>

    <value name="OID2">

    <shadow type="field_oid" id="`4y,GiXXUK:mfN#Vx!{]">

    <field name="oid">harmony.0.Harmony_Hub.activities.currentStatus</field>

    </shadow>

    </value>

    <statement name="STATEMENT">

    <block type="controls_if" id="GrAdc7v~+_;|QEv~q%JZ">

    <mutation elseif="3"></mutation>

    <value name="IF0">

    <block type="logic_operation" id="gf7BD6//DN[F6cS476mC">

    <field name="OP">AND</field>

    <value name="A">

    <block type="logic_compare" id="kLR:{)xU~k-F#qPL/|Y|">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="cP[GOv8{y9?S6?P!OW3-">

    <field name="ATTR">val</field>

    <field name="OID">javascript.0.TV-Dummy</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="ft,u2+_{N8joMpmWEVNv">

    <field name="BOOL">TRUE</field>

    </block>

    </value>

    </block>

    </value>

    <value name="B">

    <block type="logic_compare" id="#1k5b6t/)cF1/X}=.`k{">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="wQ0(UH,o.ELbChU;I{pa">

    <field name="ATTR">val</field>

    <field name="OID">harmony.0.Harmony_Hub.activities.currentStatus</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="V#4xxp+6s;Q_MTRSdgOA">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="control" id="Dk=857Mau=eHiX.;LTAM">

    <mutation delay_input="false"></mutation>

    <field name="OID">harmony.0.Harmony_Hub.activities.Fernsehen</field>

    <field name="WITH_DELAY">FALSE</field>

    <value name="VALUE">

    <block type="math_number" id="P:PU%!P,1%|VOQ3%//IH">

    <field name="NUM">2</field>

    </block>

    </value>

    </block>

    </statement>

    <value name="IF1">

    <block type="logic_operation" id="xI9ZaoNahWI1erv?22zv">

    <field name="OP">AND</field>

    <value name="A">

    <block type="logic_compare" id="cqaN5t5Qh`8gxFW{tP3_">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="CA.vTEY^46}C1aKf[!Vd">

    <field name="ATTR">val</field>

    <field name="OID">javascript.0.TV-Dummy</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="U6fK`a=(x.bW]N|lKVF=">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    </block>

    </value>

    <value name="B">

    <block type="logic_compare" id="bR7=b`f2?XQutnBDU|un">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="9.m/X]yTV!!{tL9Lnp}9">

    <field name="ATTR">val</field>

    <field name="OID">harmony.0.Harmony_Hub.activities.currentStatus</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="4|l9lX#.S)4{@zVY^!16">

    <field name="NUM">2</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO1">

    <block type="control" id="6Nn5GUVH9DI6JMYw:9G=">

    <mutation delay_input="false"></mutation>

    <field name="OID">harmony.0.Harmony_Hub.activities.currentStatus</field>

    <field name="WITH_DELAY">FALSE</field>

    <value name="VALUE">

    <block type="math_number" id="3|Lo*@dp`dDQDFo*F:x!">

    <field name="NUM">0</field>

    </block>

    </value>

    </block>

    </statement>

    <value name="IF2">

    <block type="logic_operation" id="H6Iv(15iH)mg+YD%q3FT">

    <field name="OP">AND</field>

    <value name="A">

    <block type="logic_compare" id="mQ/w#w-5G#4^_-ilmisb">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="/VxRNAz.=[BWP:;ok:Rd">

    <field name="ATTR">val</field>

    <field name="OID">javascript.0.TV-Dummy</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="G107D+lluqKnH{*0Q|D8">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    </block>

    </value>

    <value name="B">

    <block type="logic_compare" id="^@Gt@XgNsk~a0*XFr1zv">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="hv.fPR):LAPv~;=N(|A~">

    <field name="ATTR">val</field>

    <field name="OID">harmony.0.Harmony_Hub.activities.currentStatus</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="t+@,H?}{t3xB:Iu]#=NL">

    <field name="NUM">1</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO2">

    <block type="control" id="o=w8NpBl7W(;-aVEMiF6">

    <mutation delay_input="false"></mutation>

    <field name="OID">javascript.0.TV-Dummy</field>

    <field name="WITH_DELAY">FALSE</field>

    <value name="VALUE">

    <block type="logic_boolean" id="yd3GqP2-t3%Ayu-4fiIN">

    <field name="BOOL">TRUE</field>

    </block>

    </value>

    </block>

    </statement>

    <value name="IF3">

    <block type="logic_operation" id="HiiIa?_-2|^Hiaea{eSN">

    <field name="OP">AND</field>

    <value name="A">

    <block type="logic_compare" id="~V?!?/+=F~_a*Wh?;3hB">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="i9mxgMB@C?C=!EW+wfkm">

    <field name="ATTR">val</field>

    <field name="OID">javascript.0.TV-Dummy</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="7wU2iyh0MQa@;|jMlr30">

    <field name="BOOL">TRUE</field>

    </block>

    </value>

    </block>

    </value>

    <value name="B">

    <block type="logic_compare" id="+(.T.whD7_e/^1?:8,]i">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="S-xXN2A#c]/Y4a;UV^]o">

    <field name="ATTR">val</field>

    <field name="OID">harmony.0.Harmony_Hub.activities.currentStatus</field>

    </block>

    </value>

    <value name="B">

    <block type="math_number" id="p|VRu+#KeVT.ANv?An68">

    <field name="NUM">3</field>

    </block>

    </value>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO3">

    <block type="control" id="t8/uTHG.f-X-DVygK|Iv">

    <mutation delay_input="false"></mutation>

    <field name="OID">javascript.0.TV-Dummy</field>

    <field name="WITH_DELAY">FALSE</field>

    <value name="VALUE">

    <block type="logic_boolean" id="l?bwOtA2#y61in8HRXtP">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    </block>

    </statement>

    </block>

    </statement>

    <next>

    <block type="comment" id="z_MGDS#ExBO`|x8`[mWy">

    <field name="COMMENT">Prüfe ob Harmony verbunden ist ggf. Neustart</field>

    <next>

    <block type="on" id="PLB[C[F=T-_Ve[xwz9[?">

    <field name="OID">harmony.0.Harmony_Hub.hubConnected</field>

    <field name="CONDITION">ne</field>

    <field name="ACK_CONDITION"></field>

    <statement name="STATEMENT">

    <block type="controls_if" id="SDWKG.R7])2o|}u.nXq:">

    <value name="IF0">

    <block type="logic_compare" id="kHmQK2E{X|MB6{b#7KYx">

    <field name="OP">EQ</field>

    <value name="A">

    <block type="get_value" id="eTB(7uAM#8bI_1.!bHY2">

    <field name="ATTR">val</field>

    <field name="OID">harmony.0.Harmony_Hub.hubConnected</field>

    </block>

    </value>

    <value name="B">

    <block type="logic_boolean" id="{qXpXO1VJKiC~y27`1i9">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    </block>

    </value>

    <statement name="DO0">

    <block type="timeouts_settimeout" id=":nURpooyI,gDe5573T^4">

    <field name="NAME">timeout</field>

    <field name="DELAY">30</field>

    <field name="UNIT">sec</field>

    <statement name="STATEMENT">

    <block type="control" id="u8km#YQVkJc`Md|N2=C=">

    <mutation delay_input="false"></mutation>

    <field name="OID">javascript.0.Harmony.Adapter.Schalter</field>

    <field name="WITH_DELAY">FALSE</field>

    <value name="VALUE">

    <block type="logic_boolean" id="p@]x/,HN*%|i,Cv7=)`d">

    <field name="BOOL">FALSE</field>

    </block>

    </value>

    <next>

    <block type="control" id="qwoW*EdJOv5%eXTqS2g3">

    <mutation delay_input="true"></mutation>

    <field name="OID">javascript.0.Harmony.Adapter.Schalter</field>

    <field name="WITH_DELAY">TRUE</field>

    <field name="DELAY_MS">3000</field>

    <field name="UNIT">ms</field>

    <field name="CLEAR_RUNNING">FALSE</field>

    <value name="VALUE">

    <block type="logic_boolean" id="o%@0WK-eHfYkuyhBs7=?">

    <field name="BOOL">TRUE</field>

    </block>

    </value>

    </block>

    </next>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </statement>

    </block>

    </next>

    </block>

    </next>

    </block>

    </xml>

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!