I think there are multiple options to implement this:
How I did it as a test:
-Button in “drukknopmodus”, define virtual output “Timer 2s”
-link a new action “Button pressed” to this button
-In the START-condition of this action, also set:
0s “Timer 2s” = ON
1s “Timer 2s” = OFF
-define a virtual output “Button pressed < 2s” and a virtual output “Button pressed >2s”
“Button pressed <2s” -> conditional = true when “Button pressed” = YES and “Timer 2s” = NO
"Button pressed >2s" -> conditional = true when “Button pressed” = NO and “Timer 2s” = YES
Now let NHC message a “notice” or “warning” of your choice when either of those virtual outputs get the status TRUE.
Let openHab intercept these messages and call the functions of your choice.
Not tested yet, but seems an easier way to me:
Short press & long press:
-Button in “drukknopmodus”
-link a new action “Drukknop ingedrukt” to this button, link this action also to smartphone.
-write a rule in openHab, measure the time between “Drukknop ingedrukt” = ON and “Drukknop ingedrukt” = OFF
and call the function of your choise
I also think it should be possible to measure double clicks, 2s presses, 3s presses, etc… with a software “timer” in openHab.
A new router would also require the use of “vlans on mac-base” for keeping my digicorders interactive, and I don’t have the hardware or knowledge to get this done.