Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 30 2006 at 11:26 | IP Logged
|
|
|
I have tried various work-arounds for commands issued from PalmPads with some success. These devices send two commands per button press, and I'm trying to filter out the second. This is only a problem for non-X10/Insteon commands.
I have bumped up the delay for the W800 and added code to disable the trigger for a short time after the first press, but these do not always work.
Any other tricks come to mind?
|
Back to Top |
|
|
mustangcoupe Super User
Joined: August 08 2003 Location: United States
Online Status: Offline Posts: 308
|
Posted: May 01 2006 at 22:23 | IP Logged
|
|
|
one might actually trigger on the second pulse.. create a gv or just use a temp variable. and trigger and count the pulses 1,2 then do the action. or trigger on 1 and perofrm an action and add 1 to teh counter then create an one time timed event say 5 seconds later to reset the counter to 0 but if the counter is set to 1 then exit the macro
__________________ Todd Hannemann
HA newbie
PowerHome - UPB - ELK
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 01 2006 at 23:55 | IP Logged
|
|
|
Tony,
Im not sure why this is happening. The "Timeout" setting should keep this from happening because like you say the palmpad and other RF transmitters transmit for a certain amount of time and the W800 and MR26A will report multiple commands received.
Depending upon what you are trying to do and how long you would normally have between two sequential button presses, I would probably do like you're doing and call a macro that does a "ph_disabletrigger", performs the required action, does a "wait" and then does a "ph_enabletrigger".
If the "Timeout" is too large, then you'll miss legitimate sequential button presses (of the same button). The way the code works, is when an incoming command is received, a timer is started. When another incoming command is received, it's compared to the last command. If it's the same command, then the timer is checked to see if it's greater than the timeout. If it's a different command, then the timeout isnt even considered.
Let me know,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 02 2006 at 07:30 | IP Logged
|
|
|
Quote:
I would probably do like you're doing and call a macro that does a "ph_disabletrigger", performs the required action, does a "wait" and then does a "ph_enabletrigger". |
|
|
This is what I do now. I've also found that where I am in the house affects this! Very strange. Here is my disabling line...
Code:
ph_disabletrigger("KT BLINDS CLOSE") + ph_createtimedevent(2, "ph_enabletrigger('KT BLINDS CLOSE')", ph_relativedatetime( today(), .5)) |
|
|
The timed event should work the same as the wait, I would think.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 04 2006 at 07:43 | IP Logged
|
|
|
A little more sleuthing has found that disabling the trigger needs to be done at the start of the macro. The second trigger was happening before it was disabled.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 05 2006 at 00:32 | IP Logged
|
|
|
Dohh!!
I should have caught that. Yes, that makes sense. If the trigger is "Queued", then the action is added to the execution queue and the trigger may be triggered a second (or more) time before the exe queue is processed.
Even though I always tell people to use a trigger style of "Queued", this would be a case where you could use "Immediate" if it's done properly. The main thing with an "Immediate" trigger is that you don't do anything that will take any length of time or call a macro or do anything that will result in sending a command to a controller. Since your formula meets this criteria, you should be safe in using "Immediate" which should solve your problem. Even if the entire formula did not meet the criteria, you could work around it by posting the parts of the formula that does not meet the criteria. An example would be:
Code:
ph_disabletrigger("KT BLINDS CLOSE") + ph_postformula("ph_createtimedevent(2,'ph_enabletrigger(~"KT BLINDS CLOSE~")',ph_relativedatetime(today(),0.5))") |
|
|
In the above example you can see that the disable trigger will fire right away and that the rest of the formula is posted to the execution queue. In this manner, the posted formula could send commands to a controller or call a macro, etc.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 05 2006 at 07:32 | IP Logged
|
|
|
Good info. Thanks!
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: May 07 2006 at 11:14 | IP Logged
|
|
|
Argh! It didn't work when I tried it today!
Trying the immediate approach now...
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 07 2006 at 13:51 | IP Logged
|
|
|
Let me know. That should solve your problem.
Dave.
|
Back to Top |
|
|