Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Taster press short or long mit blockly

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Taster press short or long mit blockly

    This topic has been deleted. Only users with topic management privileges can see it.
    • AlCalzone
      AlCalzone Developer last edited by Jey Cee

      Hier kommt das Skript. Ist etwas umfangreicher, da es tatsächlich produktiv eingesetzt wird und mit möglichst wenig Konfiguration auskommen soll.

      EnOcean-Schalter werden automatisch erkannt und daher nur über ihre Seriennummer angesprochen.

      Ziel ist es, EnOcean-Schalter mit Aktoren verschiedener Hersteller zu verknüpfen. Dazu wird im config-Objekt definiert, welche Schalter ("ins") welche Aktoren ("outs") steuern. "+"/"-" gibt die Richtung an.

      Die outs decken 3 Fälle ab:

      1.: möglicherweise dimmbarer Aktor. info[0] startet mit "dimmer?" gefolgt vom State der die Dimmbarkeit angibt. info[1] und info[2] geben den minimalen/maximalen Wert an

      2.: Nicht dimmbarer Aktor

      3.: Definitiv dimmbarer Aktor. info[0] = "dimmer". info[1] und info[2] geben den minimalen/maximalen Wert an

      Hinter DIMMER_STEPS gibst du an, in wie vielen Schritten gedimmt werden soll.

      Hinter DIMMER_ENABLED gibst du an, ob die Dimmer-Funktion aktiv ist oder ob nur an/aus geschaltet wird.

      Von den Zeilen danach bitte die Finger lassen.

      Bei Problemen gerne fragen.

      // Schaltwege definieren
      const config = {
      	ins: { //Schalter
      		"FEF994B7": {
      			"A0": ["out_id_1", "out_id_2", "+"],
      			"AI": ["out_id_1", "out_id_3", "-"],
      			"B0": ["out_id_2", "+"],
      			"BI": ["out_id_2", "-"]
      		}
      	},
      	outs: {
      		"out_id_1": {
      			state: "zwave.0.NODE2.SWITCH_MULTILEVEL.Level_1",
      			info: ["dimmer?zwave.0.NODE2.CONFIGURATION.Dimmability_of_the_load", 0, 99]
      		},
      		"out_id_2": {
      			state: "zwave.0.NODE18.SWITCH_BINARY.Switch_1",
      			info: [false]
      		},
      		"out_id_3": {
      			state: "zwave.0.NODE4.SWITCH_MULTILEVEL.Level_1",
      			info: ["dimmer", 0, 99]
      		}
      	}
      };
      /** Anzahl der Intervalle, in denen gedimmt wird */
      var DIMMER_STEPS = 5;
      /** Ob die Dimmer-Funktion aktiv ist */
      var DIMMER_ENABLED = false;
      var dimmerThreads = {};
      function dim(outName, direction) {
      	if (!(outName in dimmerThreads))
      		return;
      	log("dim: " + outName + " " + direction);
      	var out = config.outs[outName];
      	var min = out.info[1];
      	var max = out.info[2];
      	var step = roundTo((max - min) / DIMMER_STEPS, 0);
      	var thread = dimmerThreads[outName];
      	var targetState = thread.currentValue + step * (direction === "+" ? 1 : -1);
      	targetState = Math.min(max, Math.max(min, targetState));
      	if (targetState === thread.currentValue) {
      		// Ende des Wertebereichs, abbrechen
      		log("Ende des Wertebereichs, stoppe " + outName, "debug");
      		stopDimmer(outName);
      		return;
      	}
      	else {
      		thread.currentValue = targetState;
      	}
      	enqueueCommand(out.state, targetState);
      }
      function startDimmer(outName, direction) {
      	var out = config.outs[outName];
      	var startValue = getState(out.state).val;
      	// Alte Thread stoppen
      	if (outName in dimmerThreads) {
      		stopDimmer(outName);
      	}
      	// Neuen Thread erstellen
      	var dimmer = function () { return dim(outName, direction); };
      	dimmerThreads[outName] = {
      		timer: setInterval(dimmer, 1000),
      		currentValue: startValue,
      	};
      	dimmer();
      }
      function stopDimmer(outName) {
      	if (!(outName in dimmerThreads))
      		return;
      	var thread = dimmerThreads[outName];
      	log("stopping dimmer " + outName, "debug");
      	clearInterval(thread.timer);
      	delete dimmerThreads[outName];
      }
      function switchPressed(dev, buttons, event, long) {
      	var id = dev.id;
      	// Gerät nicht definiert?
      	if (!config.ins[id]) {
      		log("Schalter nicht konfiguriert: " + id, "warn");
      		return;
      	}
      	for (var _i = 0, buttons_1 = buttons; _i < buttons_1.length; _i++) {
      		var btn = buttons_1[_i];
      		// Auslesen, was getan werden soll
      		var action = config.ins[id][btn];
      		if (!action)
      			continue;
      		var n = action.length;
      		for (var i = 0; i <= n - 2; i++) {
      			var outName = action[i];
      			var out = config.outs[outName];
      			if (!out) {
      				log("Schaltaktion nicht definiert: " + outName, "warn");
      				continue;
      			}
      			var direction = action[n - 1];
      			var isDimmer = /^dimmer/.test(out.info[0]);
      			var bulbDimmable = true;
      			if (/^dimmer\?/.test(out.info[0])) {
      				var checkState = out.info[0].substring("dimmer?".length);
      				// tslint:disable-next-line:triple-equals
      				bulbDimmable = getState(checkState).val == 0; // "0" oder 0 möglich
      			} else {
      				bulbDimmable = false;
      			}
      			log(btn + " " + event + ": " + action[0] + " (dimmable: " + bulbDimmable + ") => " + direction, "debug");
      			switch (event) {
      				case "longPress":
      					// Dimmer anschmeißen
      					if (!DIMMER_ENABLED || !isDimmer || !bulbDimmable)
      						continue;
      					log("starting dimmer " + action[0], "debug");
      					startDimmer(outName, direction);
      					break;
      				case "release":
      					log("release: btn=" + btn + ", long=" + long, "debug");
      					// (Dimmen beenden)
      					stopDimmer(outName);
      					if (!long || !bulbDimmable) {
      						// Bei kurzem Knopfdruck Schaltvorgang ausführen
      						log("switching " + (direction === "+" ? "on" : "off"), "debug");
      						if (isDimmer) {
      							// Dimmer auf Maximal-/Minimalwert setzen
      							enqueueCommand(out.state, (direction === "+" ? out.info[2] : out.info[1]));
      						}
      						else {
      							// Relais auf an/aus setzen
      							enqueueCommand(out.state, (direction === "+" ? true : false));
      						}
      					}
      			}
      		}
      	}
      }
      function roundTo(num, digits) {
      	var exp = Math.pow(10, digits);
      	return Math.round(num * exp) / exp;
      }
      var sendQueue = [];
      var currentCommand = null;
      var queueBusy = false;
      function enqueueCommand(stateID, targetValue) {
      	for (var i = 0; i < sendQueue.length; i++) {
      		// remove all commands obsoleted by this one
      		if (sendQueue[i].stateID === stateID) {
      			log("removing obsolete command " + sendQueue[i].stateID + "=" + sendQueue[i].targetValue, "debug");
      			sendQueue.splice(i, 1);
      			i--;
      		}
      	}
      	log("enqueuing command " + stateID + "=" + targetValue + " (LEN=>" + (sendQueue.length + 1) + ")", "debug");
      	sendQueue.push({
      		stateID: stateID,
      		targetValue: targetValue,
      		deadlockTimeout: null,
      	});
      	processCommands();
      }
      function finishCurrentCommand() {
      	if (queueBusy && currentCommand != null) {
      		log("finishing current command", "debug");
      		clearTimeout(currentCommand.deadlockTimeout);
      		currentCommand = null;
      		queueBusy = false;
      		setTimeout(processCommands, 0);
      	}
      }
      function forgetCurrentCommand() {
      	log("forgetting current command", "warn");
      	// gets called after a while to avoid deadlocks
      	currentCommand = null;
      	queueBusy = false;
      	setTimeout(processCommands, 0);
      }
      function processCommands() {
      	log("processCommands: busy = " + queueBusy + ", length = " + sendQueue.length, "debug");
      	// don't do anything if we're busy sending or no commands are queued
      	if (queueBusy)
      		return;
      	while (sendQueue.length > 0) {
      		// find out if the current command is neccessary
      		currentCommand = sendQueue.shift();
      		var currentState = getState(currentCommand.stateID);
      		log("processCommands > " + currentCommand.stateID + "=>" + currentCommand.targetValue + ". current = " + currentState.val + ", ack = " + currentState.ack, "debug");
      		if (currentState.ack && currentState.val === currentCommand.targetValue) {
      			log("command unneccessary", "debug");
      			// unnötiger Befehl, ignorieren
      			continue;
      		}
      		// now we're busy
      		log("sending", "debug");
      		queueBusy = true;
      		currentCommand.deadlockTimeout = setTimeout(forgetCurrentCommand, 10000);
      		setState(currentCommand.stateID, currentCommand.targetValue);
      		// stop looping until the command finishes or fails
      		return;
      	}
      }
      // Auf ack=true updates warten, um nicht gleichzeitig mehrere Befehle zu senden
      var allStateIDs = Object.keys(config.outs).map(function (id) { return config.outs[id].state; });
      on({ id: allStateIDs, ack: true }, function (obj) {
      	if (currentCommand && currentCommand.stateID === obj.id) {
      		// this was the ack we waited for
      		log("received ack for current command. " + obj.id + " = " + obj.state.val, "debug");
      		finishCurrentCommand();
      	}
      });
      // ========================
      // EnOcean-Implementation
      // tslint:disable
      var eeps = {
      	"F6-02-01": "switch.2-channel",
      	"F6-02-02": "switch.2-channel",
      	"F6-02-03": "switch.2-channel",
      	"F6-02-04": "switch.2-channel",
      	"F6-03-01": "switch.4-channel",
      	"F6-03-02": "switch.4-channel",
      };
      var enOceanDevice = (function () {
      	function enOceanDevice(ioBrokerID) {
      		var dev;
      		this.ioBrokerID = ioBrokerID;
      		dev = (getObject(ioBrokerID))["native"];
      		this.id = dev.Internals.DEF;
      		this.type = eeps[dev.Attributes.eep];
      	}
      	enOceanDevice.prototype.ioBrokerID = "";
      	enOceanDevice.prototype.id = "";
      	enOceanDevice.prototype.type = "";
      	return enOceanDevice;
      })();
      var enOceanSwitch, bind = function (fn, me) { return function () { return fn.apply(me, arguments); }; };
      enOceanSwitch = (function () {
      	var longPressThreshold;
      	function enOceanSwitch(device) {
      		this.handlers = [];
      		this.removeEventHandler = bind(this.removeEventHandler, this);
      		this.addEventHandler = bind(this.addEventHandler, this);
      		this.onButtonRelease = bind(this.onButtonRelease, this);
      		this.onLongPress = bind(this.onLongPress, this);
      		this.onChannelEvent = bind(this.onChannelEvent, this);
      		this.onButtonPress = bind(this.onButtonPress, this);
      		this.device = device;
      		this.id = device.id;
      		subscribe({
      			id: this.device.ioBrokerID + ".buttons",
      			val: "pressed",
      		}, (function (_this) {
      			return function (obj) {
      				return _this.onButtonPress();
      			};
      		})(this));
      		subscribe({
      			id: new RegExp((this.device.ioBrokerID.replace('.', '\.')) + "\.state"),
      			change: "any",
      		}, (function (_this) {
      			return function (obj) {
      				return _this.onChannelEvent(obj.newState.val);
      			};
      		})(this));
      		subscribe({
      			id: this.device.ioBrokerID + ".buttons",
      			val: "released",
      		}, (function (_this) {
      			return function (obj) {
      				return _this.onButtonRelease();
      			};
      		})(this));
      	}
      	enOceanSwitch.prototype.id = null;
      	enOceanSwitch.prototype.device = null;
      	longPressThreshold = 500;
      	enOceanSwitch.prototype.isLongPress = false;
      	enOceanSwitch.prototype.releaseSent = false;
      	enOceanSwitch.prototype.buttons = [];
      	enOceanSwitch.prototype.pressTime = 0;
      	enOceanSwitch.prototype.longPressUpdateTimeout = 0;
      	enOceanSwitch.prototype.onButtonPress = function () {
      		this.releaseSent = false;
      		this.isLongPress = false;
      		this.buttons = [];
      		this.pressTime = Date.now();
      		this.longPressUpdateTimeout = setTimeout(this.onLongPress, longPressThreshold);
      		return null;
      	};
      	enOceanSwitch.prototype.onChannelEvent = function (btns) {
      		for (var _i = 0, _a = btns.split(","); _i < _a.length; _i++) {
      			var btn = _a[_i];
      			btn = btn.match(/[A,B][0,I]/)[0];
      			if (this.buttons.indexOf(btn) === -1)
      				this.buttons.push(btn);
      		}
      		return null;
      	};
      	enOceanSwitch.prototype.onLongPress = function () {
      		if (this.releaseSent) {
      			return;
      		}
      		this.isLongPress = true;
      		return this.handlers.forEach((function (_this) {
      			return function (handler) {
      				return handler(_this.device, _this.buttons, "longPress", true);
      			};
      		})(this));
      	};
      	enOceanSwitch.prototype.onButtonRelease = function () {
      		this.longPressUpdateTimeout = clearTimeout(this.longPressUpdateTimeout);
      		this.releaseSent = true;
      		this.handlers.forEach((function (_this) {
      			return function (handler) {
      				return handler(_this.device, _this.buttons, "release", _this.isLongPress);
      			};
      		})(this));
      		return null;
      	};
      	enOceanSwitch.prototype.handlers = [];
      	enOceanSwitch.prototype.addEventHandler = function (func) {
      		return this.handlers.push(func);
      	};
      	enOceanSwitch.prototype.removeEventHandler = function (func) {
      		var index;
      		index = this.handlers.indexOf(func);
      		return this.handlers.splice(index, 1);
      	};
      	null;
      	return enOceanSwitch;
      })();
      var enumEnOceanDevices;
      enumEnOceanDevices = function () {
      	var addDevice, deviceIDs;
      	deviceIDs = [];
      	addDevice = function (id, i) {
      		var d, deviceID;
      		deviceID = id.match(/^\w+\.\d+\.\w+/);
      		if ((d = deviceID != null ? deviceID[0] : void 0)) {
      			if ((deviceIDs.indexOf(d)) === -1) {
      				return deviceIDs.push(d);
      			}
      		}
      	};
      	$("channel[state.id=fhem.0.EnO*]").each(addDevice);
      	return deviceIDs.map(function (id) {
      		return new enOceanDevice(id);
      	});
      };
      // ===============================
      // Geräte ermitteln
      var devices = enumEnOceanDevices();
      var switches = devices
      	.filter(function (dev) { return dev.type.substr(0, 6) === "switch"; })
      	.map(function (dev) { return new enOceanSwitch(dev); });
      switches.forEach(function (sw) { return sw.addEventHandler(switchPressed); });
      
      1 Reply Last reply Reply Quote 0
      • AxelF1977
        AxelF1977 last edited by

        @AlCalzone:

        Hier kommt das Skript. Ist etwas umfangreicher, da es tatsächlich produktiv eingesetzt wird und mit möglichst wenig Konfiguration auskommen soll. `

        Uff, das ist mal ne Hausnummer. Danke. Wir werden uns da reinarbeiten

        Da ich in Deiner Signatur gesehen das der IKEA Trådfri Adapter von Dir ist, gehe ich mal davon aus, dass das Script mit dem System funktioniert. Werde jetzt von Osram Lightify zu IKEA Trådfri wechseln.

        1 Reply Last reply Reply Quote 0
        • AlCalzone
          AlCalzone Developer last edited by

          Ja sollte auch mit TRÅDFRI funktionieren. Das wäre Fall 3: definitiv dimmbar mit brightness als state.

          Gesendet von iPhone mit Tapatalk

          1 Reply Last reply Reply Quote 0
          • AxelF1977
            AxelF1977 last edited by

            Ich habe das Script jetzt ausgiebig getestet. Einmal mit Osram Lightify und noch mit IKEA TRÅDFRI.

            Mit unterschiedlichen Ergebnissen aber einer Gemeinsamkeit. Gemeinsam haben beide: Stufenlos gedimmt werden kann nicht. Das liegt sicher an der Art der EnOcean Taster?

            Osram dimmt hoch oder runter in dem die Birnen wirklich langsam heller oder dunkler werden. Bei TRÅDFRI wird die Birne direkt heller oder dunkler. Aber wie gesagt, in Echtzeit per Tastendruck lassen sich die Birnen nicht dimmen (wie es bei den IKEA Fernbedienungen funktioniert).

            Gehen die EnOcean für stufenloses Dimmen, eher nicht, oder?

            1 Reply Last reply Reply Quote 0
            • Jey Cee
              Jey Cee Developer last edited by

              Das hat keines Wegs mit den EnOcean Tastern zu tun.

              Die sind ja nicht direktverknüpft, sondern du wertest die Dauer des Drucks aus. Und während der Dauer des Drucks führst du deine Aktion aus.

              Das liegt wohl eher an der Reaktionszeit der Adapter oder Gateways.

              Gesendet von Unterwegs

              1 Reply Last reply Reply Quote 0
              • AxelF1977
                AxelF1977 last edited by

                @Jey Cee:

                Das hat keines Wegs mit den EnOcean Tastern zu tun.

                Die sind ja nicht direktverknüpft, sondern du wertest die Dauer des Drucks aus. Und während der Dauer des Drucks führst du deine Aktion aus.

                Das liegt wohl eher an der Reaktionszeit der Adapter oder Gateways. `

                Die Überlegung war, da sie nicht Batterie betrieben sind und die Energie zum Schalten selber erzeugen, können sie an/aus. Die Druckdauer können sie übermitteln, stimmt.

                @AlCalzone dimmen Deine Lampen stufenlos mit den EnOcean Tastern, wenn genutzt?

                1 Reply Last reply Reply Quote 0
                • AlCalzone
                  AlCalzone Developer last edited by

                  @AxelF1977:

                  @AlCalzone dimmen Deine Lampen stufenlos mit den EnOcean Tastern, wenn genutzt? `
                  Nein, in einer konfigurierbaren Anzahl an Stufen (siehe Kommentare im Quelltext). Das Skript war dafür gedacht, ZWave-Dimmer anzusteuern und die mögen es nicht, wenn man zu viele Befehle sendet.

                  Für stufenloses Dimmen müsste man das Skript anpassen. Aktuell ist es so, dass die Taster-Objekte 3 Events senden:

                  • "pressed" sofort

                  • "longPress" nach 500ms (ebenfalls konfigurierbar)

                  • "released" beim Loslassen.

                  1 Reply Last reply Reply Quote 0
                  • AxelF1977
                    AxelF1977 last edited by

                    @AlCalzone: `
                    Nein, in einer konfigurierbaren Anzahl an Stufen (siehe Kommentare im Quelltext). Das Skript war dafür gedacht, ZWave-Dimmer anzusteuern und die mögen es nicht, wenn man zu viele Befehle sendet.

                    Für stufenloses Dimmen müsste man das Skript anpassen. Aktuell ist es so, dass die Taster-Objekte 3 Events senden:

                    • "pressed" sofort

                    • "longPress" nach 500ms (ebenfalls konfigurierbar)

                    • "released" beim Loslassen.

                    Danke für die Antwort. Ich werde mein Bruder mal drüber gucken lassen, evtl. hat er eine Lösung wie das Script anzupassen ist. Die Verzögerung zwischen Tastendruck und Schalten ist enorm, da sind teilweise mehrer Sekunden zwischen bei, zumindest bei TRÅDFRI. Osram ist da schneller

                    1 Reply Last reply Reply Quote 0
                    • AxelF1977
                      AxelF1977 last edited by

                      @AlCalzone:

                      Nein, in einer konfigurierbaren Anzahl an Stufen (siehe Kommentare im Quelltext). Das Skript war dafür gedacht, ZWave-Dimmer anzusteuern und die mögen es nicht, wenn man zu viele Befehle sendet.

                      Für stufenloses Dimmen müsste man das Skript anpassen. Aktuell ist es so, dass die Taster-Objekte 3 Events senden:

                      • "pressed" sofort

                      • "longPress" nach 500ms (ebenfalls konfigurierbar)

                      • "released" beim Loslassen. `

                      Danke für die Antwort. Ich werde mein Bruder mal drüber gucken lassen, evtl. hat er eine Lösung wie das Script anzupassen ist. Die Verzögerung zwischen Tastendruck und Schalten ist enorm, da sind teilweise mehrer Sekunden zwischen bei, zumindest bei TRÅDFRI. Osram ist da schneller

                      1 Reply Last reply Reply Quote 0
                      • AlCalzone
                        AlCalzone Developer last edited by

                        @AxelF1977:

                        Die Verzögerung zwischen Tastendruck und Schalten ist enorm, da sind teilweise mehrer Sekunden zwischen bei, zumindest bei TRÅDFRI. `
                        Hmm, bei mir war das üblicherweise sofort. Ich habe das Skript aber mal relativ stark angepasst (Befehlsbegrenzung wg. zwave) nachdem ich mit Tradfri getestet habe, eventuell vertragen die beiden sich nicht mehr.

                        AxelF1977 1 Reply Last reply Reply Quote 0
                        • AxelF1977
                          AxelF1977 @AlCalzone last edited by

                          Hat schonmal jemand diese oder ein ähnliches Script für Hue mit Enocean Tastern verwirklicht?

                          Ich sehe mich nicht in der Lage, dieses Script dafür umzubauen.

                          Danke

                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @AxelF1977 last edited by paul53

                            @AxelF1977 sagte:

                            Script für Hue mit Enocean Tastern verwirklicht?

                            Da ich weder Enocean noch Hue besitze, muss ich fragen: Welche Datenpunkte mit welchen Eigenschaften ?

                            Taster mit diesem ?

                            • "pressed" sofort
                            • "longPress" nach 500ms (ebenfalls konfigurierbar)
                            • "released" beim Loslassen.

                            Hue mit getrennten Datenpunkten für Dimmer (level in %) und Ein/Aus (true/false) ?

                            Dann sollte es so funktionieren:

                            Blockly_Dimm_Onocean-Taster.JPG

                            Export:

                            <xml xmlns="http://www.w3.org/1999/xhtml">
                             <variables>
                               <variable type="" id="#65kx#lf_?,M2b%98!7t">on</variable>
                               <variable type="" id=".0n)fPPZ0Vnq@(#OkayL">level</variable>
                               <variable type="" id="LOUNWT3$L)e!L@xYU#}h">step</variable>
                               <variable type="" id="r@NrZq0IZi*lPW#AYK/Q">delta</variable>
                               <variable type="" id="R*r}N3kzibH)Apx7BA2q">long</variable>
                               <variable type="undefined" id="Intervall">Intervall</variable>
                             </variables>
                             <block type="variables_set" id="/o?gK%j6g^7_EnH_0|l2" x="-313" y="-338">
                               <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                               <value name="VALUE">
                                 <block type="get_value" id="^PoPSnNeaX--`PXyE0rq">
                                   <field name="ATTR">val</field>
                                   <field name="OID">ID auswählen</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="variables_set" id="mBjs]l~k+|EXhuQdommL">
                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                   <value name="VALUE">
                                     <block type="get_value" id="X`JY{Vb._~,oJne_SWOY">
                                       <field name="ATTR">val</field>
                                       <field name="OID">ID auswählen</field>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="variables_set" id="BZ25)c-VK5Z[3goO6AO@">
                                       <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                       <value name="VALUE">
                                         <block type="math_number" id=";wxnn-=7*b4-c-IMf:=:">
                                           <field name="NUM">5</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="variables_set" id="hkmQYCgF~-Nmujv@FNda">
                                           <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                           <value name="VALUE">
                                             <block type="variables_get" id="YAO5#^ARx;!W+z:(kkCO">
                                               <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="on_ext" id="9A$Wi*GJ.dRaDpyO`/xI">
                                               <mutation items="1"></mutation>
                                               <field name="CONDITION">ne</field>
                                               <field name="ACK_CONDITION"></field>
                                               <value name="OID0">
                                                 <shadow type="field_oid" id="/c7pXjT/I+1ho9^BP9Uz">
                                                   <field name="oid">default</field>
                                                 </shadow>
                                               </value>
                                               <statement name="STATEMENT">
                                                 <block type="controls_if" id="8oO0{BL}4az$9-8hSj?N">
                                                   <mutation elseif="1"></mutation>
                                                   <value name="IF0">
                                                     <block type="logic_compare" id="U`Ek.okoo*liXz!A6:1n">
                                                       <field name="OP">EQ</field>
                                                       <value name="A">
                                                         <block type="on_source" id="u3pL;|V?vrj:*1mMIHW-">
                                                           <field name="ATTR">state.val</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <block type="text" id="+x5yQPsGbrFP};}XDZm`">
                                                           <field name="TEXT">longPress</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <statement name="DO0">
                                                     <block type="variables_set" id="TeeqM~uQR#SuLH3?:V?j">
                                                       <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                       <value name="VALUE">
                                                         <block type="logic_boolean" id="llYi+Cqf.bt/).4]RgFz">
                                                           <field name="BOOL">TRUE</field>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="controls_if" id="plZgN4Yex5VRhcw~m=#i">
                                                           <value name="IF0">
                                                             <block type="variables_get" id="S_.HUw,kf_BGrBh@vq-N">
                                                               <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                             </block>
                                                           </value>
                                                           <statement name="DO0">
                                                             <block type="procedures_callnoreturn" id=",b+2?RiSiTW:]fvU7,.6">
                                                               <mutation name="dimm"></mutation>
                                                               <next>
                                                                 <block type="timeouts_setinterval" id=".3yOZ$x;4,sop[Q(rj8#">
                                                                   <field name="NAME">Intervall</field>
                                                                   <field name="INTERVAL">250</field>
                                                                   <field name="UNIT">ms</field>
                                                                   <statement name="STATEMENT">
                                                                     <block type="procedures_callnoreturn" id="ORqY8t}R;isC4Qbus(+^">
                                                                       <mutation name="dimm"></mutation>
                                                                     </block>
                                                                   </statement>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </statement>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </statement>
                                                   <value name="IF1">
                                                     <block type="logic_compare" id="]Qpy/WMCr`s4KVJ6rzFy">
                                                       <field name="OP">EQ</field>
                                                       <value name="A">
                                                         <block type="on_source" id="d7x_Jz;Vq)]BUewMI2,V">
                                                           <field name="ATTR">state.val</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <block type="text" id="G?^{Sxmew@?|%+Yi=k6M">
                                                           <field name="TEXT">released</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <statement name="DO1">
                                                     <block type="controls_if" id="Dir-(XSm)akkXs3-Y^xH">
                                                       <value name="IF0">
                                                         <block type="logic_negate" id="N,HqW]LM,^8!@tY0P)wK">
                                                           <value name="BOOL">
                                                             <block type="variables_get" id=".{q|vn^g`}@9EpN{;zsZ">
                                                               <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <statement name="DO0">
                                                         <block type="variables_set" id="kavv0)K4v54}N7d5#%Wh">
                                                           <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                           <value name="VALUE">
                                                             <block type="logic_negate" id="MLRTGDU_H(l]/XT*C7Lm">
                                                               <value name="BOOL">
                                                                 <block type="variables_get" id="P%y[8YQuNEt=DxcsId6R">
                                                                   <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="control" id="G)M!#H6*^$UaGALg/o7I">
                                                               <mutation delay_input="false"></mutation>
                                                               <field name="OID">Object ID</field>
                                                               <field name="WITH_DELAY">FALSE</field>
                                                               <value name="VALUE">
                                                                 <block type="variables_get" id="A6$J#r_mK_8qjBI_;B1H">
                                                                   <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </statement>
                                                       <next>
                                                         <block type="timeouts_clearinterval" id="R.=w_d*Xk3h6nUuanj51">
                                                           <field name="NAME">Intervall</field>
                                                           <next>
                                                             <block type="variables_set" id="dbYw|pz[1kS)^NPuNqE|">
                                                               <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                               <value name="VALUE">
                                                                 <block type="logic_boolean" id="`A80q|79.cVrAN3@zzkX">
                                                                   <field name="BOOL">FALSE</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </statement>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                             <block type="procedures_defnoreturn" id="0[(od3jtT2]$A1$a$};A" x="162" y="-262">
                               <field name="NAME">dimm</field>
                               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                               <statement name="STACK">
                                 <block type="controls_if" id="861%9(gFxahd?YY!)0Ka">
                                   <mutation elseif="1"></mutation>
                                   <value name="IF0">
                                     <block type="logic_compare" id="^V^q^3:olhNsdqG[~-Y`">
                                       <field name="OP">LT</field>
                                       <value name="A">
                                         <block type="variables_get" id="8+;L.%@1av4=55HGU_sf">
                                           <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="variables_get" id="^9Okp.;5dY(d1m!K=tue">
                                           <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <statement name="DO0">
                                     <block type="variables_set" id="~Vr?MJ]mK`J?N4X3^k*R">
                                       <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                       <value name="VALUE">
                                         <block type="variables_get" id="nmM-j?3J9jlS^jo6{m%p">
                                           <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                         </block>
                                       </value>
                                     </block>
                                   </statement>
                                   <value name="IF1">
                                     <block type="logic_compare" id="9#WV#;tcgI.8%JDo]XU2">
                                       <field name="OP">GT</field>
                                       <value name="A">
                                         <block type="variables_get" id="Pa]1P4~(r!63?+FtKOdH">
                                           <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="math_arithmetic" id="oIIS[{JJ|R#l6]k,0hVj">
                                           <field name="OP">MINUS</field>
                                           <value name="A">
                                             <shadow type="math_number" id="g/2Z{!Q5l+fHg#J?TVw`">
                                               <field name="NUM">100</field>
                                             </shadow>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="xS?V$oTH^x1!k]6u~J]8">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id="#JkJic=;I(Fe:0ejY?Tl">
                                               <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <statement name="DO1">
                                     <block type="variables_set" id="([=`9vqtGU0fg`FZ[hfW">
                                       <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                       <value name="VALUE">
                                         <block type="math_single" id="gY=PcA1=-1M(g}p5;o}G">
                                           <field name="OP">NEG</field>
                                           <value name="NUM">
                                             <shadow type="math_number" id="y-eb+L)K!c]gcF*Z(U73">
                                               <field name="NUM">9</field>
                                             </shadow>
                                             <block type="variables_get" id="!*L$Q2,4^cd+{7,i|3S2">
                                               <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </statement>
                                   <next>
                                     <block type="math_change" id="ay^:v^GMiK8;@C.C{91L">
                                       <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                       <value name="DELTA">
                                         <shadow type="math_number" id=",p-gkt;Nv8#h2}*;XqVf">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="variables_get" id=",-sWWLkN.nZ8!6eXeA{e">
                                           <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="control" id="[Ly(jC0qvD44B2M,`N;q">
                                           <mutation delay_input="false"></mutation>
                                           <field name="OID">Object ID</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="variables_get" id="Zxd5^AHW3x`7Y(^h!Z?{">
                                               <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                             </block>
                                           </value>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                             </block>
                            </xml>
                            

                            AxelF1977 1 Reply Last reply Reply Quote 0
                            • AxelF1977
                              AxelF1977 @paul53 last edited by

                              @paul53 said in Taster press short or long mit blockly:

                              @AxelF1977 sagte:

                              Script für Hue mit Enocean Tastern verwirklicht?

                              Da ich weder Enocean noch Hue besitze, muss ich fragen: Welche Datenpunkte mit welchen Eigenschaften ?

                              Taster mit diesem ?

                              • "pressed" sofort
                              • "longPress" nach 500ms (ebenfalls konfigurierbar)
                              • "released" beim Loslassen.

                              Hue mit getrennten Datenpunkten für Dimmer (level in %) und Ein/Aus (true/false) ?

                              Dann sollte es so funktionieren:

                              Blockly_Dimm_Onocean-Taster.JPG

                              Export:

                              <xml xmlns="http://www.w3.org/1999/xhtml">
                               <variables>
                                 <variable type="" id="#65kx#lf_?,M2b%98!7t">on</variable>
                                 <variable type="" id=".0n)fPPZ0Vnq@(#OkayL">level</variable>
                                 <variable type="" id="LOUNWT3$L)e!L@xYU#}h">step</variable>
                                 <variable type="" id="r@NrZq0IZi*lPW#AYK/Q">delta</variable>
                                 <variable type="" id="R*r}N3kzibH)Apx7BA2q">long</variable>
                                 <variable type="undefined" id="Intervall">Intervall</variable>
                               </variables>
                               <block type="variables_set" id="/o?gK%j6g^7_EnH_0|l2" x="-313" y="-338">
                                 <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                 <value name="VALUE">
                                   <block type="get_value" id="^PoPSnNeaX--`PXyE0rq">
                                     <field name="ATTR">val</field>
                                     <field name="OID">ID auswählen</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="variables_set" id="mBjs]l~k+|EXhuQdommL">
                                     <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                     <value name="VALUE">
                                       <block type="get_value" id="X`JY{Vb._~,oJne_SWOY">
                                         <field name="ATTR">val</field>
                                         <field name="OID">ID auswählen</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="variables_set" id="BZ25)c-VK5Z[3goO6AO@">
                                         <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                         <value name="VALUE">
                                           <block type="math_number" id=";wxnn-=7*b4-c-IMf:=:">
                                             <field name="NUM">5</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="variables_set" id="hkmQYCgF~-Nmujv@FNda">
                                             <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                             <value name="VALUE">
                                               <block type="variables_get" id="YAO5#^ARx;!W+z:(kkCO">
                                                 <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="on_ext" id="9A$Wi*GJ.dRaDpyO`/xI">
                                                 <mutation items="1"></mutation>
                                                 <field name="CONDITION">ne</field>
                                                 <field name="ACK_CONDITION"></field>
                                                 <value name="OID0">
                                                   <shadow type="field_oid" id="/c7pXjT/I+1ho9^BP9Uz">
                                                     <field name="oid">default</field>
                                                   </shadow>
                                                 </value>
                                                 <statement name="STATEMENT">
                                                   <block type="controls_if" id="8oO0{BL}4az$9-8hSj?N">
                                                     <mutation elseif="1"></mutation>
                                                     <value name="IF0">
                                                       <block type="logic_compare" id="U`Ek.okoo*liXz!A6:1n">
                                                         <field name="OP">EQ</field>
                                                         <value name="A">
                                                           <block type="on_source" id="u3pL;|V?vrj:*1mMIHW-">
                                                             <field name="ATTR">state.val</field>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <block type="text" id="+x5yQPsGbrFP};}XDZm`">
                                                             <field name="TEXT">longPress</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <statement name="DO0">
                                                       <block type="variables_set" id="TeeqM~uQR#SuLH3?:V?j">
                                                         <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                         <value name="VALUE">
                                                           <block type="logic_boolean" id="llYi+Cqf.bt/).4]RgFz">
                                                             <field name="BOOL">TRUE</field>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="controls_if" id="plZgN4Yex5VRhcw~m=#i">
                                                             <value name="IF0">
                                                               <block type="variables_get" id="S_.HUw,kf_BGrBh@vq-N">
                                                                 <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                               </block>
                                                             </value>
                                                             <statement name="DO0">
                                                               <block type="procedures_callnoreturn" id=",b+2?RiSiTW:]fvU7,.6">
                                                                 <mutation name="dimm"></mutation>
                                                                 <next>
                                                                   <block type="timeouts_setinterval" id=".3yOZ$x;4,sop[Q(rj8#">
                                                                     <field name="NAME">Intervall</field>
                                                                     <field name="INTERVAL">250</field>
                                                                     <field name="UNIT">ms</field>
                                                                     <statement name="STATEMENT">
                                                                       <block type="procedures_callnoreturn" id="ORqY8t}R;isC4Qbus(+^">
                                                                         <mutation name="dimm"></mutation>
                                                                       </block>
                                                                     </statement>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </statement>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </statement>
                                                     <value name="IF1">
                                                       <block type="logic_compare" id="]Qpy/WMCr`s4KVJ6rzFy">
                                                         <field name="OP">EQ</field>
                                                         <value name="A">
                                                           <block type="on_source" id="d7x_Jz;Vq)]BUewMI2,V">
                                                             <field name="ATTR">state.val</field>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <block type="text" id="G?^{Sxmew@?|%+Yi=k6M">
                                                             <field name="TEXT">released</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <statement name="DO1">
                                                       <block type="controls_if" id="Dir-(XSm)akkXs3-Y^xH">
                                                         <value name="IF0">
                                                           <block type="logic_negate" id="N,HqW]LM,^8!@tY0P)wK">
                                                             <value name="BOOL">
                                                               <block type="variables_get" id=".{q|vn^g`}@9EpN{;zsZ">
                                                                 <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO0">
                                                           <block type="variables_set" id="kavv0)K4v54}N7d5#%Wh">
                                                             <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                             <value name="VALUE">
                                                               <block type="logic_negate" id="MLRTGDU_H(l]/XT*C7Lm">
                                                                 <value name="BOOL">
                                                                   <block type="variables_get" id="P%y[8YQuNEt=DxcsId6R">
                                                                     <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="control" id="G)M!#H6*^$UaGALg/o7I">
                                                                 <mutation delay_input="false"></mutation>
                                                                 <field name="OID">Object ID</field>
                                                                 <field name="WITH_DELAY">FALSE</field>
                                                                 <value name="VALUE">
                                                                   <block type="variables_get" id="A6$J#r_mK_8qjBI_;B1H">
                                                                     <field name="VAR" id="#65kx#lf_?,M2b%98!7t" variabletype="">on</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                         <next>
                                                           <block type="timeouts_clearinterval" id="R.=w_d*Xk3h6nUuanj51">
                                                             <field name="NAME">Intervall</field>
                                                             <next>
                                                               <block type="variables_set" id="dbYw|pz[1kS)^NPuNqE|">
                                                                 <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                                 <value name="VALUE">
                                                                   <block type="logic_boolean" id="`A80q|79.cVrAN3@zzkX">
                                                                     <field name="BOOL">FALSE</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </statement>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                               <block type="procedures_defnoreturn" id="0[(od3jtT2]$A1$a$};A" x="162" y="-262">
                                 <field name="NAME">dimm</field>
                                 <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                 <statement name="STACK">
                                   <block type="controls_if" id="861%9(gFxahd?YY!)0Ka">
                                     <mutation elseif="1"></mutation>
                                     <value name="IF0">
                                       <block type="logic_compare" id="^V^q^3:olhNsdqG[~-Y`">
                                         <field name="OP">LT</field>
                                         <value name="A">
                                           <block type="variables_get" id="8+;L.%@1av4=55HGU_sf">
                                             <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="variables_get" id="^9Okp.;5dY(d1m!K=tue">
                                             <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="variables_set" id="~Vr?MJ]mK`J?N4X3^k*R">
                                         <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                         <value name="VALUE">
                                           <block type="variables_get" id="nmM-j?3J9jlS^jo6{m%p">
                                             <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                     <value name="IF1">
                                       <block type="logic_compare" id="9#WV#;tcgI.8%JDo]XU2">
                                         <field name="OP">GT</field>
                                         <value name="A">
                                           <block type="variables_get" id="Pa]1P4~(r!63?+FtKOdH">
                                             <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_arithmetic" id="oIIS[{JJ|R#l6]k,0hVj">
                                             <field name="OP">MINUS</field>
                                             <value name="A">
                                               <shadow type="math_number" id="g/2Z{!Q5l+fHg#J?TVw`">
                                                 <field name="NUM">100</field>
                                               </shadow>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="xS?V$oTH^x1!k]6u~J]8">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="variables_get" id="#JkJic=;I(Fe:0ejY?Tl">
                                                 <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO1">
                                       <block type="variables_set" id="([=`9vqtGU0fg`FZ[hfW">
                                         <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                         <value name="VALUE">
                                           <block type="math_single" id="gY=PcA1=-1M(g}p5;o}G">
                                             <field name="OP">NEG</field>
                                             <value name="NUM">
                                               <shadow type="math_number" id="y-eb+L)K!c]gcF*Z(U73">
                                                 <field name="NUM">9</field>
                                               </shadow>
                                               <block type="variables_get" id="!*L$Q2,4^cd+{7,i|3S2">
                                                 <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                     <next>
                                       <block type="math_change" id="ay^:v^GMiK8;@C.C{91L">
                                         <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                         <value name="DELTA">
                                           <shadow type="math_number" id=",p-gkt;Nv8#h2}*;XqVf">
                                             <field name="NUM">1</field>
                                           </shadow>
                                           <block type="variables_get" id=",-sWWLkN.nZ8!6eXeA{e">
                                             <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="control" id="[Ly(jC0qvD44B2M,`N;q">
                                             <mutation delay_input="false"></mutation>
                                             <field name="OID">Object ID</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="variables_get" id="Zxd5^AHW3x`7Y(^h!Z?{">
                                                 <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                               </block>
                              </xml>
                              

                              Hallo @paul53, erst vielen Dank für die Rückmeldung und sorry für die späte Antwort. Es gab bei dem Systemumzug erstmal dringender Dinge.

                              Das "Problem" bei den Tastern ist folgendes, die haben nur den Punkt true/false. Ein Klick ist true, ansonsten ist er immer false.
                              Jetzt müsste die Zeit genommen werden zwischen press und release. Es gibt keinen Datenpunkt, der aktiv die Zeit misst die aktuell gedrückt wird. Es kann also erst ausgewertet werden, nach dem Reslease. Also kann das Script erst dann was ausführen, wenn nach release eine definierte Zeit erreicht wurde, und es dann auf true setzen.

                              Daher fiel mir bisher nichts ein, wie ich das umsetzen kann. Wie gesagt, das Script von @AlCalzone scheint eine Lösung zu sein, ich verstehe leider nur nicht, wie ich das auf das Hue System anpassen kann.

                              paul53 1 Reply Last reply Reply Quote 0
                              • paul53
                                paul53 @AxelF1977 last edited by paul53

                                @AxelF1977
                                Aus Deinem ersten Post und Enocean EEP "F6-02-02" entnehme ich, dass 2 Datenpunkte mit folgenden Werten ausgewertet müssen:

                                • buttons: "pressed"/"released"
                                • state: "AI"/"AO"/"BI"/"BO"

                                In folgendem Blockly habe ich versucht, es mal für den linken Taster mit unten = Ein/Heller und oben = Aus/Dunkler umzusetzen.

                                Blockly_temp.JPG

                                <xml xmlns="http://www.w3.org/1999/xhtml">
                                 <variables>
                                   <variable type="" id=".0n)fPPZ0Vnq@(#OkayL">level</variable>
                                   <variable type="" id="LOUNWT3$L)e!L@xYU#}h">step</variable>
                                   <variable type="" id="aJZ]={d,#UG6hNfL+g%q">button</variable>
                                   <variable type="" id="R*r}N3kzibH)Apx7BA2q">long</variable>
                                   <variable type="undefined" id="timeout">timeout</variable>
                                   <variable type="undefined" id="Intervall">Intervall</variable>
                                 </variables>
                                 <block type="variables_set" id="mBjs]l~k+|EXhuQdommL" x="-313" y="-387">
                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                   <value name="VALUE">
                                     <block type="get_value" id="X`JY{Vb._~,oJne_SWOY">
                                       <field name="ATTR">val</field>
                                       <field name="OID">ID auswählen</field>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="variables_set" id="BZ25)c-VK5Z[3goO6AO@">
                                       <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                       <value name="VALUE">
                                         <block type="math_number" id=";wxnn-=7*b4-c-IMf:=:">
                                           <field name="NUM">5</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="comment" id="k5O@A`WZ%=k2SxN%R*eR">
                                           <field name="COMMENT">buttons</field>
                                           <next>
                                             <block type="on_ext" id="9A$Wi*GJ.dRaDpyO`/xI">
                                               <mutation items="1"></mutation>
                                               <field name="CONDITION">ne</field>
                                               <field name="ACK_CONDITION"></field>
                                               <value name="OID0">
                                                 <shadow type="field_oid" id="/c7pXjT/I+1ho9^BP9Uz">
                                                   <field name="oid">default</field>
                                                 </shadow>
                                               </value>
                                               <statement name="STATEMENT">
                                                 <block type="comment" id="SFPLwh*(}(Kp#M1!A4eP">
                                                   <field name="COMMENT">state</field>
                                                   <next>
                                                     <block type="variables_set" id="3Y@{`Rqi;:!uBZE6HAC{">
                                                       <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                                       <value name="VALUE">
                                                         <block type="get_value" id="o_!k7$qI^{Uu,3fqBtxa">
                                                           <field name="ATTR">val</field>
                                                           <field name="OID">ID auswählen</field>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="controls_if" id="NYU/Pb,SKSz:NE:LAw(q">
                                                           <value name="IF0">
                                                             <block type="logic_operation" id="]RwfWq@5C4:qtfLTxO{c" inline="false">
                                                               <field name="OP">OR</field>
                                                               <value name="A">
                                                                 <block type="logic_compare" id=";$:Pq~~iV_qLU:PsE^xj">
                                                                   <field name="OP">EQ</field>
                                                                   <value name="A">
                                                                     <block type="variables_get" id="pw~Re@|,CCBEVg!Bv2/.">
                                                                       <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <block type="text" id="vy..g~!LK/YHx}uZ}oWc">
                                                                       <field name="TEXT">AI</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <block type="logic_compare" id="g5CZG?KG{})M{r+6t?+B">
                                                                   <field name="OP">EQ</field>
                                                                   <value name="A">
                                                                     <block type="variables_get" id="B)aw)!D%yNn`ebVobHR$">
                                                                       <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <block type="text" id="RR$|U4Y$?8bpGN:O@lwP">
                                                                       <field name="TEXT">AO</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <statement name="DO0">
                                                             <block type="controls_if" id="8oO0{BL}4az$9-8hSj?N">
                                                               <mutation else="1"></mutation>
                                                               <value name="IF0">
                                                                 <block type="logic_compare" id="U`Ek.okoo*liXz!A6:1n">
                                                                   <field name="OP">EQ</field>
                                                                   <value name="A">
                                                                     <block type="on_source" id="u3pL;|V?vrj:*1mMIHW-">
                                                                       <field name="ATTR">state.val</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="B">
                                                                     <block type="text" id="+x5yQPsGbrFP};}XDZm`">
                                                                       <field name="TEXT">pressed</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <statement name="DO0">
                                                                 <block type="variables_set" id="dbYw|pz[1kS)^NPuNqE|">
                                                                   <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                                   <value name="VALUE">
                                                                     <block type="logic_boolean" id="`A80q|79.cVrAN3@zzkX">
                                                                       <field name="BOOL">FALSE</field>
                                                                     </block>
                                                                   </value>
                                                                   <next>
                                                                     <block type="timeouts_settimeout" id="c#ncZp7EQ8*QJ=XCRZ8Q">
                                                                       <field name="NAME">timeout</field>
                                                                       <field name="DELAY">500</field>
                                                                       <field name="UNIT">ms</field>
                                                                       <statement name="STATEMENT">
                                                                         <block type="variables_set" id="TeeqM~uQR#SuLH3?:V?j">
                                                                           <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                                           <value name="VALUE">
                                                                             <block type="logic_boolean" id="llYi+Cqf.bt/).4]RgFz">
                                                                               <field name="BOOL">TRUE</field>
                                                                             </block>
                                                                           </value>
                                                                           <next>
                                                                             <block type="procedures_callnoreturn" id=",b+2?RiSiTW:]fvU7,.6">
                                                                               <mutation name="dimm"></mutation>
                                                                               <next>
                                                                                 <block type="timeouts_setinterval" id=".3yOZ$x;4,sop[Q(rj8#">
                                                                                   <field name="NAME">Intervall</field>
                                                                                   <field name="INTERVAL">250</field>
                                                                                   <field name="UNIT">ms</field>
                                                                                   <statement name="STATEMENT">
                                                                                     <block type="procedures_callnoreturn" id="ORqY8t}R;isC4Qbus(+^">
                                                                                       <mutation name="dimm"></mutation>
                                                                                     </block>
                                                                                   </statement>
                                                                                 </block>
                                                                               </next>
                                                                             </block>
                                                                           </next>
                                                                         </block>
                                                                       </statement>
                                                                     </block>
                                                                   </next>
                                                                 </block>
                                                               </statement>
                                                               <statement name="ELSE">
                                                                 <block type="timeouts_cleartimeout" id="Zx?~y{}iOq-zpH-/|j;[">
                                                                   <field name="NAME">timeout</field>
                                                                   <next>
                                                                     <block type="timeouts_clearinterval" id="R.=w_d*Xk3h6nUuanj51">
                                                                       <field name="NAME">Intervall</field>
                                                                       <next>
                                                                         <block type="controls_if" id="Dir-(XSm)akkXs3-Y^xH">
                                                                           <value name="IF0">
                                                                             <block type="logic_negate" id="N,HqW]LM,^8!@tY0P)wK">
                                                                               <value name="BOOL">
                                                                                 <block type="variables_get" id=".{q|vn^g`}@9EpN{;zsZ">
                                                                                   <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                                                 </block>
                                                                               </value>
                                                                             </block>
                                                                           </value>
                                                                           <statement name="DO0">
                                                                             <block type="controls_if" id="5xYRl5SiP[hIkc0Y#$SX">
                                                                               <mutation else="1"></mutation>
                                                                               <value name="IF0">
                                                                                 <block type="logic_compare" id="^Z`rJz{,3Y3X0KiV/{*c">
                                                                                   <field name="OP">EQ</field>
                                                                                   <value name="A">
                                                                                     <block type="variables_get" id="#+G1.)_KAA.,()BR5fi9">
                                                                                       <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                                                                     </block>
                                                                                   </value>
                                                                                   <value name="B">
                                                                                     <block type="text" id="8b5aB90K;p^)|]4SNeb1">
                                                                                       <field name="TEXT">AI</field>
                                                                                     </block>
                                                                                   </value>
                                                                                 </block>
                                                                               </value>
                                                                               <statement name="DO0">
                                                                                 <block type="control" id="G)M!#H6*^$UaGALg/o7I">
                                                                                   <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="ez6BRm7mp)3?IlK5cGn`">
                                                                                       <field name="BOOL">TRUE</field>
                                                                                     </block>
                                                                                   </value>
                                                                                 </block>
                                                                               </statement>
                                                                               <statement name="ELSE">
                                                                                 <block type="control" id="WqEIQ#ivcw}xk$9U@@+U">
                                                                                   <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="3NkgOHvmg$(BpEFe?7V{">
                                                                                       <field name="BOOL">FALSE</field>
                                                                                     </block>
                                                                                   </value>
                                                                                 </block>
                                                                               </statement>
                                                                             </block>
                                                                           </statement>
                                                                         </block>
                                                                       </next>
                                                                     </block>
                                                                   </next>
                                                                 </block>
                                                               </statement>
                                                             </block>
                                                           </statement>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                                 <block type="procedures_defnoreturn" id="0[(od3jtT2]$A1$a$};A" x="188" y="-162">
                                   <field name="NAME">dimm</field>
                                   <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                   <statement name="STACK">
                                     <block type="controls_if" id="861%9(gFxahd?YY!)0Ka">
                                       <mutation else="1"></mutation>
                                       <value name="IF0">
                                         <block type="logic_compare" id="^V^q^3:olhNsdqG[~-Y`">
                                           <field name="OP">EQ</field>
                                           <value name="A">
                                             <block type="variables_get" id="IjY545#gmjS81RsrEpm?">
                                               <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <block type="text" id="V{qg4}N!.d}hDW8eO[_o">
                                               <field name="TEXT">AI</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <statement name="DO0">
                                         <block type="math_change" id="ay^:v^GMiK8;@C.C{91L">
                                           <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                           <value name="DELTA">
                                             <shadow type="math_number" id=",p-gkt;Nv8#h2}*;XqVf">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="variables_get" id="nmM-j?3J9jlS^jo6{m%p">
                                               <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="controls_if" id="%kszP{vBYtCwZ/qzTtSa">
                                               <value name="IF0">
                                                 <block type="logic_compare" id="-.%Q*lZ}FCy~^wP+p[:1">
                                                   <field name="OP">GT</field>
                                                   <value name="A">
                                                     <block type="variables_get" id="UA:CC7Vx~omd?~j2gEKs">
                                                       <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <block type="math_number" id="99D.}K4,`E`IF@EOxgvF">
                                                       <field name="NUM">100</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <statement name="DO0">
                                                 <block type="variables_set" id="v0aJHm1a3E.+HF6~ocI$">
                                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                   <value name="VALUE">
                                                     <block type="math_number" id="EtU#raSrJ7YV0iWJf:5J">
                                                       <field name="NUM">100</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                       <statement name="ELSE">
                                         <block type="math_change" id="Qm~q2oR!?zM%Gay!=IEZ">
                                           <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                           <value name="DELTA">
                                             <shadow type="math_number" id="y~PByj;bM.(9lHWSY(CL">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="math_single" id="gY=PcA1=-1M(g}p5;o}G">
                                               <field name="OP">NEG</field>
                                               <value name="NUM">
                                                 <shadow type="math_number" id="y-eb+L)K!c]gcF*Z(U73">
                                                   <field name="NUM">9</field>
                                                 </shadow>
                                                 <block type="variables_get" id="!*L$Q2,4^cd+{7,i|3S2">
                                                   <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="controls_if" id="beN!nf7!FvW*:[ddES,]">
                                               <value name="IF0">
                                                 <block type="logic_compare" id="79QUCa4(?d3Oot-2GPSk">
                                                   <field name="OP">LT</field>
                                                   <value name="A">
                                                     <block type="variables_get" id="~ZX5X]P$m)=9n4?B@8~-">
                                                       <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <block type="math_number" id="3:t:FbgDD?xLq~RgPObL">
                                                       <field name="NUM">0</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <statement name="DO0">
                                                 <block type="variables_set" id="6-eEI]Ym2;J;X:G_J6rv">
                                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                   <value name="VALUE">
                                                     <block type="math_number" id=")Y-{eso01`GWZ-YsFUf;">
                                                       <field name="NUM">0</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                       <next>
                                         <block type="control" id="[Ly(jC0qvD44B2M,`N;q">
                                           <mutation delay_input="false"></mutation>
                                           <field name="OID">Object ID</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="variables_get" id="Zxd5^AHW3x`7Y(^h!Z?{">
                                               <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                             </block>
                                           </value>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                 </block>
                                </xml>
                                

                                AxelF1977 1 Reply Last reply Reply Quote 0
                                • AxelF1977
                                  AxelF1977 @paul53 last edited by

                                  @paul53 said in Taster press short or long mit blockly:

                                  @AxelF1977
                                  Aus Deinem ersten Post und Enocean EEP "F6-02-02" entnehme ich, dass 2 Datenpunkte mit folgenden Werten ausgewertet müssen:

                                  • buttons: "pressed"/"released"
                                  • state: "AI"/"AO"/"BI"/"BO"

                                  Hi,

                                  Ja, das mit den 2 Datenpunkten verhält sich so.
                                  Ich probiere das heute Abend mal aus, gebe Dir dann eine Rückmeldung. Bin gespannt

                                  Danke!

                                  1 Reply Last reply Reply Quote 0
                                  • AxelF1977
                                    AxelF1977 last edited by

                                    Hallo @paul53

                                    Ich habe gerade mal geschaut. Ich nutze mittlerweile den Enocean Adapter vom ioBroker. Vorher hatte ich es über FHEM eingebunden, da gab es mir Variablen.

                                    Hier leider nicht nicht.

                                    ae72db87-17fd-4487-b609-938326bfae66-image.png

                                    Daher funktioniert Dein Blockly leider nicht. Mann müsste die Zeit, die gedrückt ist messen und in Echtzeit übergeben. Ob das aber geht, weiß ich nicht. Daher scheitere ich seit 2 Jahren an dem Thema.

                                    paul53 1 Reply Last reply Reply Quote 0
                                    • paul53
                                      paul53 @AxelF1977 last edited by paul53

                                      @AxelF1977 sagte:

                                      Ich nutze mittlerweile den Enocean Adapter vom ioBroker.

                                      Das sieht ganz anders aus: 1 Datenpunkt pro Taster. Bleiben die Datenpunkte AO, AI, BO, BI true, solange der zugehörige Taster gedrückt wird ?

                                      AxelF1977 1 Reply Last reply Reply Quote 0
                                      • AxelF1977
                                        AxelF1977 @paul53 last edited by

                                        @paul53 said in Taster press short or long mit blockly:

                                        @AxelF1977 sagte:

                                        Ich nutze mittlerweile den Enocean Adapter vom ioBroker.

                                        Das sieht ganz anders aus: 1 Datenpunkt pro Taster. Bleiben die Datenpunkte AO, AI, BO, BI true, solange der zugehörige Taster gedrückt wird ?

                                        Ja, die bleiben so lange auf true, bis der Taster wieder losgelassen wird. Sorry das Du dir die Mühe gemacht hast, und ich vergesssen hatte, dass der Adapter jetzt weniger Datenpunkte hat

                                        paul53 1 Reply Last reply Reply Quote 0
                                        • paul53
                                          paul53 @AxelF1977 last edited by

                                          @AxelF1977 sagte:

                                          die bleiben so lange auf true, bis der Taster wieder losgelassen wird.

                                          Dann versuche es mal damit für die linken Taster (AI: Ein/Heller; AO: Aus/Dunkler):

                                          Blockly_temp.JPG

                                          <xml xmlns="http://www.w3.org/1999/xhtml">
                                           <variables>
                                             <variable type="" id=".0n)fPPZ0Vnq@(#OkayL">level</variable>
                                             <variable type="" id="aJZ]={d,#UG6hNfL+g%q">button</variable>
                                             <variable type="" id="U0|}x*G;[=9}9Ql;A}WY">ein</variable>
                                             <variable type="" id="LOUNWT3$L)e!L@xYU#}h">step</variable>
                                             <variable type="" id="r@NrZq0IZi*lPW#AYK/Q">delta</variable>
                                             <variable type="" id="R*r}N3kzibH)Apx7BA2q">long</variable>
                                             <variable type="undefined" id="timeout">timeout</variable>
                                             <variable type="undefined" id="Intervall">Intervall</variable>
                                           </variables>
                                           <block type="variables_set" id="mBjs]l~k+|EXhuQdommL" x="-313" y="-387">
                                             <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                             <value name="VALUE">
                                               <block type="get_value" id="X`JY{Vb._~,oJne_SWOY">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">ID auswählen</field>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="variables_set" id="BZ25)c-VK5Z[3goO6AO@">
                                                 <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                 <value name="VALUE">
                                                   <block type="math_number" id=";wxnn-=7*b4-c-IMf:=:">
                                                     <field name="NUM">5</field>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="comment" id="k5O@A`WZ%=k2SxN%R*eR">
                                                     <field name="COMMENT">AI</field>
                                                     <next>
                                                       <block type="on_ext" id="9A$Wi*GJ.dRaDpyO`/xI">
                                                         <mutation items="1"></mutation>
                                                         <field name="CONDITION">ne</field>
                                                         <field name="ACK_CONDITION"></field>
                                                         <value name="OID0">
                                                           <shadow type="field_oid" id="/c7pXjT/I+1ho9^BP9Uz">
                                                             <field name="oid">default</field>
                                                           </shadow>
                                                         </value>
                                                         <statement name="STATEMENT">
                                                           <block type="variables_set" id="@G{{4oK*6TJZL#zVETGB">
                                                             <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                                             <value name="VALUE">
                                                               <block type="variables_get" id="o53B6/DeytPJHbI;Mi7O">
                                                                 <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="procedures_callnoreturn" id="dFHtN~%maUxxB.]?1tcM">
                                                                 <mutation name="licht">
                                                                   <arg name="button"></arg>
                                                                   <arg name="ein"></arg>
                                                                 </mutation>
                                                                 <value name="ARG0">
                                                                   <block type="on_source" id="WE@9|8|/~vvX{OXDYb}[">
                                                                     <field name="ATTR">state.val</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="ARG1">
                                                                   <block type="logic_boolean" id="Yu9B::0if$v]tT:bxB*U">
                                                                     <field name="BOOL">TRUE</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                         <next>
                                                           <block type="comment" id="jSZ/2_c*((aR7,pNt)0y">
                                                             <field name="COMMENT">AO</field>
                                                             <next>
                                                               <block type="on_ext" id="W{d|e4vAl3#[=|KF-G3+">
                                                                 <mutation items="1"></mutation>
                                                                 <field name="CONDITION">ne</field>
                                                                 <field name="ACK_CONDITION"></field>
                                                                 <value name="OID0">
                                                                   <shadow type="field_oid" id="@rAa%8m;](ekf2C:~We8">
                                                                     <field name="oid">default</field>
                                                                   </shadow>
                                                                 </value>
                                                                 <statement name="STATEMENT">
                                                                   <block type="variables_set" id="gc~P[z$.$-v%j:u^XOI)">
                                                                     <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                                                     <value name="VALUE">
                                                                       <block type="math_single" id="j!c[p($INLWaurOn$@GR">
                                                                         <field name="OP">NEG</field>
                                                                         <value name="NUM">
                                                                           <shadow type="math_number" id="J+I;Y,iqn1nqZM15lVe,">
                                                                             <field name="NUM">9</field>
                                                                           </shadow>
                                                                           <block type="variables_get" id="};j080s`b2/m%hM-3JlK">
                                                                             <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </value>
                                                                     <next>
                                                                       <block type="procedures_callnoreturn" id="_vI+=tBli*j-/rK10bmF">
                                                                         <mutation name="licht">
                                                                           <arg name="button"></arg>
                                                                           <arg name="ein"></arg>
                                                                         </mutation>
                                                                         <value name="ARG0">
                                                                           <block type="on_source" id="q-S~S+O0usUFEH29nW-E">
                                                                             <field name="ATTR">state.val</field>
                                                                           </block>
                                                                         </value>
                                                                         <value name="ARG1">
                                                                           <block type="logic_boolean" id="$/j)O2ra|t9)h^$@i$!O">
                                                                             <field name="BOOL">FALSE</field>
                                                                           </block>
                                                                         </value>
                                                                       </block>
                                                                     </next>
                                                                   </block>
                                                                 </statement>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                           <block type="procedures_defnoreturn" id="0[(od3jtT2]$A1$a$};A" x="137" y="-363">
                                             <field name="NAME">dimm</field>
                                             <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                             <statement name="STACK">
                                               <block type="math_change" id="ay^:v^GMiK8;@C.C{91L">
                                                 <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                 <value name="DELTA">
                                                   <shadow type="math_number" id=",p-gkt;Nv8#h2}*;XqVf">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="variables_get" id="-hl/L_),_!x:MXDb=iyJ">
                                                     <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="controls_if" id="%kszP{vBYtCwZ/qzTtSa">
                                                     <value name="IF0">
                                                       <block type="logic_compare" id="-.%Q*lZ}FCy~^wP+p[:1">
                                                         <field name="OP">GT</field>
                                                         <value name="A">
                                                           <block type="variables_get" id="UA:CC7Vx~omd?~j2gEKs">
                                                             <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                           </block>
                                                         </value>
                                                         <value name="B">
                                                           <block type="math_number" id="99D.}K4,`E`IF@EOxgvF">
                                                             <field name="NUM">100</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <statement name="DO0">
                                                       <block type="variables_set" id="v0aJHm1a3E.+HF6~ocI$">
                                                         <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                         <value name="VALUE">
                                                           <block type="math_number" id="EtU#raSrJ7YV0iWJf:5J">
                                                             <field name="NUM">100</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </statement>
                                                     <next>
                                                       <block type="controls_if" id="beN!nf7!FvW*:[ddES,]">
                                                         <value name="IF0">
                                                           <block type="logic_compare" id="79QUCa4(?d3Oot-2GPSk">
                                                             <field name="OP">LT</field>
                                                             <value name="A">
                                                               <block type="variables_get" id="~ZX5X]P$m)=9n4?B@8~-">
                                                                 <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="math_number" id="3:t:FbgDD?xLq~RgPObL">
                                                                 <field name="NUM">0</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO0">
                                                           <block type="variables_set" id="6-eEI]Ym2;J;X:G_J6rv">
                                                             <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                             <value name="VALUE">
                                                               <block type="math_number" id=")Y-{eso01`GWZ-YsFUf;">
                                                                 <field name="NUM">0</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </statement>
                                                         <next>
                                                           <block type="control" id="[Ly(jC0qvD44B2M,`N;q">
                                                             <mutation delay_input="false"></mutation>
                                                             <field name="OID">Object ID</field>
                                                             <field name="WITH_DELAY">FALSE</field>
                                                             <value name="VALUE">
                                                               <block type="variables_get" id="Zxd5^AHW3x`7Y(^h!Z?{">
                                                                 <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </statement>
                                           </block>
                                           <block type="procedures_defnoreturn" id="NWZF^.s##C!,EL2.W.0%" x="137" y="-88">
                                             <mutation>
                                               <arg name="button" varid="aJZ]={d,#UG6hNfL+g%q"></arg>
                                               <arg name="ein" varid="U0|}x*G;[=9}9Ql;A}WY"></arg>
                                             </mutation>
                                             <field name="NAME">licht</field>
                                             <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                             <statement name="STACK">
                                               <block type="controls_if" id="8oO0{BL}4az$9-8hSj?N">
                                                 <mutation else="1"></mutation>
                                                 <value name="IF0">
                                                   <block type="variables_get" id="lYX/%Zr4$W!`HeoKa0|7">
                                                     <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                                   </block>
                                                 </value>
                                                 <statement name="DO0">
                                                   <block type="variables_set" id="dbYw|pz[1kS)^NPuNqE|">
                                                     <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                     <value name="VALUE">
                                                       <block type="logic_boolean" id="`A80q|79.cVrAN3@zzkX">
                                                         <field name="BOOL">FALSE</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="timeouts_settimeout" id="c#ncZp7EQ8*QJ=XCRZ8Q">
                                                         <field name="NAME">timeout</field>
                                                         <field name="DELAY">500</field>
                                                         <field name="UNIT">ms</field>
                                                         <statement name="STATEMENT">
                                                           <block type="variables_set" id="TeeqM~uQR#SuLH3?:V?j">
                                                             <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                             <value name="VALUE">
                                                               <block type="logic_boolean" id="llYi+Cqf.bt/).4]RgFz">
                                                                 <field name="BOOL">TRUE</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="procedures_callnoreturn" id=",b+2?RiSiTW:]fvU7,.6">
                                                                 <mutation name="dimm"></mutation>
                                                                 <next>
                                                                   <block type="timeouts_setinterval" id=".3yOZ$x;4,sop[Q(rj8#">
                                                                     <field name="NAME">Intervall</field>
                                                                     <field name="INTERVAL">250</field>
                                                                     <field name="UNIT">ms</field>
                                                                     <statement name="STATEMENT">
                                                                       <block type="procedures_callnoreturn" id="ORqY8t}R;isC4Qbus(+^">
                                                                         <mutation name="dimm"></mutation>
                                                                       </block>
                                                                     </statement>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                                 <statement name="ELSE">
                                                   <block type="timeouts_cleartimeout" id="Zx?~y{}iOq-zpH-/|j;[">
                                                     <field name="NAME">timeout</field>
                                                     <next>
                                                       <block type="timeouts_clearinterval" id="R.=w_d*Xk3h6nUuanj51">
                                                         <field name="NAME">Intervall</field>
                                                         <next>
                                                           <block type="controls_if" id="Dir-(XSm)akkXs3-Y^xH">
                                                             <value name="IF0">
                                                               <block type="logic_negate" id="N,HqW]LM,^8!@tY0P)wK">
                                                                 <value name="BOOL">
                                                                   <block type="variables_get" id=".{q|vn^g`}@9EpN{;zsZ">
                                                                     <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <statement name="DO0">
                                                               <block type="control" id="G)M!#H6*^$UaGALg/o7I">
                                                                 <mutation delay_input="false"></mutation>
                                                                 <field name="OID">Object ID</field>
                                                                 <field name="WITH_DELAY">FALSE</field>
                                                                 <value name="VALUE">
                                                                   <block type="variables_get" id="WEi5d_diWt-*v)6q.f5R">
                                                                     <field name="VAR" id="U0|}x*G;[=9}9Ql;A}WY" variabletype="">ein</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </statement>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </statement>
                                           </block>
                                          </xml>
                                          

                                          AxelF1977 1 Reply Last reply Reply Quote 1
                                          • AxelF1977
                                            AxelF1977 @paul53 last edited by

                                            @paul53 said in Taster press short or long mit blockly:

                                            @AxelF1977 sagte:

                                            die bleiben so lange auf true, bis der Taster wieder losgelassen wird.

                                            Dann versuche es mal damit für die linken Taster (AI: Ein/Heller; AO: Aus/Dunkler):

                                            Blockly_temp.JPG

                                            <xml xmlns="http://www.w3.org/1999/xhtml">
                                             <variables>
                                               <variable type="" id=".0n)fPPZ0Vnq@(#OkayL">level</variable>
                                               <variable type="" id="aJZ]={d,#UG6hNfL+g%q">button</variable>
                                               <variable type="" id="U0|}x*G;[=9}9Ql;A}WY">ein</variable>
                                               <variable type="" id="LOUNWT3$L)e!L@xYU#}h">step</variable>
                                               <variable type="" id="r@NrZq0IZi*lPW#AYK/Q">delta</variable>
                                               <variable type="" id="R*r}N3kzibH)Apx7BA2q">long</variable>
                                               <variable type="undefined" id="timeout">timeout</variable>
                                               <variable type="undefined" id="Intervall">Intervall</variable>
                                             </variables>
                                             <block type="variables_set" id="mBjs]l~k+|EXhuQdommL" x="-313" y="-387">
                                               <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                               <value name="VALUE">
                                                 <block type="get_value" id="X`JY{Vb._~,oJne_SWOY">
                                                   <field name="ATTR">val</field>
                                                   <field name="OID">ID auswählen</field>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="variables_set" id="BZ25)c-VK5Z[3goO6AO@">
                                                   <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                   <value name="VALUE">
                                                     <block type="math_number" id=";wxnn-=7*b4-c-IMf:=:">
                                                       <field name="NUM">5</field>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="comment" id="k5O@A`WZ%=k2SxN%R*eR">
                                                       <field name="COMMENT">AI</field>
                                                       <next>
                                                         <block type="on_ext" id="9A$Wi*GJ.dRaDpyO`/xI">
                                                           <mutation items="1"></mutation>
                                                           <field name="CONDITION">ne</field>
                                                           <field name="ACK_CONDITION"></field>
                                                           <value name="OID0">
                                                             <shadow type="field_oid" id="/c7pXjT/I+1ho9^BP9Uz">
                                                               <field name="oid">default</field>
                                                             </shadow>
                                                           </value>
                                                           <statement name="STATEMENT">
                                                             <block type="variables_set" id="@G{{4oK*6TJZL#zVETGB">
                                                               <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                                               <value name="VALUE">
                                                                 <block type="variables_get" id="o53B6/DeytPJHbI;Mi7O">
                                                                   <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="procedures_callnoreturn" id="dFHtN~%maUxxB.]?1tcM">
                                                                   <mutation name="licht">
                                                                     <arg name="button"></arg>
                                                                     <arg name="ein"></arg>
                                                                   </mutation>
                                                                   <value name="ARG0">
                                                                     <block type="on_source" id="WE@9|8|/~vvX{OXDYb}[">
                                                                       <field name="ATTR">state.val</field>
                                                                     </block>
                                                                   </value>
                                                                   <value name="ARG1">
                                                                     <block type="logic_boolean" id="Yu9B::0if$v]tT:bxB*U">
                                                                       <field name="BOOL">TRUE</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </statement>
                                                           <next>
                                                             <block type="comment" id="jSZ/2_c*((aR7,pNt)0y">
                                                               <field name="COMMENT">AO</field>
                                                               <next>
                                                                 <block type="on_ext" id="W{d|e4vAl3#[=|KF-G3+">
                                                                   <mutation items="1"></mutation>
                                                                   <field name="CONDITION">ne</field>
                                                                   <field name="ACK_CONDITION"></field>
                                                                   <value name="OID0">
                                                                     <shadow type="field_oid" id="@rAa%8m;](ekf2C:~We8">
                                                                       <field name="oid">default</field>
                                                                     </shadow>
                                                                   </value>
                                                                   <statement name="STATEMENT">
                                                                     <block type="variables_set" id="gc~P[z$.$-v%j:u^XOI)">
                                                                       <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                                                       <value name="VALUE">
                                                                         <block type="math_single" id="j!c[p($INLWaurOn$@GR">
                                                                           <field name="OP">NEG</field>
                                                                           <value name="NUM">
                                                                             <shadow type="math_number" id="J+I;Y,iqn1nqZM15lVe,">
                                                                               <field name="NUM">9</field>
                                                                             </shadow>
                                                                             <block type="variables_get" id="};j080s`b2/m%hM-3JlK">
                                                                               <field name="VAR" id="LOUNWT3$L)e!L@xYU#}h" variabletype="">step</field>
                                                                             </block>
                                                                           </value>
                                                                         </block>
                                                                       </value>
                                                                       <next>
                                                                         <block type="procedures_callnoreturn" id="_vI+=tBli*j-/rK10bmF">
                                                                           <mutation name="licht">
                                                                             <arg name="button"></arg>
                                                                             <arg name="ein"></arg>
                                                                           </mutation>
                                                                           <value name="ARG0">
                                                                             <block type="on_source" id="q-S~S+O0usUFEH29nW-E">
                                                                               <field name="ATTR">state.val</field>
                                                                             </block>
                                                                           </value>
                                                                           <value name="ARG1">
                                                                             <block type="logic_boolean" id="$/j)O2ra|t9)h^$@i$!O">
                                                                               <field name="BOOL">FALSE</field>
                                                                             </block>
                                                                           </value>
                                                                         </block>
                                                                       </next>
                                                                     </block>
                                                                   </statement>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </next>
                                             </block>
                                             <block type="procedures_defnoreturn" id="0[(od3jtT2]$A1$a$};A" x="137" y="-363">
                                               <field name="NAME">dimm</field>
                                               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                               <statement name="STACK">
                                                 <block type="math_change" id="ay^:v^GMiK8;@C.C{91L">
                                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                   <value name="DELTA">
                                                     <shadow type="math_number" id=",p-gkt;Nv8#h2}*;XqVf">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="variables_get" id="-hl/L_),_!x:MXDb=iyJ">
                                                       <field name="VAR" id="r@NrZq0IZi*lPW#AYK/Q" variabletype="">delta</field>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="controls_if" id="%kszP{vBYtCwZ/qzTtSa">
                                                       <value name="IF0">
                                                         <block type="logic_compare" id="-.%Q*lZ}FCy~^wP+p[:1">
                                                           <field name="OP">GT</field>
                                                           <value name="A">
                                                             <block type="variables_get" id="UA:CC7Vx~omd?~j2gEKs">
                                                               <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <block type="math_number" id="99D.}K4,`E`IF@EOxgvF">
                                                               <field name="NUM">100</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <statement name="DO0">
                                                         <block type="variables_set" id="v0aJHm1a3E.+HF6~ocI$">
                                                           <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                           <value name="VALUE">
                                                             <block type="math_number" id="EtU#raSrJ7YV0iWJf:5J">
                                                               <field name="NUM">100</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </statement>
                                                       <next>
                                                         <block type="controls_if" id="beN!nf7!FvW*:[ddES,]">
                                                           <value name="IF0">
                                                             <block type="logic_compare" id="79QUCa4(?d3Oot-2GPSk">
                                                               <field name="OP">LT</field>
                                                               <value name="A">
                                                                 <block type="variables_get" id="~ZX5X]P$m)=9n4?B@8~-">
                                                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                                 </block>
                                                               </value>
                                                               <value name="B">
                                                                 <block type="math_number" id="3:t:FbgDD?xLq~RgPObL">
                                                                   <field name="NUM">0</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <statement name="DO0">
                                                             <block type="variables_set" id="6-eEI]Ym2;J;X:G_J6rv">
                                                               <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                               <value name="VALUE">
                                                                 <block type="math_number" id=")Y-{eso01`GWZ-YsFUf;">
                                                                   <field name="NUM">0</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </statement>
                                                           <next>
                                                             <block type="control" id="[Ly(jC0qvD44B2M,`N;q">
                                                               <mutation delay_input="false"></mutation>
                                                               <field name="OID">Object ID</field>
                                                               <field name="WITH_DELAY">FALSE</field>
                                                               <value name="VALUE">
                                                                 <block type="variables_get" id="Zxd5^AHW3x`7Y(^h!Z?{">
                                                                   <field name="VAR" id=".0n)fPPZ0Vnq@(#OkayL" variabletype="">level</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                             <block type="procedures_defnoreturn" id="NWZF^.s##C!,EL2.W.0%" x="137" y="-88">
                                               <mutation>
                                                 <arg name="button" varid="aJZ]={d,#UG6hNfL+g%q"></arg>
                                                 <arg name="ein" varid="U0|}x*G;[=9}9Ql;A}WY"></arg>
                                               </mutation>
                                               <field name="NAME">licht</field>
                                               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                               <statement name="STACK">
                                                 <block type="controls_if" id="8oO0{BL}4az$9-8hSj?N">
                                                   <mutation else="1"></mutation>
                                                   <value name="IF0">
                                                     <block type="variables_get" id="lYX/%Zr4$W!`HeoKa0|7">
                                                       <field name="VAR" id="aJZ]={d,#UG6hNfL+g%q" variabletype="">button</field>
                                                     </block>
                                                   </value>
                                                   <statement name="DO0">
                                                     <block type="variables_set" id="dbYw|pz[1kS)^NPuNqE|">
                                                       <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                       <value name="VALUE">
                                                         <block type="logic_boolean" id="`A80q|79.cVrAN3@zzkX">
                                                           <field name="BOOL">FALSE</field>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="timeouts_settimeout" id="c#ncZp7EQ8*QJ=XCRZ8Q">
                                                           <field name="NAME">timeout</field>
                                                           <field name="DELAY">500</field>
                                                           <field name="UNIT">ms</field>
                                                           <statement name="STATEMENT">
                                                             <block type="variables_set" id="TeeqM~uQR#SuLH3?:V?j">
                                                               <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                               <value name="VALUE">
                                                                 <block type="logic_boolean" id="llYi+Cqf.bt/).4]RgFz">
                                                                   <field name="BOOL">TRUE</field>
                                                                 </block>
                                                               </value>
                                                               <next>
                                                                 <block type="procedures_callnoreturn" id=",b+2?RiSiTW:]fvU7,.6">
                                                                   <mutation name="dimm"></mutation>
                                                                   <next>
                                                                     <block type="timeouts_setinterval" id=".3yOZ$x;4,sop[Q(rj8#">
                                                                       <field name="NAME">Intervall</field>
                                                                       <field name="INTERVAL">250</field>
                                                                       <field name="UNIT">ms</field>
                                                                       <statement name="STATEMENT">
                                                                         <block type="procedures_callnoreturn" id="ORqY8t}R;isC4Qbus(+^">
                                                                           <mutation name="dimm"></mutation>
                                                                         </block>
                                                                       </statement>
                                                                     </block>
                                                                   </next>
                                                                 </block>
                                                               </next>
                                                             </block>
                                                           </statement>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </statement>
                                                   <statement name="ELSE">
                                                     <block type="timeouts_cleartimeout" id="Zx?~y{}iOq-zpH-/|j;[">
                                                       <field name="NAME">timeout</field>
                                                       <next>
                                                         <block type="timeouts_clearinterval" id="R.=w_d*Xk3h6nUuanj51">
                                                           <field name="NAME">Intervall</field>
                                                           <next>
                                                             <block type="controls_if" id="Dir-(XSm)akkXs3-Y^xH">
                                                               <value name="IF0">
                                                                 <block type="logic_negate" id="N,HqW]LM,^8!@tY0P)wK">
                                                                   <value name="BOOL">
                                                                     <block type="variables_get" id=".{q|vn^g`}@9EpN{;zsZ">
                                                                       <field name="VAR" id="R*r}N3kzibH)Apx7BA2q" variabletype="">long</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </value>
                                                               <statement name="DO0">
                                                                 <block type="control" id="G)M!#H6*^$UaGALg/o7I">
                                                                   <mutation delay_input="false"></mutation>
                                                                   <field name="OID">Object ID</field>
                                                                   <field name="WITH_DELAY">FALSE</field>
                                                                   <value name="VALUE">
                                                                     <block type="variables_get" id="WEi5d_diWt-*v)6q.f5R">
                                                                       <field name="VAR" id="U0|}x*G;[=9}9Ql;A}WY" variabletype="">ein</field>
                                                                     </block>
                                                                   </value>
                                                                 </block>
                                                               </statement>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </statement>
                                                 </block>
                                               </statement>
                                             </block>
                                            </xml>
                                            

                                            Wie krass! Das funktioniert, unglaublich.

                                            Ein wenig zickig ist es noch, nach loslassen der Tasten dimmt er noch weiter hoch oder runter, mal einen Schritt, mal mehrere, ich glaube je nachdem wie lange gedrückt war.

                                            Wo muss ich was ändern, dass er bei langem Drücken nicht so weit runter dimmt, dass das Licht ausgeht, sondern bis max 10%

                                            Ich habe mal die Anordnung der Button geändert, A0 ist oben und AI unten

                                            Sonst scheint das sehr gut zu laufen.
                                            Ich bin mehr als beeindruckt.

                                            55b2f5f7-894a-4422-85a9-2d9302206ae7-image.png

                                            paul53 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            861
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            39
                                            6477
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo