Might be a simple answer but I can’t get this to work.
What I want to do is use a button on a velbus glaspanel button and switch a hue light on and off with the same button.
I know how to use node red to switch on a hue light and change scenes etc. What I cannot get to work is how I use the input of the velbus button and use that as a trigger for the hue action of switching the hue light on and off. When I use the openhab item in node red and use the button as input it just does not register the pressed status of the button.
Anyone did something similar or point me in the right direction?>
(Stuart Hanlon, UK importer of Velbus hardware)
I might be able to assist Mr Verbist…
Have you seen these ??
What you need is a Function node to isolate the Button Events, then query the state of your Hue Lights and act accordingly.
You can have a seperate Flow or DSL rule to change the state of the feedback LEDs dependant on the state of the HUE Thing.
Give me a shout if you need more information… (you’re the one that got me on Slack in the first place)
A pair of DSL rules might look like this
rule "Velbus button to Hue lamp"
Channel "velbus:vmbgp1:xxxxxxx:ch1" triggered PRESSED
if (Hue_Lamp_Switch.state == ON)
rule "Hue Lamp to Velbus feedback"
Item Hue_Lamp_Switch changed
if (triggeringItem.state == ON)