NEWS
Mein Start mit Blockly/Skripten - Hilfe bei Erstellung
-
@dslraser
habe ich gerade mal getestet, als ich fĂŒr die Lampen die Objekt ID Entertainment Bereich TV genommen habe + den Astro Baustein entfernt habe hatte es nicht geklappt. Jetzt habe ich mal beide Hue Play Bars einzeln rein genommen (ohne Astro) und die Lichter sind mit angegangen.Jetzt muss ich das ganze nur nochmal testen wenn es dunkel ist und der Astro Baustein dabei ist....
-
Hallo zusammen,
@dslraserAlso es klappt noch nicht so ganz

Der Teil, dass bei der Aktion "Smart" die Lichter angehen klappt soweit
aber der Part mit der Uhrzeit zwischen Sonnenuntergang und Sonnenaufgang klappt nicht, den muss man irgendwie noch richtig einstellen, fragt sich nur wie???
Zur Zeit steht es auf:

Edit:
Also rein von der Logik her wĂŒrde ich jetzt sagen es muss auf:
aktuelle Zeit ist zwischen aktuelle Zeit von Sonnenuntergang und aktuelle Zeit von Sonnenaufgang stehen... aber
@Jan1 meinte ja die Reihenfolge darf nicht Sonnenuntergang und Sonnenaufgang sein weil die Spanne nur innerhalb von einem Tag sein darf...
@Kuddel meinte ja dass in dem Astro Baustein sowieso ein Bug zu sein scheint.... -
Hallo zusammen,
@dslraserAlso es klappt noch nicht so ganz

Der Teil, dass bei der Aktion "Smart" die Lichter angehen klappt soweit
aber der Part mit der Uhrzeit zwischen Sonnenuntergang und Sonnenaufgang klappt nicht, den muss man irgendwie noch richtig einstellen, fragt sich nur wie???
Zur Zeit steht es auf:

