mjwwit / node-red-contrib-ikea-tradfri

Node-RED nodes to get updates from and control devices connected to an IKEA TRADFRI gateway
3 stars 3 forks source link

Detecting On-Off Switch/Dimmer #5

Closed DHT-Xavier closed 3 years ago

DHT-Xavier commented 3 years ago

Hi,

I am new to node-red and tradfri. I connected "tradfri monitor" to my gateway and I got a event: "device updated" when I click on a on-off switch/dimmer But seems I cannot identify which button was clicked.

Did I do it in a wrong way?

mjwwit commented 3 years ago

Clicking a button does not necessarily update any state. The button might turn a light on or off, which is a state change reported by the monitor node. I don't think there is a way (currently) to capture the pressing of a button on a switch.

My-Random-Thoughts commented 3 years ago

To hijack this slightly, would this also apply to the remote control device? This has 5 buttons that I was hoping I could detect which one was pushed. It would make a good remote for a music system.

mjwwit commented 3 years ago

Sadly yes. I think this is a limitation of Tradfri, not of this module or the library it uses.