Premise UPB Handling a Double Click

Motorola Premise

Shinyshoes

Member
I have some SAI UPB switches in my house and I am struggling to figure out how to handle an event.  Specifically, I would like to write a script when a doubleclick event occurs on the up button.  Can anyone help?
 
Thanks in advance.
 
Shinyshoes
 
Considering this is the Premise forum, I would guess a Premise script :)
 
I wish I had an answer for you...
 
I'm not a Premise user, so I can't address it from that standpoint, but a double click on a UPB device is really no different than a single click - they both transmit a link ID.  What you want to listen for is the link ID programmed to the switch for the double click action.
 
yes, I indeed meant a premise script. :D
 
JonW, thanks for that, I may have to poke around in the driver code to see if I can catch the linkid on the way in.
 
If anyone else could elaborate from a Premise prospective I would really appreaciate it.
 
I had completely forgotten that thread.  I still use a 4-button +paddle switch in the bedroom to trigger scenes.  Like the All-Off button.  The wife loves that one.  Go to bed, press the button.  Everything shuts off.
 
Sam, so you are using the logic diagram described in that thread?  I think it would work great for multi-button wall plates but doesn't help me for distinguishing between a click and a double click on a standard US11.
 
Any thoughts?
 
Yes I am.  If you recreate that bl;ock, you'll see (if I remember correctly) what codes are spit out of the switch for the different buttons.  I would think you would see a different code for single versus double click.  Haven't tried it.
 
And just to be clear, I am talking about the upbNetworkData field.  That changes depending on which button is pressed.  If you click the top and then the bottom, you will see 2 different codes there.  Then try a double click and see if it is different than the up click alone.
 
Unfortunatly no, the double click and single click networkdata is the same.  Looks like I may have to dig into the driver to get that kind of info.....
 
Shiny,
 
I had a similar issue, I ended up using what I call a "slow double tap".  Basically, I run Homeseer.  In there I have an event that captures a switch or link status SET.  Not a CHANGE.  Then, if you say, tap the switch OFF, wait 1-2 seconds for the link data to get transmitted, then tap OFF again, Homeseer catches BOTH and then executes what I want it to.  I choose a switch or link depending on if I want ALL switches on that link, or only 1 switch to be monitored.
 
I'd share the code, but think it might be useless for you (Homeseer uses VB).  If you want it, I'll post it.
 
Anyway, the logic is:
Create an event to capture the device to be monitored.
Have that event trigger a script call.
 
The monitor function script logic is:
 
if (is double tap) then
perform action
else
do something else, or nothing
end if
 
The Is double function logic is:
if(the variable does not exist)
set variable with now
return false
elseif(now is greater than 5 seconds past set time)
set variable with now
return false
else
return true
end if
 
 
So, this way, at the first call, you either SET the time or create a new variable to hold "now" and return false.  If the time is less than 5 seconds then assume you wanted a slow double tap.
I am working on a triple tap as well, but this is proving difficult as different vintages of switches respond differently...and right now, sometimes I have to triple tap to get a double tap function to work.  Might just be a bug in my actual code for all I know.  :)
 
--Dan
 
Shinyshoes said:
Unfortunatly no, the double click and single click networkdata is the same.  Looks like I may have to dig into the driver to get that kind of info.....
Do you have the same link ID assigned to both single and double click in Upstart?
 
Back
Top