I use Conbee with a whole bunch of different products but I avoid doing anything more than pairing them in Deconz because I can’t do everything I want there. When I did some things in Deconz and other things in Node-RED I messed it up a bit so now I have everything in Node-RED.
Unfortunately, I have not been able to get Ikea’s ON/OFF to work as a dimmer with Node-RED.
As most other Deconz-conected devices, they send the following switch-code.
x00x where the first x stands for which button, and the second how to press.
x001 = hold
x002 = short release
x003 = long release
However, Philips and Ikea send these signals in completely different ways.
If I hold a Philips dimmer button it periodically sends x001 until released. This I managed to alter so it worked for me, using a Node-RED flow I found in this forum.
The flow.
[{"id":"9facf14f.949cd","type":"link in","z":"25f83860.c3ecb8","name":"Matbord","links":["366c4da0.2c0f92"],"x":101.25000143051147,"y":259.00000381469727,"wires":[["cd93bf66.c4be"]]},{"id":"40f69bf6.032934","type":"function","z":"25f83860.c3ecb8","name":"Read Bri","func":"var x = flow.get('bright');\n\nif(x <= 255){\n msg.payload = x;\n return[msg,null];\n}\nif(x > 255){\n msg.payload = x;\n return[null,msg];\n}","outputs":2,"noerr":0,"x":797.5000152587891,"y":252.75000381469727,"wires":[["8f897ca2.1769c"],[]]},{"id":"8f897ca2.1769c","type":"function","z":"25f83860.c3ecb8","name":"Brightness up","func":"var brightness = msg.payload;\n\nif(brightness >= 0){\n brightness = brightness + 20; \n\t}\n\t\nif(brightness >= 255){\n brightness = 254;\n flow.set('bright',brightness);\n flow.set('press', false);\n }\n\nmsg.payload = {\n \"bright\": brightness,\n };\n\tmsg.feedback = brightness;\n\tflow.set('bright',brightness);\nreturn msg;","outputs":1,"noerr":0,"x":983.7500228881836,"y":265.25000381469727,"wires":[["e43ee241.76045","86f14c4e.96ba4"]]},{"id":"5e77eb22.b25fe4","type":"api-current-state","z":"25f83860.c3ecb8","name":"Get state","server":"7b1bd4ef.8503ec","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.matsal","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610.0000152587891,"y":187.75001335144043,"wires":[["9ae44a96.9a87a8"]]},{"id":"9ae44a96.9a87a8","type":"function","z":"25f83860.c3ecb8","name":"Flow Set Brightness","func":"var bright = msg.data.attributes.brightness;\nflow.set('bright',bright);\nmsg.payload = bright;\nreturn msg;","outputs":1,"noerr":0,"x":881.2500152587891,"y":191.50000190734863,"wires":[[]]},{"id":"e43ee241.76045","type":"api-call-service","z":"25f83860.c3ecb8","name":"Light","server":"7b1bd4ef.8503ec","version":1,"service_domain":"light","service":"turn_on","entityId":"light.matsal","data":"{\"brightness\":\"{{payload.bright}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1186.250015258789,"y":277.75000762939453,"wires":[[]]},{"id":"cd93bf66.c4be","type":"switch","z":"25f83860.c3ecb8","name":"Matsal","property":"payload.event.event","propertyType":"msg","rules":[{"t":"eq","v":"1001","vt":"str"},{"t":"eq","v":"1002","vt":"str"},{"t":"eq","v":"2001","vt":"str"},{"t":"eq","v":"2002","vt":"str"},{"t":"eq","v":"3001","vt":"str"},{"t":"eq","v":"3002","vt":"str"},{"t":"eq","v":"4001","vt":"str"},{"t":"eq","v":"4002","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":198.75,"y":258.5,"wires":[[],["52d1d33e.04258c"],["5e77eb22.b25fe4","b28d47a5.dbd288"],[],["5e77eb22.b25fe4","2cbbcb5a.2dd334"],[],[],["51c672b3.6cccbc"]]},{"id":"c00cc7d3.830f58","type":"function","z":"25f83860.c3ecb8","name":"Read Bri","func":"var x = flow.get('bright');\n\nif(x <= 1){\n msg.payload = x;\n return[msg,null];\n}\nif(x > 0){\n msg.payload = x;\n return[null,msg];\n}","outputs":2,"noerr":0,"x":798.7500152587891,"y":301.50000381469727,"wires":[[],["624fd2e0.3f094c"]]},{"id":"624fd2e0.3f094c","type":"function","z":"25f83860.c3ecb8","name":"Brightness down","func":"var brightness = msg.payload;\n\nif(brightness <= 255){\n brightness = brightness - 20; \n\t}\n\t\nif(brightness <= 0){\n brightness = 1;\n flow.set('bright',brightness);\n flow.set('press', false);\n }\n\nmsg.payload = {\n \"bright\": brightness,\n };\n\tmsg.feedback = brightness;\n\tflow.set('bright',brightness);\nreturn msg;","outputs":1,"noerr":0,"x":982.5000228881836,"y":305.2500047683716,"wires":[["e43ee241.76045","8df8a227.9f369"]]},{"id":"6d66519e.dcc5","type":"delay","z":"25f83860.c3ecb8","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":808.7500152587891,"y":361.50000381469727,"wires":[["b26911ff.cf5cb"]]},{"id":"20cf8460.ab319c","type":"delay","z":"25f83860.c3ecb8","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":808.75,"y":404.5,"wires":[["2c076b7e.1767d4"]]},{"id":"b26911ff.cf5cb","type":"switch","z":"25f83860.c3ecb8","name":"Control loop","property":"press","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":973.7500152587891,"y":361.50000381469727,"wires":[["8f897ca2.1769c"]]},{"id":"2c076b7e.1767d4","type":"switch","z":"25f83860.c3ecb8","name":"Control loop","property":"press","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":973.7500152587891,"y":391.50000381469727,"wires":[["624fd2e0.3f094c"]]},{"id":"8df8a227.9f369","type":"change","z":"25f83860.c3ecb8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"feedback","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":623.7500152587891,"y":391.50000381469727,"wires":[["20cf8460.ab319c"]]},{"id":"86f14c4e.96ba4","type":"change","z":"25f83860.c3ecb8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"feedback","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":623.7500152587891,"y":361.50000381469727,"wires":[["6d66519e.dcc5"]]},{"id":"51c672b3.6cccbc","type":"api-call-service","z":"25f83860.c3ecb8","name":"Light off","server":"7b1bd4ef.8503ec","version":1,"service_domain":"light","service":"turn_off","entityId":"light.matsal","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":370.50001525878906,"y":368.2500057220459,"wires":[[]]},{"id":"52d1d33e.04258c","type":"api-call-service","z":"25f83860.c3ecb8","name":"Light on","server":"7b1bd4ef.8503ec","version":1,"service_domain":"light","service":"turn_on","entityId":"light.matsal","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":357.25000381469727,"y":156.25000190734863,"wires":[[]]},{"id":"b28d47a5.dbd288","type":"delay","z":"25f83860.c3ecb8","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":587.5,"y":247.5,"wires":[["40f69bf6.032934"]]},{"id":"2cbbcb5a.2dd334","type":"delay","z":"25f83860.c3ecb8","name":"","pauseType":"delay","timeout":"50","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":575.5,"y":295.5,"wires":[["c00cc7d3.830f58"]]},{"id":"7b1bd4ef.8503ec","type":"server","z":"","name":"hass.io","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
Ikea ON / OFF works a little different, it sends x001 only once, and then x003 when the button is released.
My coding skills are not good enough to modify the Node-RED flow to work with Ikea ON / OFF.
Is there anyone who can help me with this?