- Home
- Deutsch
- Skripten / Logik
- Node-Red
- Schalter Träge machen
Schalter Träge machen
-
Ich habe da ein kleines Problem.
Ich habe mehrere Hue Schalter
Die sind In einer Steuerung so eingebunden,
Das die Steuerung auf die Buttons reagiert
Der hue Switch hat vier Button und diese
Schalten wie folgt
Button 1 => 1000 nach 200ms 1002
Button 2 => 2000 nach 200ms 2002
Button 3 => 3000 nach 300ms 3002
Button 4 => 4000 nach 300ms 4002
Dazu werden virtuelle Button geschaltet die dann wiederum die tatsächlichen Geräte schalten.
Die Steuerung reagiert auf den ersten Wert zb 1000
Das Problem ist je nach dem wie man den Button anscheinend drückt werden fehl Zustände geschaltet.
Kann man die Schaltung irgendwie träge machen
Das wirklich bei einmal drücken true schaltet und noch mal drücken false.
Geht das irgendwie !?
Hast du da irgendeine Idee !? @Marc-BergIch habe das anscheinend hinbekommen.
Hab jetzt das abreifen des schalters so eingestellt das alle befehle blockiert werden außer der status ändert sich. Nur die Nodes, das die Bewegungsmelder funktionieren und zb bei widerbewegung eingeschaltet bleiben und das wenn der Staubsaugroboter unterwegs ist also nicht beim laden ist die bewegungsmelder deaktiviert sind.[ { "id": "f40fbc4eb5ac4f7a", "type": "tab", "label": "Küche", "disabled": false, "info": "", "env": [] }, { "id": "a9a291ef92812c32", "type": "junction", "z": "f40fbc4eb5ac4f7a", "x": 1170, "y": 360, "wires": [ [ "138c91dc2bbc1ae3", "8d88b2a94c9ec76d", "687c7e27683f7c5c", "5f54b4987a5f8dd2" ] ] }, { "id": "202c49953d235813", "type": "ioBroker get", "z": "f40fbc4eb5ac4f7a", "name": "Switch 2", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_2", "attrname": "payload", "payloadType": "value", "errOnInvalidState": "nothing", "x": 860, "y": 460, "wires": [ [ "5f856636064395a8" ] ] }, { "id": "5f856636064395a8", "type": "change", "z": "f40fbc4eb5ac4f7a", "name": "toggle", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "$not(payload)\t", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1070, "y": 460, "wires": [ [ "167c3d9534071cfb", "266f45298fe39781" ] ] }, { "id": "167c3d9534071cfb", "type": "ioBroker out", "z": "f40fbc4eb5ac4f7a", "name": "Virtuel Switch 2", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_2", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1320, "y": 520, "wires": [] }, { "id": "f4b15ec716491f99", "type": "ioBroker get", "z": "f40fbc4eb5ac4f7a", "name": "Switch 3", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_3", "attrname": "payload", "payloadType": "value", "errOnInvalidState": "nothing", "x": 860, "y": 580, "wires": [ [ "5c2fda12ba92680a" ] ] }, { "id": "5c2fda12ba92680a", "type": "change", "z": "f40fbc4eb5ac4f7a", "name": "toggle", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "$not(payload)\t", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1070, "y": 580, "wires": [ [ "8be32882ca318f17", "3e09ac32ae810712" ] ] }, { "id": "8be32882ca318f17", "type": "ioBroker out", "z": "f40fbc4eb5ac4f7a", "name": "Virtuel Switch 3", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_3", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1320, "y": 640, "wires": [] }, { "id": "bffd16b00cfde14d", "type": "ioBroker get", "z": "f40fbc4eb5ac4f7a", "name": "Switch 1", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_1", "attrname": "payload", "payloadType": "value", "errOnInvalidState": "nothing", "x": 860, "y": 360, "wires": [ [ "c2ccf4efb123db4a" ] ] }, { "id": "c2ccf4efb123db4a", "type": "change", "z": "f40fbc4eb5ac4f7a", "name": "toggle", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "$not(payload)\t", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1070, "y": 360, "wires": [ [ "a9a291ef92812c32" ] ] }, { "id": "0d321e0ed699fec1", "type": "ioBroker out", "z": "f40fbc4eb5ac4f7a", "name": "U-rechts", "topic": "tuya.0.bfb09eea5dad3699abyrbu.20", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1430, "y": 300, "wires": [] }, { "id": "589ac75a5e32f1d9", "type": "ioBroker out", "z": "f40fbc4eb5ac4f7a", "name": "Küche Decke", "topic": "tuya.0.bfe4af976feb74d845vugp.1", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1450, "y": 180, "wires": [] }, { "id": "492203889ad083cc", "type": "switch", "z": "f40fbc4eb5ac4f7a", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "1002", "vt": "str" }, { "t": "eq", "v": "2002", "vt": "str" }, { "t": "eq", "v": "3002", "vt": "str" }, { "t": "eq", "v": "4002", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 4, "x": 510, "y": 420, "wires": [ [ "f17ddf70f0e3a462" ], [ "18138896535a8b98" ], [ "b060108e3005d932" ], [ "26451af092a50c2a" ] ] }, { "id": "138c91dc2bbc1ae3", "type": "ioBroker out", "z": "f40fbc4eb5ac4f7a", "name": "Virtuel Switch 1", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_1", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1320, "y": 240, "wires": [] }, { "id": "4efde19f0e9d494d", "type": "ioBroker in", "z": "f40fbc4eb5ac4f7a", "name": "Küche Schalter", "attrname": "payload", "topic": "hue.0.Hue_GordonX.Küche_Schalter.buttonevent", "payloadType": "value", "onlyack": "", "func": "rbe", "gap": "", "fireOnStart": "false", "outFormat": "MQTT", "x": 280, "y": 480, "wires": [ [ "492203889ad083cc", "98ee3d8530b8677f" ] ] }, { "id": "438bc9b17aa7b214", "type": "inject", "z": "f40fbc4eb5ac4f7a", "name": "true", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 690, "y": 200, "wires": [ [ "11d0d5994791c71e" ] ] }, { "id": "d3af4698314c7d5a", "type": "inject", "z": "f40fbc4eb5ac4f7a", "name": "false", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 690, "y": 240, "wires": [ [ "11d0d5994791c71e" ] ] }, { "id": "6338bdde647b0666", "type": "ioBroker in", "z": "f40fbc4eb5ac4f7a", "d": true, "name": "Küche Motion", "attrname": "payload", "topic": "hue.0.Küche_Motion_Sensor.presence", "payloadType": "value", "onlyack": "", "func": "all", "gap": "", "fireOnStart": "false", "outFormat": "MQTT", "x": 670, "y": 160, "wires": [ [ "11d0d5994791c71e" ] ] }, { "id": "a9647ec2e5ce71e8", "type": "switch", "z": "f40fbc4eb5ac4f7a", "d": true, "name": "", "property": "Schalter.Küche", "propertyType": "flow", "rules": [ { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 690, "y": 120, "wires": [ [ "1a1e9f9131f7dce9" ] ] }, { "id": "1a1e9f9131f7dce9", "type": "switch", "z": "f40fbc4eb5ac4f7a", "d": true, "name": "Bewegung", "property": "payload", "propertyType": "msg", "rules": [ { "t": "true" }, { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 850, "y": 120, "wires": [ [ "005de2c89f56520f" ], [ "005de2c89f56520f" ] ] }, { "id": "005de2c89f56520f", "type": "trigger", "z": "f40fbc4eb5ac4f7a", "d": true, "name": "", "op1": "", "op2": "false", "op1type": "nul", "op2type": "bool", "duration": "5", "extend": true, "overrideDelay": false, "units": "s", "reset": "true", "bytopic": "all", "topic": "topic", "outputs": 1, "x": 1020, "y": 120, "wires": [ [ "a9a291ef92812c32" ] ] }, { "id": "a258cc2e98284972", "type": "ioBroker get", "z": "f40fbc4eb5ac4f7a", "name": "Switch 4", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_4", "attrname": "payload", "payloadType": "value", "errOnInvalidState": "nothing", "x": 860, "y": 700, "wires": [ [ "7990f93a2f6d4246" ] ] }, { "id": "7990f93a2f6d4246", "type": "change", "z": "f40fbc4eb5ac4f7a", "name": "toggle", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "$not(payload)\t", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1070, "y": 700, "wires": [ [ "bf03dbcaedeac1bf", "974fbea0a2bec958" ] ] }, { "id": "bf03dbcaedeac1bf", "type": "ioBroker out", "z": "f40fbc4eb5ac4f7a", "name": "VSwitch 4", "topic": "0_userdata.0.GordonX-Home.0.Küche.Virtueller_Schalter_4", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1300, "y": 760, "wires": [] }, { "id": "450a86229a268dec", "type": "inject", "z": "f40fbc4eb5ac4f7a", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "str", "x": 150, "y": 420, "wires": [ [ "708b9446e314ce9a" ] ] }, { "id": "ad88b1a4b3ec08b2", "type": "link in", "z": "f40fbc4eb5ac4f7a", "name": "Alexa Switch Küche", "links": [ "ad266b7267edaa39" ], "x": 105, "y": 360, "wires": [ [ "9bfe6974c0049dcc" ] ] }, { "id": "bacc098ce38ea437", "type": "change", "z": "f40fbc4eb5ac4f7a", "name": "on/off", "rules": [ { "t": "change", "p": "payload", "pt": "msg", "from": "on", "fromt": "str", "to": "1002", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 350, "y": 360, "wires": [ [ "492203889ad083cc" ] ] }, { "id": "6c11a065c392ed3d", "type": "debug", "z": "f40fbc4eb5ac4f7a", "name": "debug 6", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1000, "y": 160, "wires": [] }, { "id": "11d0d5994791c71e", "type": "switch", "z": "f40fbc4eb5ac4f7a", "name": "An/Aus", "property": "payload", "propertyType": "msg", "rules": [ { "t": "true" }, { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 840, "y": 200, "wires": [ [ "72dfdab6a962b892", "6c11a065c392ed3d" ], [ "72dfdab6a962b892", "6c11a065c392ed3d" ] ] }, { "id": "72dfdab6a962b892", "type": "trigger", "z": "f40fbc4eb5ac4f7a", "name": "", "op1": "true", "op2": "false", "op1type": "bool", "op2type": "bool", "duration": "10", "extend": true, "overrideDelay": false, "units": "s", "reset": "", "bytopic": "topic", "topic": "topic", "outputs": 1, "x": 1010, "y": 200, "wires": [ [ "a9a291ef92812c32" ] ] }, { "id": "9bfe6974c0049dcc", "type": "amazon-echo-device", "z": "f40fbc4eb5ac4f7a", "name": "Alexa Küche", "topic": "hue.0.Küche_Schalter.buttonevent", "x": 210, "y": 360, "wires": [ [ "bacc098ce38ea437" ] ] }, { "id": "d5ac3ac0172cc081", "type": "hue-bridge-node", "z": "f40fbc4eb5ac4f7a", "name": "", "bridge": "cbd54dbabf6f65be", "autoupdates": true, "skipglobalevents": false, "initevents": false, "x": 290, "y": 540, "wires": [ [ "492203889ad083cc" ] ] }, { "id": "98ee3d8530b8677f", "type": "debug", "z": "f40fbc4eb5ac4f7a", "name": "debug 7", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 500, "y": 500, "wires": [] }, { "id": "de121f3c399ed6d5", "type": "hue-light", "z": "f40fbc4eb5ac4f7a", "name": "Küche Unterschr.Links", "bridge": "cbd54dbabf6f65be", "lightid": "9954a221-26e8-40ab-9732-ad33d14aeb5f", "colornamer": false, "skipevents": false, "initevents": false, "x": 1490, "y": 360, "wires": [ [] ] }, { "id": "708b9446e314ce9a", "type": "trigger", "z": "f40fbc4eb5ac4f7a", "name": "1000/1002", "op1": "1000", "op2": "1002", "op1type": "str", "op2type": "str", "duration": "200", "extend": false, "overrideDelay": false, "units": "ms", "reset": "", "bytopic": "all", "topic": "topic", "outputs": 1, "x": 290, "y": 420, "wires": [ [ "492203889ad083cc", "16cf55ba74054910" ] ] }, { "id": "16cf55ba74054910", "type": "debug", "z": "f40fbc4eb5ac4f7a", "name": "debug 3", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 520, "y": 320, "wires": [] }, { "id": "974fbea0a2bec958", "type": "hue-group", "z": "f40fbc4eb5ac4f7a", "name": "Wohnzimmer", "bridge": "cbd54dbabf6f65be", "groupid": "fea8bacb-2692-4b22-9d97-295a32985af8", "skipevents": false, "initevents": false, "x": 1330, "y": 700, "wires": [ [] ] }, { "id": "8d88b2a94c9ec76d", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "230ms", "pauseType": "delay", "timeout": "230", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 1290, "y": 360, "wires": [ [ "de121f3c399ed6d5" ] ] }, { "id": "3e09ac32ae810712", "type": "hue-scene", "z": "f40fbc4eb5ac4f7a", "name": "Konzentrieren", "bridge": "cbd54dbabf6f65be", "sceneid": "1262fa36-0216-4e90-81f8-2c52082b2829", "x": 1340, "y": 580, "wires": [ [] ] }, { "id": "266f45298fe39781", "type": "hue-scene", "z": "f40fbc4eb5ac4f7a", "name": "warmweiss", "bridge": "cbd54dbabf6f65be", "sceneid": "a48a039f-dc58-44ad-bb81-f6989dd30a2e", "x": 1330, "y": 460, "wires": [ [] ] }, { "id": "687c7e27683f7c5c", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "230ms", "pauseType": "delay", "timeout": "230", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 1290, "y": 300, "wires": [ [ "0d321e0ed699fec1" ] ] }, { "id": "5f54b4987a5f8dd2", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "100ms", "pauseType": "delay", "timeout": "100", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 1290, "y": 180, "wires": [ [ "589ac75a5e32f1d9" ] ] }, { "id": "f17ddf70f0e3a462", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "200ms", "pauseType": "delay", "timeout": "200", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 730, "y": 360, "wires": [ [ "bffd16b00cfde14d" ] ] }, { "id": "b060108e3005d932", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "200ms", "pauseType": "delay", "timeout": "200", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 730, "y": 580, "wires": [ [ "f4b15ec716491f99" ] ] }, { "id": "26451af092a50c2a", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "200ms", "pauseType": "delay", "timeout": "200", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 730, "y": 700, "wires": [ [ "a258cc2e98284972" ] ] }, { "id": "18138896535a8b98", "type": "delay", "z": "f40fbc4eb5ac4f7a", "name": "200ms", "pauseType": "delay", "timeout": "200", "timeoutUnits": "milliseconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 730, "y": 460, "wires": [ [ "202c49953d235813" ] ] }, { "id": "cbd54dbabf6f65be", "type": "hue-bridge", "name": "Hue GordonX", "bridge": "192.168.0.8", "key": "SlfyXwpcaEvRN0d1DU2JrrOlwrm9Debhhm9A4E-d", "worker": "10", "autoupdates": true, "disableupdates": false } ]