Aqara Opple - NodeRed

Hello

perhaps have anyone a small sample to control 2 or 3 light with the Aqara Opple.
i have problem to define the different buttons and the function (press 1x, 2x, 3x, short, long).

thx

Search is your friend
further down in post they have examples

[Zigbee2mqtt] Single click with Aqara Opple, two events in Home Assistant - Configuration / Zigbee - Home Assistant Community (home-assistant.io)

first filter out the remote you are using :

“”[{“id”:“44514fe.732f1b”,“type”:“switch”,“z”:“19d5765b.65e74a”,“name”:“Remote keuze”,“property”:“payload.event.device_ieee”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“00:15:8d:00:01:0f:d2:6d”,“vt”:“str”},{“t”:“eq”,“v”:“00:17:88:01:06:a7:02:5e”,“vt”:“str”},{“t”:“eq”,“v”:“00:17:88:01:10:32:9b:a5”,“vt”:“str”},{“t”:“eq”,“v”:“00:17:88:01:03:ca:ce:45”,“vt”:“str”},{“t”:“eq”,“v”:“04:cf:8c:df:3c:79:81:2f”,“vt”:“str”}],“checkall”:“false”,“repair”:false,“outputs”:5,“x”:320,“y”:140,“wires”:[[“915e86a3.647468”,“79b25655.2e4bb8”],[“d5dc320.ae49cd”],[“6ea0cec.797adb”],[“fb3aafc.ecaf2d”],[“d8698276.9cf3b8”]]},{“id”:“712a1d0a.fc4474”,“type”:“server-events”,“z”:“19d5765b.65e74a”,“name”:“Zha Event”,“server”:“a81f26ce.23aa88”,“version”:1,“event_type”:“zha_event”,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“waitForRunning”:true,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“eventData”}],“x”:60,“y”:140,“wires”:[[“44514fe.732f1b”]]},{“id”:“d8698276.9cf3b8”,“type”:“link out”,“z”:“19d5765b.65e74a”,“name”:“remote overloop 6 knop”,“links”:[“3ca555ea.6e7b6a”],“x”:515,“y”:260,“wires”:[]},{“id”:“a81f26ce.23aa88”,“type”:“server”,“name”:“Home Assistant”,“version”:1,“legacy”:false,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true}]""

then filter out the commands per button :

‘’[{“id”:“3ca555ea.6e7b6a”,“type”:“link in”,“z”:“54bc8a6d.4a4e44”,“name”:"",“links”:[“d8698276.9cf3b8”],“x”:45,“y”:340,“wires”:[[“69b42169.7cd6f8”,“e1f61ee.5013c6”,“646be30d.afd9f4”,“cad1dac1.7bb018”,“5d11e82c.6cf0a”,“2fbed22.9d6842e”]]},{“id”:“69b42169.7cd6f8”,“type”:“switch”,“z”:“54bc8a6d.4a4e44”,“name”:“3 - 1 / 2 / 3 / hold / release”,“property”:“payload.event.command”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“3_single”,“vt”:“str”},{“t”:“eq”,“v”:“3_double”,“vt”:“str”},{“t”:“eq”,“v”:“3_triple”,“vt”:“str”},{“t”:“eq”,“v”:“3_hold”,“vt”:“str”},{“t”:“eq”,“v”:“3_release”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:5,“x”:260,“y”:340,“wires”:[[],[],[],[],[]]},{“id”:“646be30d.afd9f4”,“type”:“switch”,“z”:“54bc8a6d.4a4e44”,“name”:“2 - 1 / 2 / 3 / hold / release”,“property”:“payload.event.command”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“2_single”,“vt”:“str”},{“t”:“eq”,“v”:“2_double”,“vt”:“str”},{“t”:“eq”,“v”:“2_triple”,“vt”:“str”},{“t”:“eq”,“v”:“2_hold”,“vt”:“str”},{“t”:“eq”,“v”:“2_release”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:5,“x”:260,“y”:240,“wires”:[[],[],[],[],[]]},{“id”:“e1f61ee.5013c6”,“type”:“switch”,“z”:“54bc8a6d.4a4e44”,“name”:“1 - 1 / 2 / 3 / hold / release”,“property”:“payload.event.command”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“1_single”,“vt”:“str”},{“t”:“eq”,“v”:“1_double”,“vt”:“str”},{“t”:“eq”,“v”:“1_triple”,“vt”:“str”},{“t”:“eq”,“v”:“1_hold”,“vt”:“str”},{“t”:“eq”,“v”:“1_release”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:5,“x”:260,“y”:140,“wires”:[[],[],[],[],[]]},{“id”:“cad1dac1.7bb018”,“type”:“switch”,“z”:“54bc8a6d.4a4e44”,“name”:“4 - 1 / 2 / 3 / hold / release”,“property”:“payload.event.command”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“4_single”,“vt”:“str”},{“t”:“eq”,“v”:“4_double”,“vt”:“str”},{“t”:“eq”,“v”:“4_triple”,“vt”:“str”},{“t”:“eq”,“v”:“4_hold”,“vt”:“str”},{“t”:“eq”,“v”:“4_release”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:5,“x”:260,“y”:440,“wires”:[[],[],[],[],[]]},{“id”:“5d11e82c.6cf0a”,“type”:“switch”,“z”:“54bc8a6d.4a4e44”,“name”:“5 - 1 / 2 / 3 / hold / release”,“property”:“payload.event.command”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“5_single”,“vt”:“str”},{“t”:“eq”,“v”:“5_double”,“vt”:“str”},{“t”:“eq”,“v”:“5_triple”,“vt”:“str”},{“t”:“eq”,“v”:“5_hold”,“vt”:“str”},{“t”:“eq”,“v”:“5_release”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:5,“x”:260,“y”:540,“wires”:[[],[],[],[],[]]},{“id”:“2fbed22.9d6842e”,“type”:“switch”,“z”:“54bc8a6d.4a4e44”,“name”:“6 - 1 / 2 / 3 / hold / release”,“property”:“payload.event.command”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“6_single”,“vt”:“str”},{“t”:“eq”,“v”:“6_double”,“vt”:“str”},{“t”:“eq”,“v”:“6_triple”,“vt”:“str”},{“t”:“eq”,“v”:“6_hold”,“vt”:“str”},{“t”:“eq”,“v”:“6_release”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:5,“x”:260,“y”:640,“wires”:[[],[],[],[],[]]}]’

