Philips Hue Button

I get the same values:

13.2.2023, 18:18:20node: debug 45
zigbee2mqtt/Hue Button Eingang : msg : Object
object
topic: "zigbee2mqtt/Hue Button Eingang"
payload: object
action: "press"
battery: 100
linkquality: 184
update: object
state: "idle"
update_available: false
qos: 0
retain: false
_msgid: "6ac4cceac0599eb0"
13.2.2023, 18:18:20node: debug 45
zigbee2mqtt/bridge/logging : msg : Object
object
topic: "zigbee2mqtt/bridge/logging"
payload: object
level: "info"
message: "MQTT publish: topic 'zigbee2mqtt/Hue Button Eingang', payload '{"action":"brightness_step_down","action_step_size":30,"action_transition_time":0.09,"battery":100,"linkquality":188,"update":{"state":"idle"},"update_available":false}'"
qos: 0
retain: false
_msgid: "916b27516f9aa062"
13.2.2023, 18:18:20node: debug 45
zigbee2mqtt/Hue Button Eingang : msg : Object
object
topic: "zigbee2mqtt/Hue Button Eingang"
payload: object
action: "brightness_step_down"
action_step_size: 30
action_transition_time: 0.09
battery: 100
linkquality: 188
update: object
update_available: false
qos: 0
retain: false
_msgid: "c44780ace3f30fd6"

I don't know what to tell you, are you sure it is a philips device and not some other fake device ?
What does zigbee2mqtt tell you in the interface about this device (the "exposes" tab)

fyi, I tried to use the node-red-zigbee nodes when I started with zigbee. That was not successful.
I completely skip it. I am now using the standard node-red mqtt nodes and that works.
As far as I can remember, there were other forum users with the same problem.

1 Like

The main issue is that OP's device is not reporting according to what should be reported.
If you look at the source of the device converter, it does not expose the properties he is receiving from mqtt.

exposes: [e.battery(), e.action(['on', 'off', 'skip_backward', 'skip_forward', 'press', 'hold', 'release'])],

He receives:brightness_step_down

I have now done it this way:
The device sends, as said, 7x step up and then 7x step down.
At the first step up or down it sends action_step_size: 30 and then always 56. = step size: 366. that means 0 = 0% and 366 = 100%
after that i used a range node with the input range 0-366 and output range 0-100.
With this it worked.

I would now use a switch node, so that if brightness is higher than 1 the switch jumps to on.

if you want to dimm up and down with button pressed and released than you might give the attached node a try.....
You should fine tune the intervall and step size to your requirements

[{"id":"48c5808aaf8c39bc","type":"function","z":"f5502e1a8b0461f9","name":"LED Dimmer","func":"let delta = 13;\nlet brightness\n\nif(msg.payload === \"on\"){\n    brightness = context.get('brightness');\n    context.set('myInterval', setInterval(myDimmer, 500));\n    node.warn(\"on\");\n    return null;\n}\nelse if (msg.payload === \"off\"){\n    clearInterval(context.get('myInterval'));\n    context.set('brightness',brightness);\n    return null; \n}\nelse if (msg.payload === \"reset\") {\n    clearInterval(context.get('myInterval'));\n    brightness = 0;\n    context.set('brightness', brightness);\n    node.send({ payload: { \"brightness\": brightness }});\n    return null;\n}\n\n//--------------------------------------------------------------------\n\nfunction myDimmer() {\n    node.warn(brightness);\n    node.send({ payload: { \"brightness\": brightness}});\n    brightness += delta;\n    if (brightness === 364) {\n        delta = -13;\n    }\n    if (brightness === 0) {\n        delta = 13;\n    }\n}\n\n//--------------------------------------------------------------------","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\n  \ncontext.set('brightness',0);\n","finalize":"","libs":[],"x":370,"y":640,"wires":[["a7df9deb1460b059"]]},{"id":"f7dd55a08c6ae087","type":"inject","z":"f5502e1a8b0461f9","name":"press","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":170,"y":600,"wires":[["48c5808aaf8c39bc"]]},{"id":"49b6c29373b19858","type":"inject","z":"f5502e1a8b0461f9","name":"release","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":170,"y":640,"wires":[["48c5808aaf8c39bc"]]},{"id":"b484c0d9eb75194c","type":"inject","z":"f5502e1a8b0461f9","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"1","topic":"","payload":"reset","payloadType":"str","x":170,"y":680,"wires":[["48c5808aaf8c39bc"]]},{"id":"a7df9deb1460b059","type":"debug","z":"f5502e1a8b0461f9","name":"debug 66","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":640,"wires":[]}]