Openhab & Virtual Buttons

Hi

Anyone an idea on how to control virtual buttons from a rule in Openhab? I want to send PRESSED or LONG_PRESSED to a virtual button in order to start a set of actions in VELBUS.

Hi

Which version of openHAB are you using?

The more recent version of the Velbus binding provides channel for all buttons.

Which you can send commands to, just like any other items.

Hi
OpenHAB 4.0.2
How should the button be added? I tried several setting, but not successful so far.
The Thing VMB2PBN appears online.
Should button be added under “channels” as an input, or a button?
Is ItemType a “Contact”, “String"or “Switch”?
With"Contact”, I can send a PRESSED or LONG_PRESSED, but then I get:a communication error:

Hi
I got it working:
Item added as channel type string:

label: M15 SlpkAchterBoven Virtuele Knop 2
type: String
category: Switch
groupNames: []
groupType: None
function: null
tags:
  - Point

Example rule (pressed virtual button when HUE sensor detects motion):

configuration: {}
triggers:
  - id: "3"
    configuration:
      itemName: Hue_outdoor_motion_sensor_1_Beweging
      state: ON
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: VMB2PBN_M15_SlpkAchterBoven_Virtuele_knop_2
      command: PRESSED
    type: core.ItemCommandAction
1 Like

Congratulations :confetti_ball:

I’m delighted that it’s all working for you.