1 Like

is this a node red code? cant import it.

i have try this here, but it will not work. if i press a button, the light goes on and a half second later off.
i want to toggle the lights

[{"id":"e34f2df7.ff9ed","type":"tab","label":"Partyraum","disabled":false,"info":""},{"id":"4094bc62.58ae14","type":"trigger-state","z":"e34f2df7.ff9ed","name":"Taster","server":"366a00db.0b1cd","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.partyraum_schalter_action","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":90,"y":100,"wires":[["f0af87b0.d580e8"],[]]},{"id":"6933455a.cfd5ec","type":"api-call-service","z":"e34f2df7.ff9ed","name":"Light on","server":"d635031d.ddc2a","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.partyraum_kicker","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":360,"wires":[[]]},{"id":"5147e0f1.eb25b","type":"toggle","z":"e34f2df7.ff9ed","name":"","onOffTopic":"","onValue":"on","onType":"str","offValue":"off","offType":"str","toggleTopic":"","toggleValue":"","toggleType":"any","passOnOff":"ifChanged","x":520,"y":360,"wires":[["4f591e40.19d1b"]]},{"id":"4f591e40.19d1b","type":"switch","z":"e34f2df7.ff9ed","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":360,"wires":[["6933455a.cfd5ec"],["8366d853.4f0708"]]},{"id":"8366d853.4f0708","type":"api-call-service","z":"e34f2df7.ff9ed","name":"Light off","server":"d635031d.ddc2a","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.partyraum_kicker","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":420,"wires":[[]]},{"id":"1eebbdbc.05b2a2","type":"api-call-service","z":"e34f2df7.ff9ed","name":"Light on","server":"d635031d.ddc2a","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.partyraum_dartscheibe","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":240,"wires":[[]]},{"id":"ed0df7a0.8868a8","type":"toggle","z":"e34f2df7.ff9ed","name":"","onOffTopic":"","onValue":"on","onType":"str","offValue":"off","offType":"str","toggleTopic":"","toggleValue":"","toggleType":"any","passOnOff":"ifChanged","x":520,"y":240,"wires":[["a525b9.bebeaa48"]]},{"id":"a525b9.bebeaa48","type":"switch","z":"e34f2df7.ff9ed","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":240,"wires":[["1eebbdbc.05b2a2"],["48f73ef4.01258"]]},{"id":"48f73ef4.01258","type":"api-call-service","z":"e34f2df7.ff9ed","name":"Light off","server":"d635031d.ddc2a","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.partyraum_dartscheibe","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":300,"wires":[[]]},{"id":"c070fb10.8517c8","type":"api-call-service","z":"e34f2df7.ff9ed","name":"Light on","server":"d635031d.ddc2a","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.partyraum_theke","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":120,"wires":[[]]},{"id":"e8bc70c0.8f263","type":"toggle","z":"e34f2df7.ff9ed","name":"","onOffTopic":"","onValue":"on","onType":"str","offValue":"off","offType":"str","toggleTopic":"","toggleValue":"","toggleType":"any","passOnOff":"ifChanged","x":520,"y":120,"wires":[["db467386.cfcb1"]]},{"id":"f0af87b0.d580e8","type":"switch","z":"e34f2df7.ff9ed","name":"Taster gedrückt","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"button_1_single","vt":"str"},{"t":"eq","v":"button_2_single","vt":"str"},{"t":"eq","v":"button_3_single","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":260,"y":100,"wires":[["e8bc70c0.8f263"],["ed0df7a0.8868a8"],["5147e0f1.eb25b"]]},{"id":"db467386.cfcb1","type":"switch","z":"e34f2df7.ff9ed","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":120,"wires":[["c070fb10.8517c8"],["1f818269.b145ae"]]},{"id":"1f818269.b145ae","type":"api-call-service","z":"e34f2df7.ff9ed","name":"Light off","server":"d635031d.ddc2a","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.partyraum_theke","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":860,"y":180,"wires":[[]]},{"id":"d7a791bd.79454","type":"comment","z":"e34f2df7.ff9ed","name":"Theke","info":"","x":510,"y":80,"wires":[]},{"id":"d6166876.7ca918","type":"comment","z":"e34f2df7.ff9ed","name":"Dart","info":"","x":510,"y":200,"wires":[]},{"id":"63237717.d107e8","type":"comment","z":"e34f2df7.ff9ed","name":"Kicker","info":"","x":510,"y":320,"wires":[]},{"id":"366a00db.0b1cd","type":"server","name":"Home Assistant"},{"id":"d635031d.ddc2a","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]