english : doubleclick detection.

Support for our english speaking visitors

Moderator: Co-Administratoren

Antworten
arnoldl
Beiträge: 2
Registriert: 04.10.2011, 20:56

english : doubleclick detection.

Beitrag von arnoldl » 04.10.2011, 21:38

Hello all ,

I'm setting up my homematic system (switches, dimmers , thermo , ccu1).
But i would like to detect a double click on one of my switches.

So 1 click is light on , doubleclick is all lights in living room on.
I made a script comparing the last timestamp to the current one..and calculate the time between.

Code: Alles auswählen

!puts timestamp in var_time_press and compares to last press..if less <5 sec activate doubleclick
var mySysVar = dom.GetObject("var_time_press");
var source = dom.GetObject("$src$");
var timeStamp = source.Timestamp().ToInteger();
var oldTimeStamp = mySysVar.Variable().ToInteger();
var diff=timeStamp-oldTimeStamp;
if (diff<5) {dom.GetObject("BidCos-RF.BidCoS-RF:1.PRESS_SHORT").State(true);}
!write timestamp to system var
mySysVar.Variable(timeStamp);
This works...but only when i keep about 2-3 seconds between key presses.
I would like it to work with a normal doubleclick , like 0.5 sec.
It seems that it takes about 2 seconds before the click is transfered to the ccu..if within this time a second press is done..only one click event is send.

All idea's are welcome.
Thanks.

Greetings , arnold

Benutzeravatar
owagner
(verstorben)
Beiträge: 1193
Registriert: 13.05.2008, 19:49
Danksagung erhalten: 1 Mal

Re: english : doubleclick detection.

Beitrag von owagner » 04.10.2011, 22:38

Just guessing, but I suspect that this might be a rate limit on the sensors side.

Wouldn't a long press be an option for what you are trying to do?

arnoldl
Beiträge: 2
Registriert: 04.10.2011, 20:56

Re: english : doubleclick detection.

Beitrag von arnoldl » 04.10.2011, 22:58

owagner hat geschrieben:Wouldn't a long press be an option for what you are trying to do?
No , this switch is controlling a dimmer..so long press is already brighter/dim...
Wish they just made it a event , just like longpress...

unimatrix
Beiträge: 99
Registriert: 28.02.2011, 15:12
Danksagung erhalten: 1 Mal

Re: english : doubleclick detection.

Beitrag von unimatrix » 05.10.2011, 20:07

I agree. It is a shame that there is no double click function in the sensors...all CCU-side solutions will be not very user friendly (as you said, you need to wait 2 seconds, something I will not explain my wife)

It is also a shame that it is not possible to upgrade the actor/sensor side firmware.

Antworten

Zurück zu „HomeMatic - english“