Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: PalmPad Doubles Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: April 30 2006 at 11:26 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
mustangcoupe
Super User
Super User
Avatar

Joined: August 08 2003
Location: United States
Online Status: Offline
Posts: 308
Posted: May 01 2006 at 22:23 | IP Logged Quote mustangcoupe

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 View mustangcoupe's Profile Search for other posts by mustangcoupe Visit mustangcoupe's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 01 2006 at 23:55 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 02 2006 at 07:30 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 04 2006 at 07:43 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 05 2006 at 00:32 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 05 2006 at 07:32 | IP Logged Quote TonyNo

Good info. Thanks!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: May 07 2006 at 11:14 | IP Logged Quote TonyNo

Argh! It didn't work when I tried it today!

Trying the immediate approach now...
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 07 2006 at 13:51 | IP Logged Quote dhoward

Let me know. That should solve your problem.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum