Simulating a keypress on the VmbgPod in Openhab

Hi all,

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.

Is there a way to make this working ?

Thanks a lot,

Jona

Hey Jona

This isn’t an option in openHAB2.

The Trigger Channels are ONLY there for use in openHAB2 to trigger stuff like rules or NodeRed flows.

What you can do is link your all off actions to a virtual relay and use that in openHAB2.

(Just remember to create a rule or NodeRed flow to turn it off after a second or so, so that it’s ready for the next user)

Or create a group (switch type) in openHAB2 and simply turn the group off.

This openHAB2 topic asks the same question.

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!!!

Regards, Jona

Hey Stuart,

Made a virtual switch in OH and added a rule. Did it this way…

In the Sitemap I added a default item in the Group ‘Licht’ (Default item =Lichten_aan_uit label=“Alles lampen Aan/uit”) using Visual Studio Code.

afbeelding
Then added in an item file (via Visual Studio Code):

afbeelding
In the Rule file (again via Visual Studio Code):

afbeelding
When I’m starting the OH Basic UI it gives you a general ON/OFF switch doing exactly what it was desinged for.


Hope this helps others with the same problem.

Thanks for your generous help as always!!

Regards Jona

Excellent work.

If you PM me the Items file, I’ll edit it to make use of the Group Switch feature, which will make it even easier.

For example, just add the group in your Items file, then add each item to that group

Group:Switch  Lights       "Grouped Lights"
Switch Office_Light "Kantoor Licht" (Lights) {binding data}
Dimmer Bedroom_Light "Slaapkamer licht" (Lights) {binding data}

I prefer to use PaperUI, but others prefer this text based approach.

Thank you Stuart. In my item file I already grouped the lights, the shutters, temperature, etc…the way you described it. In the item file got:


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.
afbeelding
So your solution is miuch shorter and everything works like a charm !! :wink:

Thanks for sharing and I hope this could be helpful for other people.

Jan

1 Like

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 :blush:

Ummmm yeah…

Wouldn’t that be the whole openHAB2 forum?

You could… Take your rule one step further…

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.

True… :wink: but only OH irelated with Velbus

Will try it this week your suggestion. Thanks for sharing your ideas. Like that we are expanding our horizons… Best regards Jona

1 Like

Hi

Happy new year to everyone :slight_smile:

I’ve created a “dirty” way to send button events into VelServ using NodeRed, after plenty of harvesting from VelbusLink.

The long…g thread post can be found here :

@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 ?

1 Like

@cedricb is the author of the openHAB binding.

Stef

1 Like

Oeps, sorry Stef and Cedric, keep up the good work !

1 Like