Skip to content

Blockly

6.6k Topics 79.8k Posts

Hilfe für Skripterstellung mit Blockly

NEWS

  • Alexa Device Radio Sender

    3
    0 Votes
    3 Posts
    360 Views
    H
    @razor88w anbei ein Blockly:[image: 1615489971200-blockly.jpg] <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="comment" id="N3OGf^,|*UPnjx.jqL1G" x="13" y="38"> <field name="COMMENT">Sender: Antenne Bayern: s42824, RPR1. Aprés Ski: s267508</field> <next> <block type="on_ext" id="r-nlIeYfQsB!7hW8z)n/"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="ZH5Fq?HHGR2tM0D(3@+w"> <field name="oid">zigbee.0.000d6ffffe463925.occupancy</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="8x[QmC/L=v)5,3EL]k(("> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="%YWl/m6hY]Vfxff_/ng?" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="on_source" id="jCA,k#ie!DDYa}CnEF)m"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="time_compare_ex" id="SxaKx-sfWwm)oNM%6^R{"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="id/^ZerlywV_wIRA]#`m"> <field name="TEXT">07:00</field> </shadow> </value> <value name="END_TIME"> <shadow type="text" id="|MH-Z)!3tFj$V8E9s,DT"> <field name="TEXT">22:00</field> </shadow> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="controls_if" id="L;@=Ez;mZ^}XSYEExb?v"> <value name="IF0"> <block type="logic_compare" id="=PeRV]/r@(dZ3KpGje?C"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="@?Gijn,PeSpCUVZ#lFbe"> <field name="ATTR">val</field> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.currentState</field> </block> </value> <value name="B"> <block type="logic_boolean" id=";_7+c$*k,%QISpT7fcTd"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id=":p7PIMWML.C,BD|8]Q}."> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="gw2v75oTJ,U[9.7]O6VV"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id=".7Tp[*pw%Qj=OW(I9wg="> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.TuneIn-Station</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text" id="}y;pL{Gd2~ccmb{(`O|3"> <field name="TEXT">s78909</field> </block> </value> <next> <block type="control" id="J8RA#_wQlv+N@b=~/!z!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.controlPlay</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="$3aey$27;saj82+E7G@;"> <field name="BOOL">TRUE</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="timeouts_cleartimeout" id="q|-p2?k`?,pDxba#s-;e"> <field name="NAME">timeout</field> <next> <block type="timeouts_settimeout" id="M?fSimc$R_kHs7PWfJOd"> <field name="NAME">timeout</field> <field name="DELAY">10</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="sUs/n(4vP|~T16G0._$a"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.controlPause</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="v-hsBwQx=u62s?(Qa19#"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="e#req-Va$-RRC]G4EF5%"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.volume</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="get_value" id="F0tV)OA^/%r:sD9f#f3T"> <field name="ATTR">val</field> <field name="OID">javascript.0.Datenpunkte.Alexa-Ansagelautstaerke</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </statement> </block> </statement> <next> <block type="comment" id="4ZgiF`(t;!7x+-_{~X~x"> <field name="COMMENT">Bei Licht aus Alexa Pause</field> <next> <block type="on_ext" id="bS.RTS}#aherAC9VKf0,"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="^NAcbo4~IqH@HyCn941@"> <field name="oid">shelly.0.SHSW-1#E0E6AC#1.Relay0.Switch</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="_X5d5ivFma..7LKz|[.*"> <value name="IF0"> <block type="logic_compare" id=",PB]@y@8]*-JzZh1yLQ,"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="NZ)8p{{ifm{mPllMQ5q)"> <field name="ATTR">val</field> <field name="OID">shelly.0.SHSW-1#E0E6AC#1.Relay0.Switch</field> </block> </value> <value name="B"> <block type="logic_boolean" id="]f-~o^E/rFK7?khfQW;u"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="/_d])~A7bjgy(K?:HNt*"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.controlPause</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="VALUE"> <block type="logic_boolean" id="4pnA(X^vlE]9B[`%m:t1"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="control" id="Z?6NfP4||+DP`G$wKpy^"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G091AA0805261KP7.Player.volume</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">TRUE</field> <value name="VALUE"> <block type="get_value" id="yfLNvDGub_^!w/T(eNJo"> <field name="ATTR">val</field> <field name="OID">javascript.0.Datenpunkte.Alexa-Ansagelautstaerke</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml>
  • #Gelöst!!Trigger innerhalb Zeitspanne ein Licht anschalten

    5
    2
    0 Votes
    5 Posts
    486 Views
    P
    @paul53 Danke schön!
  • [gelöst]Shelly schaltet ein und direkt wieder aus

    7
    3
    0 Votes
    7 Posts
    3k Views
    E
    @eifelolli Hallo zusammen, das mit dem Timeout war die goldene Lösung. Danke nochmal für den Tipp. Ich habe noch das setzen vom Status des CUxD Elementes (hier Zwischenstecker) eingebaut, so dass der aktuelle Status des Shelly an die CCU gemeldet wird. Somit bekomme ich auch direkt in PocketConrtolHM direkt den Status aller Shellys im Haus angezeigt. Für den, den es interessiert hier noch mein Blockly [image: 1615474682892-blockly4.jpg] Lg Eifelolli
  • [Gelöst] Verschieden Datenpunkte überwachen und pflegen

    8
    2
    0 Votes
    8 Posts
    641 Views
    liv-in-skyL
    @jerzimeik umso mehr freut man sich, dass es geklappt hat - super gelöst
  • [gelöst] Array über split erzeugen - kein Bug!

    7
    2
    0 Votes
    7 Posts
    323 Views
    HomoranH
    @liv-in-sky Danke! das klappt wenn man es richtig macht. ich hatte wohl "neue Zeile" nur mit beiden einzelnen \r oder \n probiert
  • [gelöst] Datenpunkt mit Button

    4
    1
    0 Votes
    4 Posts
    787 Views
    CinimodC
    @skokarl irgendwie klappt das bei mir nicht, was mache ich falsch ? bei mir sieht es immernoch so aus wie bei dir vorher
  • Automatische Rollosteuerung

    20
    1
    0 Votes
    20 Posts
    1k Views
    da_WoodyD
    @johan2009 deine verbissenheit in ehren, aber warum das rad neu erfinden? warum nicht @simatec 's shuttercontrol verwenden?
  • Astrofunktion wird seit V5.0.12 nicht ausgelöst

    3
    1
    0 Votes
    3 Posts
    282 Views
    actionbyteA
    @homoran Heute morgen alles so umgesetzt, danach wurden plötzlich die Astro Funktionen wieder ausgeführt und Lampen entsprechend geschaltet. Nichts geändert, aber soweit erstaml alles wieder ok.
  • Piface Relais Schalten

    3
    1
    0 Votes
    3 Posts
    179 Views
    mhaas1973M
    @paul53 Ja Danke. Das war der Fehler. Ich habe unter Objekte->javascript.o -> variables -> Datenpunkte generiert. Jetzt geht´s.
  • Homematic IP Wert wird zu oft gesetzt

    5
    2
    0 Votes
    5 Posts
    396 Views
    paul53P
    @or sagte: ist Deine Variante für das Skript noch viel eleganter Das ist nicht meine Variante! Schau bitte genau hin.
  • Homematic IP Wert wird mehrfach gesetzt

    Moved
    1
    0 Votes
    1 Posts
    121 Views
    No one has replied
  • Trigger Verständnis

    18
    1
    0 Votes
    18 Posts
    1k Views
    Uwe WaizmannU
    @paul53 Vielen herzlichen Dank für Deine Hilfe, heute kam Licht ins Dunkle. Ein letzte Frage noch für Heute. Wie kann ich im Blockly einen Wert für einen Datenpunkt setzen. Z.B ich arbeite für den Beschattungswert mit einem Datenpunkt wo der Wert drin steht. Diesen Wert würde ich gerne im Script setzen/ändern, damit ich bei Änderung nicht zu den Datenpunkten wechseln muss. War ne blöde Frage, muss ja nur das Objekt irgendwo im script aktualisieren
  • [solved] Speicherort der Blockly-Skripte

    13
    0 Votes
    13 Posts
    2k Views
    F
    @wendy2702 said in Speicherort der Blockly-Skripte: Eigentlich vor dem Kopieren iobroker stoppen, aktuelle Files im OK, das wars! Ich hatte den broker nicht gestoppt. Dann kanns ja auch nicht gehen, wenn er sofort seine aktuellen Sachen wieder drüberbügelt :-) Die Skripte sind wieder da, jetzt muss ich noch die Datenpunkte wieder korrekt anbinden. Dann müsste es aber wieder gehen. Danke Dir.
  • Blockly Minuten und Stunden Zeitplan vertauscht

    blockly
    6
    2
    0 Votes
    6 Posts
    242 Views
    F
    @homoran Danke Das ist perfekt . Gruß Frank
  • Schleife mit Timeout bis Trigger nicht wahr ist

    blockly javascript
    9
    1
    0 Votes
    9 Posts
    2k Views
    E
    @dslraser Die Timeouts sind allerdings so gewollt, da sonst noch alte Bilder (und nicht das aktuellste, über get snapshot...) verschickt werden
  • Pool Solarheizung

    Locked blockly
    2
    0 Votes
    2 Posts
    285 Views
    NegaleinN
    Mod-Edit: Ich habe diesen Thread geschlossen. Bitte nicht 2 gleiche Threads aufmachen!
  • Fehler in Blocky - und keine Ahnung warum!

    39
    0 Votes
    39 Posts
    5k Views
    actionbyteA
    @wendy2702 Besser gesagt: ich hatte gar keine Kenntnis davon das es auch über den Admin geht, hab's aber jetzt in der Expertenansicht gefunden. Danke für den Hinweis!
  • Alias Name

    12
    0 Votes
    12 Posts
    883 Views
    paul53P
    @afi sagte: kann dies auch an der upgedaten ScriptEngine liegen? Ja. Geh zurück auf Version 5.0.9.
  • [gelöst] Fehler bei Trigger mit mehreren Objekten

    blockly javascript
    12
    1
    0 Votes
    12 Posts
    701 Views
    falke69F
    @homoran ..... ups. jetzt geht es. DANKE Euch beiden!!!
  • Pool Solarheizung

    Unsolved
    1
    3
    -1 Votes
    1 Posts
    278 Views
    No one has replied

561

Online

32.8k

Users

82.8k

Topics

1.3m

Posts