Edit:
Also rein von der Logik her wĂŒrde ich jetzt sagen es muss auf:
aktuelle Zeit ist zwischen aktuelle Zeit von Sonnenuntergang und aktuelle Zeit von Sonnenaufgang stehen... aber
@Jan1 meinte ja die Reihenfolge darf nicht Sonnenuntergang und Sonnenaufgang sein weil die Spanne nur innerhalb von einem Tag sein darf...
@Kuddel meinte ja dass in dem Astro Baustein sowieso ein Bug zu sein scheint....@smartmood
ich kann Dir da nicht helfen, ich verwende kein Astro. Sonst nimm doch Testweise erstmal Uhrzeiten.Oder, was geben denn Debug Bausteine von Astro aus ? Bau die mal ein.
-
Schau mal in meinem Beitrag Nr. 31 hier, dort habe ich Screenshots eingefĂŒgt wie ich die Debug Bausteine eingefĂŒgt hatte... und in meinem ioBroker Log erscheint keine der entsprechenden Meldungen.
Hatte ich die Bausteine ĂŒberhaupt richtig gesetzt?
Mittlerweile habe ich die Debug Bausteine wieder raus genommen aber werde sie zum testen wieder einfĂŒgen... -
Schau mal in meinem Beitrag Nr. 31 hier, dort habe ich Screenshots eingefĂŒgt wie ich die Debug Bausteine eingefĂŒgt hatte... und in meinem ioBroker Log erscheint keine der entsprechenden Meldungen.
Hatte ich die Bausteine ĂŒberhaupt richtig gesetzt?
Mittlerweile habe ich die Debug Bausteine wieder raus genommen aber werde sie zum testen wieder einfĂŒgen...@smartmood
ich weiĂ nicht ob es was bringt, aber nimm mal den Astro Teil und pack den in einen debug.
So ganz ohne den Test, deaktiviere den Rest mal und aktiviere bzw. aktualisiere mal das Blockly. Den Debug Baustein stelle mal auf warn, dann kannst Du es besser sehen. -
-
ah so soll das aussehen cool Danke dir, dann weiĂ ich wenigstens wie ich das fĂŒr die nĂ€chsten Male einzustellen habe ...
denn es scheint nun aber zu klappen.Ich habe die Astrofunktion nun nun auf NICHT zwischen - Sonnenaufgang - Sonnenuntergang - gestellt.
Die Lichter sind jetzt nicht mit angegangen, ich werde das Heute Abend und Morgen nochmal ein wenig testen und gebe euch dann bescheid ob es jetzt wirklich klappt :D -
Soooo Leute jetzt klappt das Skript endlich :D
Meine nÀchsten 2 Vorhaben konnte ich sogar selber umsetzten und sie funktionieren auch...
- Ein Skript welches die Hue Play Bars ausschaltet wenn die Activity auf Power Off wechselt.
- Ein Skript beidem Alexa einen von mir ausgewÀhlen Text spricht, wenn Fenster X 5 Minuten lang geöffnet ist.
FĂŒr die Umsetzung meiner nĂ€chsten Skripte hĂ€tte ich folfende Frage:
WÀre folgendes möglich?:
- Ich sage z.B. "Alexa, gute Nacht"
- dann soll geprĂŒft werden ob eines der TV GerĂ€te an ist oder eine Harmony Aktion an ist, wenn ja soll diese aus gehen - gleiches mit den Hue Play Bars
- das Licht im Schlafzimmer soll an gehen und automatisch nach 5 Minuten aus gehen
-
Soooo Leute jetzt klappt das Skript endlich :D
Meine nÀchsten 2 Vorhaben konnte ich sogar selber umsetzten und sie funktionieren auch...
- Ein Skript welches die Hue Play Bars ausschaltet wenn die Activity auf Power Off wechselt.
- Ein Skript beidem Alexa einen von mir ausgewÀhlen Text spricht, wenn Fenster X 5 Minuten lang geöffnet ist.
FĂŒr die Umsetzung meiner nĂ€chsten Skripte hĂ€tte ich folfende Frage:
WÀre folgendes möglich?:
- Ich sage z.B. "Alexa, gute Nacht"
- dann soll geprĂŒft werden ob eines der TV GerĂ€te an ist oder eine Harmony Aktion an ist, wenn ja soll diese aus gehen - gleiches mit den Hue Play Bars
- das Licht im Schlafzimmer soll an gehen und automatisch nach 5 Minuten aus gehen
@smartmood
klar geht das đ -
@dslraser
Das ist doch schonmal schön, dass es geht :DWie mĂŒsste ich denn in Blockly umsetzen, dass ein Harmony GerĂ€t bzw. Aktion und Lampen geprĂŒft werden ob diese an sind?
siehe unten...
-
@dslraser
Das ist doch schonmal schön, dass es geht :DWie mĂŒsste ich denn in Blockly umsetzen, dass ein Harmony GerĂ€t bzw. Aktion und Lampen geprĂŒft werden ob diese an sind?
Du legst Dir einen eigenen Datunpunkt an. Mit Deiner Gute Nacht Routine kannst Du dann Dein Blockly ĂŒber diesen Datenpunkt anschupsen.

