Zigbee led strip dimmer

I am under home assistant supervisor.
I would like to use an ikea control to operate a led strip (cold white and warm white).
here is the equipment I have:
the 2 materials work in zigbee 3.0
Capture103
Capture101
it works well on lovelace to order the led strip


Now I would like to use the command via node red
but i'm stuck

I can turn the LEDs off and on but not use the dimmer function
can you guide me?
here is my flow file

[{"id":"fa18978a796eb012","type":"tab","label":"Ruban_Led_1","disabled":false,"info":"","env":[]},{"id":"73ba28cd20957381","type":"server-state-changed","z":"fa18978a796eb012","name":"Dim_1","server":"d260f8f066987915","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.dim_1_action","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":160,"wires":[["70ad3e454b743922"]]},{"id":"43bcdb20a7a18fa3","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":120,"wires":[]},{"id":"7485a879c6921ea3","type":"api-call-service","z":"fa18978a796eb012","name":"on","server":"2b29bbf7.71aad4","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.led_1"],"data":"{\"color_temp\": 153}\t{\"brightness\": 100}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":120,"wires":[["43bcdb20a7a18fa3"]]},{"id":"70ad3e454b743922","type":"switch","z":"fa18978a796eb012","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"brightness_move_up","vt":"str"},{"t":"eq","v":"brightness_move_down","vt":"str"},{"t":"eq","v":"brightness_stop","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":6,"x":250,"y":160,"wires":[["7485a879c6921ea3"],["dd05bff15b222955"],["51f2ba519ed45c09"],["bd9844d0010aa172"],["e976d9c1fdd518c4"],["69df96857317bedd"]]},{"id":"dd05bff15b222955","type":"api-call-service","z":"fa18978a796eb012","name":"off","server":"2b29bbf7.71aad4","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.led_1"],"data":"{\"color_temp\": 500}\t{\"brightness\": 0}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":180,"wires":[["e928a96108d1bbe9"]]},{"id":"c5ebbb1d14e3ac89","type":"api-call-service","z":"fa18978a796eb012","name":"move-up","server":"2b29bbf7.71aad4","version":5,"debugenabled":true,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.led_1"],"data":"{\"brightness\" : \"msg.payload\"}\t{\"color_temp\": 153}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":840,"y":240,"wires":[["253195375ea2e1d5"]]},{"id":"bd9844d0010aa172","type":"api-call-service","z":"fa18978a796eb012","name":"move-down","server":"2b29bbf7.71aad4","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.led_1"],"data":"{\"color_temp\": 500}\t{\"brightness\": 15}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":300,"wires":[["43e5d3c785b19266"]]},{"id":"e928a96108d1bbe9","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":180,"wires":[]},{"id":"253195375ea2e1d5","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":990,"y":240,"wires":[]},{"id":"43e5d3c785b19266","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":300,"wires":[]},{"id":"7fee78b76ff957c4","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":360,"wires":[]},{"id":"91311549f03d05fe","type":"api-call-service","z":"fa18978a796eb012","name":"brightness_stop","server":"2b29bbf7.71aad4","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.led_1"],"data":"{\"color_temp\": 500}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":360,"wires":[["7fee78b76ff957c4"]]},{"id":"69df96857317bedd","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":480,"wires":[]},{"id":"e976d9c1fdd518c4","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":420,"wires":[]},{"id":"2a812656c8949358","type":"function","z":"fa18978a796eb012","name":"","func":"var brightness = msg.payload;\nbrightness = parseInt(brightness);\nif (brightness < 229) {brightness = brightnees + 25}\nelse {brightnees = 254}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":700,"y":240,"wires":[["c5ebbb1d14e3ac89"]]},{"id":"51f2ba519ed45c09","type":"api-current-state","z":"fa18978a796eb012","name":"state Led_1","server":"d260f8f066987915","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.led_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":240,"wires":[["2a812656c8949358","f76d0a2f4f87bed2"]]},{"id":"f76d0a2f4f87bed2","type":"debug","z":"fa18978a796eb012","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":300,"wires":[]},{"id":"d260f8f066987915","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"},{"id":"2b29bbf7.71aad4","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]

Sorry, can't help via Home Assistant as I don't use it. I control my LED's via MQTT using Node-RED and Zigbee2MQTT.

Oops, sorry that's a Shelly which is controlled directly via MQTT.

No colour setting on this but rather dimming:

ok, thanks, i'll see if it works with mqtt.

Without more details, I'm still stuck. :woozy_face:
if I had an example flow file for dimmer working in zigbee 3.0 it would be easier. :worried:

I achieve this with the zigbee2mqtt.
But then what do I do?


so far it only accepts this:
{"color_temp": 153}{"brightness": 254} for "on"
{"color_temp": 500}{"brightness": 0} for "off"
{"color_temp": X}{"brightness": Y} for X (153>500) Y(0>254)

I send from Node-RED -> MQTT directly using the MQTT-out node. Look on the Zigbee2MQTT website for the commands that are allowed for each Zigbee device.

Simple example with an Ikea Bulb:

You can change the brightness by changing the payload to something like: {"brightness": 100}.

ok i'm testing this now.
Thank you

mqtt-out. that's it?
203
I don't see the msg.payload and msg.topic boxes :roll_eyes:

Or is it further, in server then the message tab??


that's how it is, because it doesn't look like yours. :open_mouth:

I showed you an example from an inject node. That is what you send to the mqtt node.

I think you may find it helpful to take an hour to go through one of the many Node-RED from scratch tutorials/videos so that you get the hang of how data is originated, processed and output and how the different core nodes work along side each other.

ok
I have misunderstood. You must therefore first create an injection node and transmit it to the mqtt-out.
thank you. and I will follow your advice.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.