#17766 - 03/16/07 10:36 PM
Sequencing Events....Best Method.
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Hey Guy's,
I have a need to be able to fire off some sequences based on a single press of a button. Its my home theatre system that comprises primarily of TV, DVD & HD Combined, Foxtel (Pay TV), Surround Sound System Reciever and my Projector.
What I would like to do is have one button that when I press it;
- Turns on appliance module A1 (which supplies or doesnt supply power to my projector and screen)
- Turns the tv off via infrared - Turns off the foxtel via infrared - Turns on the DVD & HD and opens the little cd holder part (ready for a DVD to be inserted) via infrared
- Turns on the projector via infrared - Turns on the surround sound reciever and makes sure that the reciever is on DVD6CH via infrared. - After I sort the screen out to be able to go up, down and stop via infrared, I'll need to add the down functionality to it as well.
I've tried something by coding it, but its so unreliable, like it works sometimes and then you try it again and it will miss something out.........ugghhhhhh its shithouse.
After making that work, I'd then need to be able to do it in reverse. If the missus can't work it then, she shouldn't go near my stuff.....lol.
I'd love a better way to code this. Thanks in advance.
Cheer's Sash
|
|
Top
|
|
|
|
#17767 - 03/17/07 01:15 AM
Re: Sequencing Events....Best Method.
[Re: sash18]
|
Dowser
journeyman
Registered: 12/04/06
Posts: 73
Loc: Sweden
|
I usually sends out "important" X10 commands twice to be sure that it gets thru, but I guess that most of the IR-power on/off commands you are sending are the same to turn the device off and on, so that solution would not be really satisfactory for you...
Is there some of these commands that fails more often than the rest? Do you have any method to verify whether the IR-signal is transmitted or not?
|
|
Top
|
|
|
|
#17768 - 03/17/07 05:43 PM
Re: Sequencing Events....Best Method.
[Re: Dowser]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Any other suggestions?
Cheer's Sash
|
|
Top
|
|
|
|
#17770 - 03/18/07 06:02 PM
Re: Sequencing Events....Best Method.
[Re: Guy Lavoie]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Ok, it goes something like this;
IF Touch Object #xyz, Button Leopard is pressed THEN X-10 House A / Unit 1, TURN ON (For power to the Projector & Screen)
THEN Transmit IR Code 1 (For turning the TV off) THEN Transmit IR Code 2 (For turning the Foxtel off) THEN Transmit IR Code 3 (For turning the DVD/HD on) THEN Transmit IR Code 4 (For opeing the DVD/HD disk insert on) THEN Transmit IR Code 5 (For turning the Projector on) THEN Transmit IR Code 6 (For turning the Surround Sound on) THEN Transmit IR Code 7 (For turning the Surround Sound to 6CHDVD)
Then when I hit another touch screen button, all this happens in reverse.
Cheer's Sash
|
|
Top
|
|
|
|
#17771 - 03/18/07 07:01 PM
Re: Sequencing Events....Best Method.
[Re: sash18]
|
Guy Lavoie
Beyond All Hope
   
Registered: 12/21/02
Posts: 6401
Loc: Montreal, QC, Canada
|
If you coded it exactly like that, you will probably find that it will first send all the IR codes, and then turn on the power for the projector and screen. Anytime that both IR and X-10 commands are queued up to be sent, IR commands are sent first. This might be why you are seeing the whole sequence fail, since the power might not be available to the screen and projector (because the X-10 command is not yet sent) when the IR commands are sent. The other possible problem is that some devices require some time before powering them on and sending other commands. So doing things like sending code 3 and then code 4 immediately after might cause code 4 to be missed. Same thing for your codes 6 and 7. If the needed delay is short, you might try staggering the commands so that things are turned on first and then other commands to the same device are sent later in the sequence, such as:
THEN Transmit IR Code 3 (For turning the DVD/HD on) THEN Transmit IR Code 5 (For turning the Projector on) THEN Transmit IR Code 6 (For turning the Surround Sound on) THEN Transmit IR Code 1 (For turning the TV off) THEN Transmit IR Code 2 (For turning the Foxtel off) THEN Transmit IR Code 4 (For opening the DVD/HD disk insert on) THEN Transmit IR Code 7 (For turning the Surround Sound to 6CHDVD)
If that works then fine. If you need more time and/or want to send the X-10 command first too, then a timer is the best way to do this:
IF Touch Object #xyz, Button Leopard is pressed THEN X-10 House A / Unit 1, TURN ON (For power to the Projector & Screen) THEN Timer #1 = 1 (start the timer)
IF Timer #1 becomes > 2 (2 seconds later) THEN Transmit IR Code 3 (For turning the DVD/HD on) THEN Transmit IR Code 5 (For turning the Projector on) THEN Transmit IR Code 6 (For turning the Surround Sound on) THEN Transmit IR Code 1 (For turning the TV off) THEN Transmit IR Code 2 (For turning the Foxtel off)
IF Timer #1 becomes > 5 (3 more seconds later) THEN Transmit IR Code 4 (For opening the DVD/HD disk insert on) THEN Transmit IR Code 7 (For turning the Surround Sound to 6CHDVD) THEN Timer #1 = 0 (stop the timer)
_________________________
"If you don't know what you're doing, do it neatly..."
|
|
Top
|
|
|
|
#17772 - 03/18/07 07:07 PM
Re: Sequencing Events....Best Method.
[Re: Guy Lavoie]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Sweet, I like the idea of using the same timer to make it all happen in a staggered fashion. I think it will work like that and it doesnt use heaps of timers. Thanks, I'll let you know how it goes tonight.
Cheer's Sash
|
|
Top
|
|
|
|
#17773 - 03/18/07 07:24 PM
Re: Sequencing Events....Best Method.
[Re: sash18]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
By the way Guy, I just posted in you IR Blaster (DIY) Thread about making my one work. I'd love some answers there as well. It would make this take a little easier too.
Cheer's Sash
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
1 registered
(kuro)
and 21 anonymous users online.
|
|
2747 Members
19 Forums
3837 Topics
22714 Posts
Max Online: 67 @ 08/16/11 03:08 PM
|
|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
|
|
|
|
|