<xml xmlns="http://www.w3.org/1999/xhtml"> <block type="procedures_defcustomnoreturn" id="(O)c8X-C[MCtqO5vS*^e" x="-463" y="63"> <mutation statements="false"></mutation> <field name="NAME">datenpunkt anlegen</field> <field name="SCRIPT">Ly9EYXRlbnB1bmt0ICBlcnN0ZWxsZW4KY3JlYXRlU3RhdGUoIkVpZ2VuZV9EYXRlbnB1bmt0ZS5HdXRlX05hY2h0Lkd1dGVfTmFjaHQiLCB7CiAgICBuYW1lOiAnR3V0ZSBOYWNodCcsIAogICAgcm9sZTogJ2J1dHRvbicsCiAgICByZWFkOiAgZmFsc2UsIAogICAgd3JpdGU6IHRydWUsCiAgICAic21hcnROYW1lIjogewogICAgImRlIjogIkd1dGUgTmFjaHQgRGF0ZW5wdW5rdCIsCiAgICAic21hcnRUeXBlIjogIlNXSVRDSCIKfQp9KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> </block> <block type="procedures_callcustomnoreturn" id="`sx3r1UFlV;$o1:Eu$dG" x="-463" y="137"> <mutation name="datenpunkt anlegen"></mutation> <next> <block type="on_ext" id="]]A^|D#,$16@V,C[~OJs"> <mutation items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="=H0]V3r[XSst;zM^]=xZ"> <field name="oid">javascript.0.Eigene_Datenpunkte.Gute_Nacht.Gute_Nacht</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="kfK8usI}_OV4khC@{tnK"> <value name="IF0"> <block type="logic_operation" id=";s/[$QWy.P84rt4Uvfr-" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="I5ew_,Qeo1Y7?:*,g1zv"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="OLctaaO~^wQA$IN6.SHE"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.currentStatus</field> </block> </value> <value name="B"> <block type="math_number" id="XE8W=:=5KJcjCJ#:}HWz"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="f88jdjiYTtnxprig3xx@"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="!pm/[2r|Y2im_~|3k;7("> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{qcZ!`0Vg_GCq6kW2m]i"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="comment" id="O2v/|Hg!fYEPow*-~2Iq"> <field name="COMMENT">mach dies oder das...</field> </block> </statement> </block> </statement> </block> </next> </block> </xml> -
@dslraser
Das ist doch schonmal schön, dass es geht :DWie mĂŒsste ich denn in Blockly umsetzen, dass ein Harmony GerĂ€t bzw. Aktion und Lampen geprĂŒft werden ob diese an sind?
@smartmood
hier mal drei activities die geprĂŒft werden. (Falls im Wohnzimmer dies und das an, dann mach aus und falls im Schlafzimmer aus, dann mach im Schlafzimmer an) So in der Art...
<xml xmlns="http://www.w3.org/1999/xhtml"> <block type="procedures_defcustomnoreturn" id="(O)c8X-C[MCtqO5vS*^e" x="-463" y="88"> <mutation statements="false"></mutation> <field name="NAME">datenpunkt anlegen</field> <field name="SCRIPT">Ly9EYXRlbnB1bmt0ICBlcnN0ZWxsZW4KY3JlYXRlU3RhdGUoIkVpZ2VuZV9EYXRlbnB1bmt0ZS5HdXRlX05hY2h0Lkd1dGVfTmFjaHQiLCB7CiAgICBuYW1lOiAnR3V0ZSBOYWNodCcsIAogICAgcm9sZTogJ2J1dHRvbicsCiAgICByZWFkOiAgZmFsc2UsIAogICAgd3JpdGU6IHRydWUsCiAgICAic21hcnROYW1lIjogewogICAgImRlIjogIkd1dGUgTmFjaHQgRGF0ZW5wdW5rdCIsCiAgICAic21hcnRUeXBlIjogIlNXSVRDSCIKfQp9KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> </block> <block type="procedures_callcustomnoreturn" id="`sx3r1UFlV;$o1:Eu$dG" x="-463" y="137"> <mutation name="datenpunkt anlegen"></mutation> <next> <block type="on_ext" id="]]A^|D#,$16@V,C[~OJs"> <mutation items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="=H0]V3r[XSst;zM^]=xZ"> <field name="oid">javascript.0.Eigene_Datenpunkte.Gute_Nacht.Gute_Nacht</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id=";bht4@[v%^rS7sNc7$%g"> <field name="COMMENT">Wohnzimmer</field> <next> <block type="controls_if" id="kfK8usI}_OV4khC@{tnK"> <mutation elseif="2"></mutation> <value name="IF0"> <block type="logic_operation" id=";s/[$QWy.P84rt4Uvfr-" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="I5ew_,Qeo1Y7?:*,g1zv"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="OLctaaO~^wQA$IN6.SHE"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field> </block> </value> <value name="B"> <block type="math_number" id="XE8W=:=5KJcjCJ#:}HWz"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="f88jdjiYTtnxprig3xx@"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="!pm/[2r|Y2im_~|3k;7("> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{qcZ!`0Vg_GCq6kW2m]i"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="O3sy2f+#;7f]X@PM8YY*"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="6Xi#IIG~;;*v[/lhDZIE"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="mu+mp~uZigS.(}o%;Bil"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="/g:3ZQgj})m~_,yjkLJa"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="F_k^@b}E|G.u*Ojn]:(k" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="^TZQzG@@I6aqG8sJ[eV-"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="|DX,Fyphe/ITkiS,#V@}"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.BluRay</field> </block> </value> <value name="B"> <block type="math_number" id="Xr7rY?@J!Y3nwO^|T=n_"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="nxzy2?Bj1hlquBCJpJPi"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="*B$h=F$-2@;q`k8;m|48"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id=";Jpy;ng}$wm|5dg`b9k6"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="{VOx}#?aEbED_gQq76=/"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.BluRay</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id=",pbd%S+Ij3omCOd^GCRT"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="bvdT)1@?PD7{Fd*#*xZf"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="%R#Ue6(aH937zDa|}ZTx"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <value name="IF2"> <block type="logic_operation" id="F`k;Ki]giY.GgXAq)/Ln" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="Tc7CGhA-P70am~)fnA=x"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="K4lw{.kF%@RbCW:f26M."> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.Kino</field> </block> </value> <value name="B"> <block type="math_number" id="qiTI7Fxz}Lk7WqMF:?Lv"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="kKSL+]M4T_`1OK@U49FU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=".f+],LAI$;5RPZ#ZYq6]"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="BiaW;hpjv=f:}H+nn=x*"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="control" id="U:EscaL$85(QpuJ!RcM#"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.Kino</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="0b=jgmOBoXR8#BIbsqbm"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="SK@AUS~6o6KR-EwTn]~j"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="Z*DLT)_*EQ8%Nko_FG0e"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="c`~;]_g.N!c,Hv,EO:J="> <field name="COMMENT">Schlafzimmer</field> <next> <block type="controls_if" id="tHd@z+]wO|*+x5{7(L#2"> <value name="IF0"> <block type="logic_operation" id="nP5(INebk[.:m-ZQEa4$" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="?KaZ+puMUfmr[?5a(yuR"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="`YeO6ytS99i4*iTu*pRb"> <field name="ATTR">val</field> <field name="OID">harmony.0.Schlafzimmer.activities.currentStatus</field> </block> </value> <value name="B"> <block type="math_number" id="OU6s@IuJ:gOx5~svPa+Q"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="RK+.nL7Cy$DNhKO%s-nU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="#=BqK|UziS|{m2M9{w_2"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Schlafzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="?!8m8/Uo)U~j/twFjjj#"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="F$C_jRQTD+b6Dk9VA(hX"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Schlafzimmer.activities.Fernsehen</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1,6pHF8(N)^XR8|#[|;{"> <field name="NUM">1</field> </block> </value> <next> <block type="control" id="/]lxffb4s9M8Sq{12I6b"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Schlafzimmer.on</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id=";Ly2k4/|H`IPOY6uK/XH"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </xml> -
@dslraser
Das ist doch schonmal schön, dass es geht :DWie mĂŒsste ich denn in Blockly umsetzen, dass ein Harmony GerĂ€t bzw. Aktion und Lampen geprĂŒft werden ob diese an sind?
und so geht das Wohnzimmerlicht langsam aus und das im Schlafzimmerlicht langsam an.

