Your Universal Remote Control Center
RemoteCentral.com
Complete Control by URC Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
MX-980 if/else - would this be correct?
This thread has 6 replies. Displaying all posts.
Post 1 made on Friday February 4, 2011 at 11:07
yardbird
Active Member
Joined:
Posts:
July 2005
538
Just getting into variables. I read a lot of posts here. :)

Working out power state tracking. I have TV, Receiver, and DVD player that get turned on and off. My satellite receiver stays on all the time.

I am thinking of a Master Off that does:

Turn off TV
Set Variable TV_PWR_ON = False
Turn off Receiver
Set Variable RCVR_PWR_ON = False
Turn off DVD
Set Variable DVD_PWR_ON = False

All 3 of the devices have a delay from when you power them on until they're ready to accept commands. So... would this work?
In the example, let's say I start off the "DirecTV" activity something like this...

IF [TV_PWR_ON] = False
   Turn on the TV
   Set variable TV_PWR_ON = True
      IF [RCVR_PWR_ON] = False
        Turn on the Receiver
        Set variable RCVR_PWR_ON = True
     ELSE Turn on the receiver
<-- can you leave the ELSE blank to just go to the next step?
   Delay 7 seconds
ELSE (set receiver and TV inputs appropriately and jump to DirecTV page)

I realize all of the formatting isn't correct as I'm just trying to get the idea of the nested IF/ELSE usage.
I'm trying to eliminate the delay that I have inserted into the TV power on command to give it time to boot up. Same with receiver.  So that when switching between activities.... watching TV over antenna instead of satellite and back again to satellite, I don't get the delay if the units are already on.

Am I on the right track?

thanks,

Panasonic TH42PX60U, Yamaha RX-V667, DirecTV HR24, Sony DVP-NC80V, URC MX-980, PSX-2
OP | Post 2 made on Saturday February 5, 2011 at 07:28
yardbird
Active Member
Joined:
Posts:
July 2005
538
wow... lotta views and no comments. Guess I'll just have to try it and see. :)
Panasonic TH42PX60U, Yamaha RX-V667, DirecTV HR24, Sony DVP-NC80V, URC MX-980, PSX-2
Post 3 made on Saturday February 5, 2011 at 10:12
Joe C5
Founding Member
Joined:
Posts:
May 2002
109
Yes it looks close (the editor does most of the work for you). Just be sure to keep track of those variables so they don't get out of sync. Also, I would send a command to turn on the Sat in case someone turns it off (you have kids?)...
Also, hopefully you are using RF and a MRF-something ??? Folks tend not to point the remote at the devices for long periods...
Example from my M&D's setup I did:

JUMP [Please Wait Macro/Please Wait]
ALIAS [Cable_1/Page4/Power OnMacro]
DELAY [1.0 Second]
ALIAS [TV_1/Page4/power on]
IF [Variable[TV-ON], False]
   DELAY[10.0 Second]
ELSE
   DELAY[1.0 Second]
ALIAS [TV_1/Page8/hdmi1]
VAR[TV_ON = TRUE]
...
JUMP [TV/Page 1]
Post 4 made on Saturday February 5, 2011 at 10:25
Palnews26
Long Time Member
Joined:
Posts:
April 2009
490
That's the idea.
I put my variable states last, after all macros are finished.
I think its easier for me to keep track rather than searching within the macro.

TV OFF
Reciever OFF
DVD OFF
Var: TV ON=False
Reciever ON=False
DVD ON=False

Leaving else blank just goes to the next step or ends it like you say.
Your example is how its done.

I think there is a lack of confidence in this department. Understanding it and explaining it are two different things. A lot of people just aren't sure, and don't want to be picked apart for there answer. Thus no comments I guess.
Start small and add more as you go.
Maybe someone can post a screen shot with a good example.
Good luck.
Instead of asking me why my price is high ask the other guys why they are low.
http://perfectionpluspainting.com
http://roofcleaningbergencounty.com http://powerwashingbergencounty.com
OP | Post 5 made on Saturday February 5, 2011 at 11:12
yardbird
Active Member
Joined:
Posts:
July 2005
538
It's all IR right now. It's basically my wife and me and one grown son (the other is out.... yay!). And the rule is that as long as the delay animation is running, the remote has to be pointed in the general direction of the AV equipment. If something doesn't turn on, hit the Master Off and start over. So they know the master off is kinda like a reset.

We normally come in and hit "DirecTV" and just watch TV. Starting up from everything off, the delay is expected. But lately we've been making more use of other sources like CD/DVD changer, the iPod (now in a PSX-2! Cool!) and if we switch between sources, the delay is just dumb. :)

I'm trying to look at this such that if the TV has a 7 second delay to boot up and the receiver has a 6 second delay to boot up, I just turn them both on and use the 7 second delay and don't stack the delay to 13 seconds.

Thinking further about how we use the system... the TV would never get turned on without the receiver... so I may as well just check the TV and if it's off, turn them both on and use the TV delay (which is the longer of the 2).

The TV would be off if we're listening to CDs, but anything else uses the TV.
So..... now I'm rethinking again. :) Just follow the TV for the most part would simplify things. If the TV needs to be turned on, then it's likely the receiver does too so send ON to both and use the TV's delay.
ok.... this helps ... heheheh
Panasonic TH42PX60U, Yamaha RX-V667, DirecTV HR24, Sony DVP-NC80V, URC MX-980, PSX-2
Post 6 made on Saturday February 5, 2011 at 12:22
kgossen
Super Member
Joined:
Posts:
March 2008
3,026
On February 5, 2011 at 11:12, yardbird said...
Thinking further about how we use the system... the TV would never get turned on without the receiver... so I may as well just check the TV and if it's off, turn them both on and use the TV delay (which is the longer of the 2).

The TV would be off if we're listening to CDs, but anything else uses the TV.
So..... now I'm rethinking again. :) Just follow the TV for the most part would simplify things. If the TV needs to be turned on, then it's likely the receiver does too so send ON to both and use the TV's delay.
ok.... this helps ... heheheh

Exactly!! It will simplifiy every thing and now you only have to track 1 variable.
"Quality isn't expensive, it's Priceless!"
OP | Post 7 made on Sunday February 6, 2011 at 15:01
yardbird
Active Member
Joined:
Posts:
July 2005
538
OK I'm happy.
I modified a couple of round colored glassy buttons to represent the colored buttons on the DirecTV remote, and I'm using variables to track a few power states. I can see where it would be easy to get them out of sync and I'm sure the pros have ways around it, but for a DIYer, I'm happy with how I have it right now.

I appreciate the help as always. :)

Thanks!
Panasonic TH42PX60U, Yamaha RX-V667, DirecTV HR24, Sony DVP-NC80V, URC MX-980, PSX-2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse