I dug further in Openhab and via VelbusLink I made a button ‘All off’ to switch off all lights. Is there a way to refer (via a button in Openhab (HabPanel)) to this channel?
Right now the button is only returning a ‘string’ and no ‘switch’ function in Visual Studio Code.
Thank you Stuart. I’m gonna try this this WE. Will come back to you to report if I have solved this matter. Thanks again and have a great WE yourself!!!
In the meantime I made the change in the rules file referring to the group of lights (gLight) instead of sending a ON or OFF command to each individual lightpoint.
So your solution is miuch shorter and everything works like a charm !!
Thanks for sharing and I hope this could be helpful for other people.
Isn’t there a way to put Openhab examples and other OH matters in a Openhab thread? You just learned me how easy and effective it is to group items together
rule "Alle Lichten ann/uit"
when
Item Lichten_ann_uit received update
then
gLight.sendCommand(Lichten_ann_uit.state) // This will pass whatever state your "Lichten_ann_uit" is in to your gLight item
end
BUT
If you have programmed a series of Velbus Actions between buttons and Velbus outputs, why do you need to monitor it and mirror those actions with openHAB commands.
What I meant by suggesting Groups, was that you can use the Group items within HabPanel / BasicUI/ ClassicUI etc, they behave just like sliders, switches etc
Try adding the gLights switch to your UI and see what happens.
If you use the Default condition for a Group Switch, if ANY of the items it is linked to is ON, the Group will show as ON, but if they are ALL OFF, the group will show as OFF.
You could use this status indicator as a quick way to see in your UI if everything in your house is switched off.
Next useful bit of information.
You can link Switch Groups to Dimmer items, because Dimmers report ON, OFF and %, so the group will react to the ON & OFF states.
Again, I find this all much easier with PaperUI, but hey it’s not everyone’s choice.
@Stef_Coene
Maybe it would be a very good idea to add a new command in the velbus binding:
sendCommand(‘velbus:vmb8pbu:f06bdf10:28:input#CH2L’,‘simulate press_release’)
what do you think ?