<xml xmlns="http://www.w3.org/1999/xhtml"> <block type="procedures_defcustomnoreturn" id="(O)c8X-C[MCtqO5vS*^e" x="-463" y="88"> <mutation statements="false"></mutation> <field name="NAME">datenpunkt anlegen</field> <field name="SCRIPT">Ly9EYXRlbnB1bmt0ICBlcnN0ZWxsZW4KY3JlYXRlU3RhdGUoIkVpZ2VuZV9EYXRlbnB1bmt0ZS5HdXRlX05hY2h0Lkd1dGVfTmFjaHQiLCB7CiAgICBuYW1lOiAnR3V0ZSBOYWNodCcsIAogICAgcm9sZTogJ2J1dHRvbicsCiAgICByZWFkOiAgZmFsc2UsIAogICAgd3JpdGU6IHRydWUsCiAgICAic21hcnROYW1lIjogewogICAgImRlIjogIkd1dGUgTmFjaHQgRGF0ZW5wdW5rdCIsCiAgICAic21hcnRUeXBlIjogIlNXSVRDSCIKfQp9KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> </block> <block type="procedures_callcustomnoreturn" id="`sx3r1UFlV;$o1:Eu$dG" x="-463" y="137"> <mutation name="datenpunkt anlegen"></mutation> <next> <block type="on_ext" id="]]A^|D#,$16@V,C[~OJs"> <mutation items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="=H0]V3r[XSst;zM^]=xZ"> <field name="oid">javascript.0.Eigene_Datenpunkte.Gute_Nacht.Gute_Nacht</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id=";bht4@[v%^rS7sNc7$%g"> <field name="COMMENT">Wohnzimmer</field> <next> <block type="controls_if" id="kfK8usI}_OV4khC@{tnK"> <mutation elseif="2"></mutation> <value name="IF0"> <block type="logic_operation" id=";s/[$QWy.P84rt4Uvfr-" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="I5ew_,Qeo1Y7?:*,g1zv"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="OLctaaO~^wQA$IN6.SHE"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field> </block> </value> <value name="B"> <block type="math_number" id="XE8W=:=5KJcjCJ#:}HWz"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="f88jdjiYTtnxprig3xx@"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="!pm/[2r|Y2im_~|3k;7("> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="{qcZ!`0Vg_GCq6kW2m]i"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="O3sy2f+#;7f]X@PM8YY*"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="6Xi#IIG~;;*v[/lhDZIE"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="mu+mp~uZigS.(}o%;Bil"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Wohnzimmer.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Q6e.1}|GJ,]~f{735:Ka"> <field name="TEXT">{"on":false,"transitiontime":100}</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_operation" id="F_k^@b}E|G.u*Ojn]:(k" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="^TZQzG@@I6aqG8sJ[eV-"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="|DX,Fyphe/ITkiS,#V@}"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.BluRay</field> </block> </value> <value name="B"> <block type="math_number" id="Xr7rY?@J!Y3nwO^|T=n_"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="nxzy2?Bj1hlquBCJpJPi"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="*B$h=F$-2@;q`k8;m|48"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id=";Jpy;ng}$wm|5dg`b9k6"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="{VOx}#?aEbED_gQq76=/"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.BluRay</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id=",pbd%S+Ij3omCOd^GCRT"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="`d,93^l5@8$xJ|SN;dJw"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Wohnzimmer.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="iatN9Qv-iIrPm~gwo0V("> <field name="TEXT">{"on":false,"transitiontime":100}</field> </block> </value> </block> </next> </block> </statement> <value name="IF2"> <block type="logic_operation" id="F`k;Ki]giY.GgXAq)/Ln" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="Tc7CGhA-P70am~)fnA=x"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="K4lw{.kF%@RbCW:f26M."> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.Kino</field> </block> </value> <value name="B"> <block type="math_number" id="qiTI7Fxz}Lk7WqMF:?Lv"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="kKSL+]M4T_`1OK@U49FU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=".f+],LAI$;5RPZ#ZYq6]"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Wohnzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="BiaW;hpjv=f:}H+nn=x*"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO2"> <block type="control" id="U:EscaL$85(QpuJ!RcM#"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.Kino</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="0b=jgmOBoXR8#BIbsqbm"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="V1*1Z`N|8ei91p*MQz:y"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Wohnzimmer.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Je*$p@e1xE(4./tr]xaR"> <field name="TEXT">{"on":false,"transitiontime":100}</field> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="c`~;]_g.N!c,Hv,EO:J="> <field name="COMMENT">Schlafzimmer</field> <next> <block type="controls_if" id="tHd@z+]wO|*+x5{7(L#2"> <value name="IF0"> <block type="logic_operation" id="nP5(INebk[.:m-ZQEa4$" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="?KaZ+puMUfmr[?5a(yuR"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="`YeO6ytS99i4*iTu*pRb"> <field name="ATTR">val</field> <field name="OID">harmony.0.Schlafzimmer.activities.currentStatus</field> </block> </value> <value name="B"> <block type="math_number" id="OU6s@IuJ:gOx5~svPa+Q"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="RK+.nL7Cy$DNhKO%s-nU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="#=BqK|UziS|{m2M9{w_2"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Schlafzimmer.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="?!8m8/Uo)U~j/twFjjj#"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="F$C_jRQTD+b6Dk9VA(hX"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Schlafzimmer.activities.Fernsehen</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1,6pHF8(N)^XR8|#[|;{"> <field name="NUM">1</field> </block> </value> <next> <block type="control" id="/]lxffb4s9M8Sq{12I6b"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Schlafzimmer.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="8OHUJz!=iuUV}{;w(@Vd"> <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </xml> -
@dslraser
Das ist doch schonmal schön, dass es geht :DWie mĂŒsste ich denn in Blockly umsetzen, dass ein Harmony GerĂ€t bzw. Aktion und Lampen geprĂŒft werden ob diese an sind?
oder Du prĂŒfst die activities und das Licht einzeln...(und schaltest nur das was an ist aus und im Schlafzimmer umgekehrt)
Jetzt kannst Du Dir was aussuchen...

