Author Topic: Workflow for triple click action  (Read 269 times)

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Workflow for triple click action
« on: January 18, 2018, 03:47:38 am »
Hi guys,

Is it possible to create a workflow that runs an action or scene when a switch is triple clicked? Just like you can do with PLEG. I would like to move this functionality to OpenLuup.

If that's possible, can you show me how?

Thanks!

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #1 on: January 21, 2018, 03:48:13 am »
Nobody got an idea?

If the button is clicked 3/4 times within 5 seconds, I want it to run a scene. I'm new to the workflows so I'm not able to figure it out just yet.

This could be very useful or others too, I think.

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2713
  • Karma: +163/-8
Re: Workflow for triple click action
« Reply #2 on: January 21, 2018, 08:33:06 am »
Nobody got an idea?

If the button is clicked 3/4 times within 5 seconds, I want it to run a scene. I'm new to the workflows so I'm not able to figure it out just yet.

This could be very useful or others too, I think.

it depends what button device you use and if it natively reports double triple clicks or not in its event reporting or variables.
a default way that comes in mind is to use bag variables to count the number of clicks with a wait state and a clicked state which increase the bag variable by one and , from that second state when the limit is reach transition to 3rd state ( tripple click state ) for instance


Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #3 on: January 23, 2018, 02:44:11 am »
Nobody got an idea?

If the button is clicked 3/4 times within 5 seconds, I want it to run a scene. I'm new to the workflows so I'm not able to figure it out just yet.

This could be very useful or others too, I think.

it depends what button device you use and if it natively reports double triple clicks or not in its event reporting or variables.
a default way that comes in mind is to use bag variables to count the number of clicks with a wait state and a clicked state which increase the bag variable by one and , from that second state when the limit is reach transition to 3rd state ( tripple click state ) for instance



Thanks, Amg0! In this case it's a fibaro dimmer. And yes it's reports double click, but not triple click on button 1.

In your example, how can I add that it has to be within 5 seconds? Because else it would be not very usable.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #4 on: February 06, 2018, 05:11:53 am »
Is it even possible to do this with a workflow, amg0? Within the 5 sec I mean.

Offline Almighty

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
Re: Workflow for triple click action
« Reply #5 on: February 06, 2018, 06:49:18 am »
Try this guide http://www.vesternet.com/resources/application-notes/apnt-126.
I tried both approaches and the one without PLEG worked better in my case.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #6 on: February 06, 2018, 09:54:30 am »
Try this guide http://www.vesternet.com/resources/application-notes/apnt-126.
I tried both approaches and the one without PLEG worked better in my case.

Thanks for the link, looks promising! I'm going to try it out.

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2713
  • Karma: +163/-8
Re: Workflow for triple click action
« Reply #7 on: February 06, 2018, 10:18:47 am »
workflow would work the same since you could have different transactions testing a change on LastSceneTime and in the second condition line the value for LastSceneID that you want . then it sends you to the a trippleclick state for instance where you trigger the action you want

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #8 on: February 06, 2018, 12:14:38 pm »
Try this guide http://www.vesternet.com/resources/application-notes/apnt-126.
I tried both approaches and the one without PLEG worked better in my case.

This worked like a charm! It?s even simpler with AltUI, because you can use a watch on LastSceneID instead of using the lua startup code.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #9 on: February 14, 2018, 07:06:37 am »
Ok, I'm back. I'm very happy with the triple click of the dimmer module, but I very much would like the same functionality with a relay switch. I know that module does not have the scene functionality, but I think it should be possible nevertheless.

Any expert having any bright ideas, besides PLEG?

Offline Almighty

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
Re: Workflow for triple click action
« Reply #10 on: February 16, 2018, 06:49:50 am »
I think, that Fibaro Single/Double Switch 2 has the ability to control scenes. I'm replacing one of my older "not 2" double switches to make it work, however I had to send it back under warranty so I was not able to test it yet.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 110
  • Karma: +4/-0
Re: Workflow for triple click action
« Reply #11 on: February 17, 2018, 12:50:58 pm »
I think, that Fibaro Single/Double Switch 2 has the ability to control scenes. I'm replacing one of my older "not 2" double switches to make it work, however I had to send it back under warranty so I was not able to test it yet.

Ok, good to know. Thnx! It seems that I need to buy a new version too then, to make it work.