Hi I‘m currently working to configurate my Openhab system for my peha phc home, my buttons, switches and …
How can I detect if the button was hold or not because in the Peha phc language there is a sich option available.
I would be very happy when someone would answer me
OH is event driven, not state driven. So to detect if a button was held down for a period of time you need to trigger a Rule that triggers when the button is pressed that takes a timestamp, again when the button is released and check the timestamp with now to see how long it was pressed. If it’s long enough it’s a long press.
But it’s worth mentioning that OH is not a real time system and this sort of processing can be challenging if the times are too short.