<xml xmlns="http://www.w3.org/1999/xhtml"> <block type="procedures_defcustomnoreturn" id="(O)c8X-C[MCtqO5vS*^e" x="-463" y="88"> <mutation statements="false"></mutation> <field name="NAME">datenpunkt anlegen</field> <field name="SCRIPT">Ly9EYXRlbnB1bmt0ICBlcnN0ZWxsZW4KY3JlYXRlU3RhdGUoIkVpZ2VuZV9EYXRlbnB1bmt0ZS5HdXRlX05hY2h0Lkd1dGVfTmFjaHQiLCB7CiAgICBuYW1lOiAnR3V0ZSBOYWNodCcsIAogICAgcm9sZTogJ2J1dHRvbicsCiAgICByZWFkOiAgZmFsc2UsIAogICAgd3JpdGU6IHRydWUsCiAgICAic21hcnROYW1lIjogewogICAgImRlIjogIkd1dGUgTmFjaHQgRGF0ZW5wdW5rdCIsCiAgICAic21hcnRUeXBlIjogIlNXSVRDSCIKfQp9KTs=</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion âŠ</comment> </block> <block type="procedures_callcustomnoreturn" id="`sx3r1UFlV;$o1:Eu$dG" x="-463" y="137"> <mutation name="datenpunkt anlegen"></mutation> <next> <block type="on_ext" id="]]A^|D#,$16@V,C[~OJs"> <mutation items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="=H0]V3r[XSst;zM^]=xZ"> <field name="oid">javascript.0.Eigene_Datenpunkte.Gute_Nacht.Gute_Nacht</field> </shadow> </value> <statement name="STATEMENT"> <block type="comment" id=";bht4@[v%^rS7sNc7$%g"> <field name="COMMENT">Wohnzimmer</field> <next> <block type="controls_if" id="kfK8usI}_OV4khC@{tnK"> <value name="IF0"> <block type="logic_compare" id="I5ew_,Qeo1Y7?:*,g1zv"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="OLctaaO~^wQA$IN6.SHE"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field> </block> </value> <value name="B"> <block type="math_number" id="XE8W=:=5KJcjCJ#:}HWz"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="O3sy2f+#;7f]X@PM8YY*"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.Fernsehen</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="6Xi#IIG~;;*v[/lhDZIE"> <field name="NUM">0</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="GONm}EI41`a=0n(g.~[+"> <value name="IF0"> <block type="logic_compare" id="PUs]|YOHwh@zge%prG%%"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="Eb_Z.wDf2ha.+xzn]|^y"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.BluRay</field> </block> </value> <value name="B"> <block type="math_number" id="+f?I#b~mjasa8o,,:3s."> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="w9*Fqrwj{;h(@GAP]fK$"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.BluRay</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="ZwEz,2rg5*D,nKiK?_zh"> <field name="NUM">0</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="}7{Vo{Oc=p!u]aA(f$#}"> <value name="IF0"> <block type="logic_compare" id="Z3xdJ14L43p$LVW]T3.@"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="Cc~#uBdXf%E=Di|F4QRa"> <field name="ATTR">val</field> <field name="OID">harmony.0.Wohnzimmer.activities.Kino</field> </block> </value> <value name="B"> <block type="math_number" id="fG~Wx(8t23ol^yjqo9BT"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="yrd7`ybQt*UXYibES;~3"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Wohnzimmer.activities.Kino</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="^KdT|m/.n(Y1SnMv^Z!W"> <field name="NUM">0</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="D-y7u,8BqNRFjYgi.o@L"> <value name="IF0"> <block type="logic_operation" id="grjeUH@XJUJBIgOXq:]+" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="kKSL+]M4T_`1OK@U49FU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=".f+],LAI$;5RPZ#ZYq6]"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Fernsehlampe_links.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="BiaW;hpjv=f:}H+nn=x*"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="znmG]v**KlwTsMZI])[/"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="|_hwu/VVbR+bU@,W=D`B"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="vc+KYvF73p2zHe.tN*1g"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="mu+mp~uZigS.(}o%;Bil"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Fernsehlampe_links.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="Q6e.1}|GJ,]~f{735:Ka"> <field name="TEXT">{"on":false,"transitiontime":100}</field> </block> </value> <next> <block type="control" id="a)hoOR}rG]l49@lvC[,!"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Fernsehlampe_rechts.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="NO|N$o(/dNiTr2z-S6y-"> <field name="TEXT">{"on":false,"transitiontime":100}</field> </block> </value> </block> </next> </block> </statement> <next> <block type="comment" id="c`~;]_g.N!c,Hv,EO:J="> <field name="COMMENT">Schlafzimmer</field> <next> <block type="controls_if" id="tHd@z+]wO|*+x5{7(L#2"> <value name="IF0"> <block type="logic_compare" id="?KaZ+puMUfmr[?5a(yuR"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="`YeO6ytS99i4*iTu*pRb"> <field name="ATTR">val</field> <field name="OID">harmony.0.Schlafzimmer.activities.currentStatus</field> </block> </value> <value name="B"> <block type="math_number" id="OU6s@IuJ:gOx5~svPa+Q"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="F$C_jRQTD+b6Dk9VA(hX"> <mutation delay_input="false"></mutation> <field name="OID">harmony.0.Schlafzimmer.activities.Fernsehen</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="1,6pHF8(N)^XR8|#[|;{"> <field name="NUM">1</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="h4gx7r%MlZ;q;Ws1r@y2"> <value name="IF0"> <block type="logic_operation" id="]n`;?*GZ)jg*N?T!%@$]" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="RK+.nL7Cy$DNhKO%s-nU"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="#=BqK|UziS|{m2M9{w_2"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Schlafzimmerlampe_links.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="?!8m8/Uo)U~j/twFjjj#"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="K}R?g$w4FbI9oMtnlokt"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="A)AGVkmbxp_iiLbu)JGY"> <field name="ATTR">val</field> <field name="OID">hue.0.HueBridge.Schlafzimmerlampe_rechts.on</field> </block> </value> <value name="B"> <block type="logic_boolean" id="L)O$GGRa_#fA)3H[4m`="> <field name="BOOL">FALSE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="/]lxffb4s9M8Sq{12I6b"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Schlafzimmerlampe_links.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="8OHUJz!=iuUV}{;w(@Vd"> <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field> </block> </value> <next> <block type="control" id="65`%qlpe)7QcP+e^7Ge@"> <mutation delay_input="false"></mutation> <field name="OID">hue.0.HueBridge.Schlafzimmerlampe_rechts.command</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="tdUi`_fBBwPl4Uf$iEpA"> <field name="TEXT">{"on":true,"level":100,"r":254,"g":143,"b":33,"transitiontime":30}</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </xml> -
Hey, ich möchte gerade versuchen deine Posts umzusetzen.
Das fÀngt schon gut mit dem ersten Schritt an ;) ich habe wirklich 0 Ahnung wo und wie ich diesen Datenpunkt anlegen soll^^
Könntest du das Step by Step erklÀren, wenn mal Zeit ist? :D -
Hey, ich möchte gerade versuchen deine Posts umzusetzen.
Das fÀngt schon gut mit dem ersten Schritt an ;) ich habe wirklich 0 Ahnung wo und wie ich diesen Datenpunkt anlegen soll^^
Könntest du das Step by Step erklÀren, wenn mal Zeit ist? :D@smartmood
den legt das Script selbst an.klick mal da ganz rechts drauf

-
Ah ok also ich hab jetzt auf </> geklickt und dass erscheint ein Skript:
//Datenpunkt erstellen
createState("Eigene_Datenpunkte.Gute_Nacht.Gute_Nacht", {
name: 'Gute Nacht',
role: 'button',
read: false,
write: true,
"smartName": {
"de": "Gute Nacht Datenpunkt",
"smartType": "SWITCH"
}
});Das habe ich gespeichert....
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen BeitrĂ€ge zu scrollen? Wenn du dich fĂŒr ein Konto anmeldest, kommst du immer genau dorthin zurĂŒck, wo du zuvor warst, und kannst dich ĂŒber neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und BeitrĂ€ge positiv bewerten, um anderen Community-Mitgliedern deine WertschĂ€tzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden đ
Registrieren Anmelden

