Button click and release

Hi
iam new in using Openhab, so iam faced with a lot of basic problems.

  • Platform information:
    • Hardware: RPI3
    • OS: Raspbean 10
    • Java Runtime Environment: 1.8.0_152
    • openHAB version: 2.5.10

Hardware
Digtal output (Beckhoff EL2008)
Digital Input (Beckhoff EL1008)
Switch Relay Eltako s12-100-24
Relay get also an Signal by a Hardware Pushbutton

Iam able to controll my Outputs by a “Switch”
I can read the Input.
But a simple switch is not usable for me.

What´s my goal:
A click on the Hardware Button should change the my output as long as i stay pressed
In Openhab i want the “same” as long i Click on my “switch” (maybee i have to use different item), the “switch” should get ON.

For better understanding of my goal see the picture.

Thanks for Help

So you want the hardware switch to toggle.

The item state is the state of the switch of the same item. So you will need to use the dummy item.

What do you want to happen when the software switch is on and you have the hardware switch turned on?

hi Thanks for your answer.
could you explane how a dummy item works, iam not familiar with that.
iam familiar with Siemens/Beckhoff/B&R/Omron PLC world.

to your question
What do you want to happen when the software switch is on and you have the hardware switch turned on?
it changed nothing. only first rising edge changed to ON last falling edge changed to OFF

By dummy switch I just mean another memory register to hold a value.

VAL 1 Hardware switch
VAL 2 Software switch

In openhab you can control the same bit/item using different inputs or bindings.

So if you use 2 items you can reference them in rules

Thanks for your help.
The status is now correct.
But i run maybe in one of the simpelst errors.
how can i build a rule for this:
input1 = output1
i feel like an idiot for this question.