JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

macro questions
Goto page 1, 2  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Extenders
View previous topic :: View next topic  
Author Message
just4fn



Joined: 23 Nov 2003
Posts: 199

                    
PostPosted: Sat Nov 29, 2003 3:03 am    Post subject: macro questions Reply with quote

I have a 2117 remote and have a couple of macro and keymove questions

1. How do I make a macro global vs. device specific or visa versa?

2. Can macros be within macros?

3. Can phantom keys be made into a macro themselves and then put in a macro?

4. Can keymoves be made global?

I have tried the extender route and I am taking a break- my brain is starting to hurt.

I have tried the above with no success and I just dont know how to do #1, at least if it can be done. Thanks for your help, Doug

Sorry, I just noticed this post is in the extender area and not the beginner- It can be moved if necc- thanks
_________________
thanks, just4fn


Last edited by just4fn on Sat Nov 29, 2003 4:08 am; edited 2 times in total
Back to top
View user's profile Send private message
usblipitor



Joined: 10 Oct 2003
Posts: 516
Location: Greenbelt, MD

                    
PostPosted: Sat Nov 29, 2003 3:18 am    Post subject: Re: macro questions Reply with quote

just4fn wrote:
How do I make a macro global vs. device specific or visa versa?
Doug,
The experts may know a better way, but in the Special Protocols folder at yahoo-JP1 is a Device Specific Macro protocol.

May the force be with you.
_________________
-Steve
Beginner's Guide
CodeSearchFAQ
JP1Files
Back to top
View user's profile Send private message
vasqued2
Expert


Joined: 03 Aug 2003
Posts: 67

                    
PostPosted: Sat Nov 29, 2003 6:58 am    Post subject: Reply with quote

What were you still having problems with on the extender? When I looked at your dump, it looked like as soon as you changed your Power Macro from 'Power = DEV_TV; Power' to 'Power = DEV_TV; Shift-Power' to stop the recursion, it would have worked.

In any event, here are the answers to your questions:

Quote:
1. How do I make a macro global vs. device specific or visa versa?


Use the Device Specific Macro special protocol as described above.

Quote:
2. Can macros be within macros?


Only when using an Extender.

Quote:
3. Can phantom keys be made into a macro themselves and then put in a macro?


Since this would be a special case of #2, you can only do it w/ an Extender too.

Quote:
4. Can keymoves be made global?


No. Keymoves are device specific, macros are global. You would simply create a Macro with a length of 1, which could reference a Phantom key.

Generally, the best way to learn is to try. You won't break anything if you try to create nested macros w/ IR. They just won't work.

Good luck! I hope you get things working the way you want. Of course I'm a little partial to the Extender. Smile

David
Back to top
View user's profile Send private message
johnsfine
Site Admin


Joined: 10 Aug 2003
Posts: 4766
Location: Bedford, MA

                    
PostPosted: Sat Nov 29, 2003 8:09 am    Post subject: Reply with quote

vasqued2 wrote:

Quote:
4. Can keymoves be made global?


No. Keymoves are device specific, macros are global. You would simply create a Macro with a length of 1, which could reference a Phantom key.


You'd need an extender and macro of length 2, because you need the first command of the macro to do a temporary switch to the device mode in which the keymove is bound to that phantom key.

Read the documentation for that specific extender to find out how to do temporary device mode switches. IIRC in the extender discussed in this thread a temporary device mode switch is the first step of a non temporary device mode switch, you just leave out the second step.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
just4fn



Joined: 23 Nov 2003
Posts: 199

                    
PostPosted: Sat Nov 29, 2003 11:31 am    Post subject: Reply with quote

ok, I tried the extender again. And I put in the line just like you said. power = dev_tv; shifted power- and it works- it turns on the tv. I tried it 1st without the shifted power and it doesnt turn on the TV This is the big hurdle I am having. Before the extender, it was logical how to make a macro. With the extender I dont understand Why it would need in your example, shifted power at the end? I need to understand the format or why the keys are in the order they are to make my macros work. I have read the documentation, I must be missing something- my brain hurts- thanks, Doug

I just went back and read the post after my letter of my remote dump. I now think I understand why the power works with shifted power, but why shift-power? How would I have known to use that key? Why not any other key like 1 instead of shift power to stop? Do these keys have special powers?

Could you give me an example to turn the tv on and change the channel to channel 3 and the device to SAT? This may be a big help if I can understand the example- Thanks , Doug
_________________
thanks, just4fn
Back to top
View user's profile Send private message
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Sat Nov 29, 2003 11:59 am    Post subject: Reply with quote

just4fn wrote:
but why shift-power?

While I'm not very familiar with the 2116/2117 extender, I believe it uses the concept of "shift cloaking". In your example, the remote looks for a Key Move on the TV device (or a Macro) for Shift-Power. When it doesn't find one, it invokes the Power function from the TV setup code.

Quote:
Could you give me an example to turn the tv on and change the channel to channel 3 and the device to SAT?

That would look something like:

power = dev_tv; shift-power; 0; 0; 3; dev_sat

That enables the TV device, sends Shift-Power (using the actual TV setup code Power function), sends "003" to the TV (the macro is still in TV mode; you could use "0; 3" if your TV uses 2-digit channel selection, or "0; 3; Enter" if it doesn't), and finally sets the active device to SAT. Subsequent key presses will be for the SAT device.
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sfhub



Joined: 12 Oct 2003
Posts: 287

                    
PostPosted: Sat Nov 29, 2003 1:22 pm    Post subject: Reply with quote

Mark Pierson wrote:
power = dev_tv; shift-power; 0; 0; 3; dev_sat
...
and finally sets the active device to SAT. Subsequent key presses will be for the SAT device.

I was under the impression DEV_SAT just set the active device to SAT
within the macro and if you wanted the buttons bound, you'd need to
call a bunch fo SET_[TRANS|VOL|ETC]_KEYS, which would mean
appending Phantom1 after DEV_SAT (unless Phantom1 had been changed
or removed from the default)

power = dev_tv; shift-power; 0; 0; 3; dev_sat; phantom1
Back to top
View user's profile Send private message
johnsfine
Site Admin


Joined: 10 Aug 2003
Posts: 4766
Location: Bedford, MA

                    
PostPosted: Sat Nov 29, 2003 1:26 pm    Post subject: Reply with quote

Most TV's aren't ready for another command right after they turn on, so the macro Mark suggested probably won't work. You need to add some sort of delay after you send the command to turn the TV on and before the command to change the channel.

It's worth trying Mark's way first (there may be some TV's on which it would work). If it fails, you need to experiment with added delay to see how much your TV needs.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Sat Nov 29, 2003 2:18 pm    Post subject: Reply with quote

sfhub wrote:
I was under the impression DEV_SAT just set the active device to SAT within the macro and if you wanted the buttons bound, you'd need to call a bunch fo SET_[TRANS|VOL|ETC]_KEYS

You may be right since I've never used the extender myself. If that's indeed how it operates, and your phantom1 is setup to do those steps, then what you suggest should work.
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vasqued2
Expert


Joined: 03 Aug 2003
Posts: 67

                    
PostPosted: Sat Nov 29, 2003 3:18 pm    Post subject: Reply with quote

You will have to add the SET_xxx_KEYS at the end of the macro after the DEV_SAT command.

As long as you haven't changed the definition of the macro on phantom1 from what you posted above, you can add the phantom1 to the end of the macro to set all of the keys to DEV_SAT.

Now, an explanation of what is happening...

First, why didn't the macro work when I used the Power button in it?

Unlike an unextended remote which protects you from doing bad things, an extender gives you a lot of freedom- enough to hang yourself with. Unfortunately that is what you did.

As you've found out, an unextended remote doesn't allow you to use nested macros. An extended remote does.

So when you set up a macro on the Power key = DEV_TV; Power. The first thing the extender did was process the DEV_TV command and set the mode to TV. Then it went to process the Power button. When it started to process it, it essentially said, "Hey, there's a macro defined for the Power button, let me process that." At which point it processed the DEV_TV again and then went to process the Power button in the macro. At which point it said, "Hey, there's a macro defined for the Power button, let me process it", and you get the idea. Essentially, it just kept looping and never stopped.*

Your mistake is pretty common w/ extenders and it's easy to make. You have to be very careful with how you set up your macros or you can easily get into these types of loops.

So your next question is why do I use the Shift-Power?

Obviously, based on the above, you can't use the Power key. So your first option would be to create a Keymove for Power, put it on another button (or a phantom button), and reference that in your macro. A second option is to use what is called shift-cloaking. With shift cloaking, if you have a macro or keymove assigned to a shifted version of a button, it will perform whatever macro or keymove is assigned. If there isn't a keymove or macro assigned, the extender will perform the function associated w/ that unshifted-button w/o looking for keymove or macro first. So, in the example above, it would look for a keymove and macro on the Shift-Power button, not find any, and then process the unshifted-Power button. Thus avoiding the looping problem above.

Overall, macros behave a process the same as an unextended remote, you just have to be careful not to create loops that you can't get out of.

David


* OK, it really would stop eventually, but for this purpose it's easiest to think of it as looping forever.[/quote]
Back to top
View user's profile Send private message
sfhub



Joined: 12 Oct 2003
Posts: 287

                    
PostPosted: Sat Nov 29, 2003 4:15 pm    Post subject: Reply with quote

vasqued2 wrote:
Of course I'm a little partial to the Extender. Smile

You should be proud, 2116ex2 is an awesome extender. Smile
Back to top
View user's profile Send private message
just4fn



Joined: 23 Nov 2003
Posts: 199

                    
PostPosted: Sat Nov 29, 2003 7:47 pm    Post subject: Reply with quote

Ok, I just about have the remote how I want it. I put phantom 1 at the end of DEV_SAT to make the remote change to my sat device. I noticed the vpt wasnt working so I made a phantom key without set_vol_keys and inserted it in place of phantom 1 at the end of the macro. All is good.
I was having alot of trouble because I had assinged phantom keys in km.exe in the tv and a couple of other choices that I think was playing havoc with the remote.

My next challenge will be to assign proper lcd names on the remote.
Thanks for the help, Doug

P.S. My wife thinks I'm crazy spending all this time on a remote. but I find it challenging and like a puzzle.
_________________
thanks, just4fn
Back to top
View user's profile Send private message
Mark Pierson
Expert


Joined: 03 Aug 2003
Posts: 3017
Location: Connecticut, USA

                    
PostPosted: Sat Nov 29, 2003 8:06 pm    Post subject: Reply with quote

just4fn wrote:
P.S. My wife thinks I'm crazy spending all this time on a remote.

Welcome to the club! 8)
_________________
Mark
Back to top
View user's profile Send private message Send e-mail Visit poster's website
usblipitor



Joined: 10 Oct 2003
Posts: 516
Location: Greenbelt, MD

                    
PostPosted: Sat Nov 29, 2003 8:15 pm    Post subject: Reply with quote

just4fn wrote:
My next challenge will be to assign proper lcd names on the remote.
How does one do this again? In the .rdf file there is a section called [DeviceButtons] .. does one just edit the file and change the name VCR to TiVo (or RePlayTV) ? How many letters can one use?
_________________
-Steve
Beginner's Guide
CodeSearchFAQ
JP1Files
Back to top
View user's profile Send private message
sfhub



Joined: 12 Oct 2003
Posts: 287

                    
PostPosted: Sat Nov 29, 2003 10:16 pm    Post subject: Reply with quote

usblipitor wrote:
just4fn wrote:
My next challenge will be to assign proper lcd names on the remote.
How does one do this again? In the .rdf file there is a section called [DeviceButtons] .. does one just edit the file and change the name VCR to TiVo (or RePlayTV) ? How many letters can one use?

The extender comes with a special protocol to set the LCD.

You invoke the special protocol by defining a keymove for a placeholder
device which uses the special protocol. The hex data for the keymove
defines what the LCD screen should display.

You can do 5 chars on line1 and 4 chars on line2 of the LCD.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Extenders All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

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


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control