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

Input selection state engine
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Beginners
View previous topic :: View next topic  
Author Message
unclemiltie
Expert


Joined: 21 Jan 2004
Posts: 1795
Location: Pittsburgh, PA

                    
PostPosted: Sat Apr 16, 2011 4:34 pm    Post subject: Reply with quote

vickyg2003 wrote:


Hmm, you found an entry point that doesn't follow the built in LKMS key order? Or you search for both at once?

The standard in all the remotes I've found has always been the Learned keys are searched first, the Keymoves are searched second, the Macros are searched third, the setup is searched 4th with the Unshifted Setup key is searched fifth. I've kept that order in all my extenders.


My extenders (URC9960B01, URC6960 and all of the JP1.3 remotes) don't use the built-in search routines and implement their own search for the advance codes for the key pressed. If it finds the key, then:

1: it checks to see if it is a macro, if it is, it is executed
2: it checks to see if it is a keymove, if it is , the current device is checked and if the same, the keymove is executed
3: it checks to see if it is a FAV, if it is, the FAVdevice is loaded and the FAV is processed.

So, once it finds a Macro on the key, nothing else is searched. If there is a keymove "behind" the macro, it will be ignored.
_________________
this JP1 stuff is a sickness!
Back to top
View user's profile Send private message
Anthony_Patrick



Joined: 13 Oct 2006
Posts: 104
Location: Burnaby, Canada

                    
PostPosted: Sat Apr 16, 2011 5:20 pm    Post subject: Reply with quote

Sorry for the confusion, I should have been referring to device specific macros (ie: DSMs / LKPs / DKPs) in my prior posts in this thread rather than referring to these as keymoves (which they are really not). Indeed "both" types of macros are checked for a "fit" before any "keymoves are checked. I'll go back and edit my posts accordingly.

The behavior I am seeing on the extender for my Comcast 1167 JP1.3 is that it executes the "first fit" macro that it finds before checking for keymoves and then checking for upgrades. If a device specific macro precedes the non-specific macro as stored within the remote's memory it will execute the DSM / ToadTog / LKP / DKP before it finds the non-specific macro. This is a very useful behavior and I have made many good uses of it.

... Tony
Back to top
View user's profile Send private message
pH7_jp1



Joined: 14 Sep 2003
Posts: 480
Location: Sterling Heights, MI

                    
PostPosted: Sat Apr 16, 2011 7:00 pm    Post subject: Reply with quote

Once I thought I might need to solve this problem, but I found the CH+, CH- would put my Insignia into the Antenna mode.

If that had not worked, the next possibility I intended to investigate was to see if it were possible to write a special protocol that could calculate the number of input change commands and issue them. I never even got far enough to investigate the issues. Is is possible for a special protocol to maybe use 3 of the toadtog bits to track the current state? Other than storage of the current state, I think the rest is possible.
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Sat Apr 16, 2011 9:07 pm    Post subject: Reply with quote

unclemiltie wrote:
vickyg2003 wrote:


Hmm, you found an entry point that doesn't follow the built in LKMS key order? Or you search for both at once?

The standard in all the remotes I've found has always been the Learned keys are searched first, the Keymoves are searched second, the Macros are searched third, the setup is searched 4th with the Unshifted Setup key is searched fifth. I've kept that order in all my extenders.


My extenders (URC9960B01, URC6960 and all of the JP1.3 remotes) don't use the built-in search routines and implement their own search for the advance codes for the key pressed. If it finds the key, then:

1: it checks to see if it is a macro, if it is, it is executed
2: it checks to see if it is a keymove, if it is , the current device is checked and if the same, the keymove is executed
3: it checks to see if it is a FAV, if it is, the FAVdevice is loaded and the FAV is processed.

So, once it finds a Macro on the key, nothing else is searched. If there is a keymove "behind" the macro, it will be ignored.


I guess it would be a lot faster not to have to search the kemove macro area 2x.

So does IR give you some way to specify the macros last? I never thought about that because none of the extenders I've used have processed data in that order. But I would certainly want the order to be keymove before macro.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
Anthony_Patrick



Joined: 13 Oct 2006
Posts: 104
Location: Burnaby, Canada

                    
PostPosted: Sat Apr 16, 2011 10:32 pm    Post subject: Reply with quote

IR 8.03 has an option on the "Advanced Menu" to prioritize macros. When you select this, IR sorts the non-device-specific macros ahead of the device specific macros (ie: ahead of the simple DSMs, ToadTogs, LKPs, DKPs). I tried this once and it "broke" all my remote programming; I can't imagine any reason to use this.

In any case, I would argue against searching for keymoves before searching for device specific macros, this would break many things. Most keymoves are "inserted" by KM or RM when mapping keys to functions. The ability to program a device specific macro (ie: simple DSM, ToadTog DSM, LKP DSM, DKP DSM) to intercept a keypress and then using a shift cloak to "press" the underlying key is a very powerful technique to get the remote to control a system of multiple devices.

The best type of search would be from most specific to least specific searching for potential overrides first. IE:

1. Device specific macros (simple DSMs, ToadTogs, LKPs, DKPs)
2. Device specific keymoves
3. "Non device specific" macros (the old vanilla UEI style of Macro)
4. Fav
5. Upgrade setup devices
6. Internal UEI setup devices

The current extenders seem to switch 2 and 3 - probably so the macro area doesn't have to be searched twice. I think this is better than switching 1 and 2 which would make programming the remote for a system of devices almost impossible. Most of my DSMs intercept the keypress, do what they need to do, and then do a shift-function (shift cloaking) to "press" the underlying key and I don't need to worry if the underlying key was set by a keymove, an upgrade, or is simply builtin.

... Tony
Back to top
View user's profile Send private message
Anthony_Patrick



Joined: 13 Oct 2006
Posts: 104
Location: Burnaby, Canada

                    
PostPosted: Sat Apr 16, 2011 11:45 pm    Post subject: Reply with quote

Based on the suggestions that I received from all you kind folks, I have worked out a mechanism that I think may work which uses toadtogs to track and switch the input states of my TV (going back to my very original post on this thread). Details follow - please tell me if I am totally "out-to-lunch" or if this is a sensible approach:

1. Assign one toadtog bit for every state to be tracked. The "on" toadtog is used to identify the "active" input state.

2. Assign four families of keypresses to track and toggle states and to send the actual IR commands.

3. Assign the four keypresses for every toadtog bit (or state to be tracked) as follows:

3.1 Keypress is: shift-<number> on device=TV which means "Switch TV to Input <number>"
3.1.1 underlying toadtog is ForceOn(bit<number>)
3.1.2 if originally off do:<family 2 keypress for input <number+1>> to start search for previous input state.
3.1.3 if originally on do: nothing (the correct input state is already setup)

3.2 Keypress is: <family 2 keypress for input <n>> device=TV which is used to search for the previous input state.
3.2.1 underlying toadtog is TestOnly(bit<n>)
3.2.2 if off: <family 2 keypress for input <n+1>> to continue searching for previous input state
3.2.3 if on do: <family 3 keypress for input <n>>

3.3 Keypress is: <family 3 keypress for input <n>> device=TV which is used to deactivate previous input state.
3.3.1 underlying toadtog is ForceOff(bit<n>))
3.3.2 if originally off: nothing (this should never happen but if it does the processing simply stops)
3.3.3 if originally on: <switch to this device and send keypresses (such as discrete power-off) to deactive this input>, <switch back to TV>, <send family 4 keypress for input<n>>

3.4 Keypress is: <family 4 keypress for input <n>> device=TV which is used to send "next video-input" IR command to TV until selected input state is reached
3.4.1 underlying toadtog is TestOnly(bit<n>))
3.4.2 if originally off: <next video-input keypress>, <pause keypress>, <family 4 keypress for input<n+1>>
3.4.3 if originally on: <switch to this device and send keypresses (such as discrete power-on) to activate this input> (end of processing)


My assumption is that the new toadtog state is set before any of the toadtog selected keypresses are executed. Can someone verify this?

This technique requires that one of the toadtogs must initially be switched on otherwise it goes into a loop. Something like shift-0 could be used to set a default state (toadtog bit) for the TV tuner input without doing anything else. The remote can synchronized to whatever TV input happens to be active by cupping your hand over the IR transmitter and pressing shift-<number> where the number corresponds to the active input.


To make this technique work for me, two things are needed:

- an additional 7 toadtog bits (I have already used four for discrete power on / off for each of four devices). This would bring the required number of toadtog bits to 11 and the documentation I have says I can only use 8. If I add another ToadTog device, do I get another 8 bits? How do I set this up in IR?

- more macro memory. The 28 DSMs for this program will exceed the amount of free macro memory. I have "scads" of upgrade memory available but only 224 bytes of keymove/macro memory left. Can the "partition" between keymove/macro memory and upgrade memory be moved?

I'm still open to other ideas as this technique consumes gobs of remote memory, and does not follow the KISS (Keep It Sweet and Simple) principle.

... Tony
Back to top
View user's profile Send private message
Anthony_Patrick



Joined: 13 Oct 2006
Posts: 104
Location: Burnaby, Canada

                    
PostPosted: Sun Apr 17, 2011 1:52 am    Post subject: Reply with quote

pH7_jp1 wrote:
Once I thought I might need to solve this problem, but I found the CH+, CH- would put my Insignia into the Antenna mode.

If that had not worked, the next possibility I intended to investigate was to see if it were possible to write a special protocol that could calculate the number of input change commands and issue them. I never even got far enough to investigate the issues. Is is possible for a special protocol to maybe use 3 of the toadtog bits to track the current state? Other than storage of the current state, I think the rest is possible.


Good hint about using CH+, CH- to switch-in the tuner input state! I tried it! However doesn't work on the Viewsonic N3250W. Nuts!

If a special protocol is written to handle multi-state devices (rather than simple two-state as does toadtog), I would think the protocol would not rely on the existing toadtog bits but instead use its own memory cell(s) to track the state.

... Tony
Back to top
View user's profile Send private message
pH7_jp1



Joined: 14 Sep 2003
Posts: 480
Location: Sterling Heights, MI

                    
PostPosted: Mon Apr 18, 2011 2:49 pm    Post subject: Reply with quote

I have a Magnavox that behaves similar to yours and this works:

Hit "1", "OK", and then "Source" a fixed number of times get the desired input. The first 2 buttons put it in TV(Antenna) mode and then it is a known number of hits on "Source" to get to the one you want.
Back to top
View user's profile Send private message
Anthony_Patrick



Joined: 13 Oct 2006
Posts: 104
Location: Burnaby, Canada

                    
PostPosted: Mon Apr 18, 2011 8:02 pm    Post subject: Reply with quote

pH7_jp1 wrote:
I have a Magnavox that behaves similar to yours and this works:

Hit "1", "OK", and then "Source" a fixed number of times get the desired input. The first 2 buttons put it in TV(Antenna) mode and then it is a known number of hits on "Source" to get to the one you want.


Thanks for your hint! I tried the "1", "OK" combo on the Viewsonic, didn't work! Again - nuts!

I hope that there is some combo that will force the Viewsonic N3250W into "tuner" (what you called antenna). This would make things so simple as I could then simply hint "next Video-Source" a fixed number of times to get to the input I want. Following the last two posts suggesting to try different combos to force a base input state, I have been experimenting - no success so far. There is nothing in the Viewsonic manual and I haven't found anything using Google for this model. Other models of Viewsonic seem to switch inputs with their respective remotes eg. when you switch the OEM remote to "DVD", the TV input is also automatically switched. The N3250W doesn't do this (I retested using the original remote).

If found this thread:

http://forums.logitech.com/t5/Harmony-Remotes-Programming/Viewsonic-N3250W-and-Harmony-550-Input-switching-not-working/td-p/40553

on the Logitech / Harmony site. Looks like the Harmony has the same issue with the N3250W.

Sigh! Crying or Very sad Crying or Very sad Crying or Very sad
Back to top
View user's profile Send private message
cauer29



Joined: 03 Feb 2010
Posts: 236

                    
PostPosted: Tue Apr 19, 2011 9:29 am    Post subject: Reply with quote

Anthony_Patrick wrote:
pH7_jp1 wrote:
I have a Magnavox that behaves similar to yours and this works:

Hit "1", "OK", and then "Source" a fixed number of times get the desired input. The first 2 buttons put it in TV(Antenna) mode and then it is a known number of hits on "Source" to get to the one you want.


Thanks for your hint! I tried the "1", "OK" combo on the Viewsonic, didn't work! Again - nuts!

I hope that there is some combo that will force the Viewsonic N3250W into "tuner" (what you called antenna). This would make things so simple as I could then simply hint "next Video-Source" a fixed number of times to get to the input I want. Following the last two posts suggesting to try different combos to force a base input state, I have been experimenting - no success so far. There is nothing in the Viewsonic manual and I haven't found anything using Google for this model. Other models of Viewsonic seem to switch inputs with their respective remotes eg. when you switch the OEM remote to "DVD", the TV input is also automatically switched. The N3250W doesn't do this (I retested using the original remote).

If found this thread:

http://forums.logitech.com/t5/Harmony-Remotes-Programming/Viewsonic-N3250W-and-Harmony-550-Input-switching-not-working/td-p/40553

on the Logitech / Harmony site. Looks like the Harmony has the same issue with the N3250W.

Sigh! Crying or Very sad Crying or Very sad Crying or Very sad


If you do get it all working eventually, you might find it cumbersome to have to hold the remote for 10-15 seconds while it chunks out long macro sequences to get to the right input. I went that route at first and lost patience with it. It was too easy for one or more cmds to get lost due to various events such as someone walking in front of the TV during macro execution, etc. I ended up offloading macro duties to an Ocelot home automation controller. I use an X10 IR543 IR to X10 translator. A JP1 remote is setup to send a single X10 unit code on device selection and the IR543 translates that to X10 pwrline. The Ocelot (located in a closet) receives that and sends the macro out on it's IR emitters. Nobody can walk in between the emitter and the TV, since the emitter is stuck directly to IR receiver on the TV. No more holding the remote pointed at the TV (and other equipment) for 10-15 seconds.

The Ocelot allows me to do much more than could ever be done with a dumb remote, since it can be setup to actually sense the pwr state of devices and modify its macro sequences accordingly. If TV power is off, you have to wait 4 seconds before it will respond to further cmds after the initial pwr on. The Ocelot knows this and waits the extra time only when it needs to based on its knowledge of the pwr state of the TV. You can do that with state tracking too, but the Ocelot does not get out of sync. It's not guessing the pwr state of the TV. It knows.

A.A.
Back to top
View user's profile Send private message
pH7_jp1



Joined: 14 Sep 2003
Posts: 480
Location: Sterling Heights, MI

                    
PostPosted: Thu Apr 21, 2011 2:25 pm    Post subject: Reply with quote

The very last post on the Harmony site says:
Quote:
I have a N3260W TV and a Harmony 880. I had the same problem, but it was solved by the support team. They were very efficient.
You have to learn from the original remote the SOURCES key, and UP, DOWN and SELECT. Then contact support and tell them the different inputs you have and the sequence to access them. In my case it was as follows:

SOURCES(popup menu for sources or PIP)->SELECT(select MAIN source)->UP/DOWN (to highlight needed source)->SELECT(confirm)

They have told me that they will upgrade software database to reflect this with ViewSonic TVs, but I don't know if this will happen soon or ever.

Now I'm a happy Harmony user. It's great!
From that post, it sounds like if you choose PIP, then MAIN that the sources menu will start in the same known state. This may not be true, but if the Harmony solved it this way, JP1 should work also.
Back to top
View user's profile Send private message
Anthony_Patrick



Joined: 13 Oct 2006
Posts: 104
Location: Burnaby, Canada

                    
PostPosted: Fri Oct 14, 2011 11:38 pm    Post subject: Reply with quote

I finally gave up on trying to outsmart the N3260W TV input selection. There are no discrete codes for input selection and there is no reliable way to pin down the current input selection - so you don't have a starting point.

I ended up by front-ending the HDMI input with a multi-port HDMI input selector that supports discrete input codes from its remote. These HDMI switchers have gotten really cheap (see: http://enjoygadgets.com). I simply incorporated the appropriate input selection when I do device selection and that completely solved the problem. I posted the KMs for controlling the "EnjoyGadgets" HDMI switchers in the "File Section" - "Device Upgrades" - "Audio/Video Selectors" under "EnjoyGadgets xxxxx" (there are two upgrades - one for a 3 port switcher and the other for a 5 port switcher).

... Tony
Back to top
View user's profile Send private message
eferz
Expert


Joined: 03 Jun 2010
Posts: 1078
Location: Austin, Texas

                    
PostPosted: Sat Oct 15, 2011 2:19 am    Post subject: Reply with quote

Anthony_Patrick wrote:
I ended up by front-ending the HDMI input with a multi-port HDMI input selector that supports discrete input codes from its remote.

Can you call them "discrete" input codes if they're mark plainly on the physical remote? Sorry, I don't mean to be quibbling over semantics but I'm trying to get a handle on the lingo. It was my impression that discrete codes were more along the lines of "hidden" codes which aren't necessarily represented on the actual remote.

For example, most remotes have the ability for PowerToggle, but some devices have discrete triggers for PowerOn or PowerOff. In reverse, my Logitech Z5450 has specific selections for Digital 1, Digital 2, Coax, and Direct inputs on the included remote. However, it also responds to the InputNext discrete code which rotates through the different inputs but it is not an available command on the physical remote.
_________________
Remotes; JP1.2: Comcast URC-1067, JP1.3: Insignia NS-RC02U-10A, JP1.4 OARI06G, JP2.1: Cox URC-8820-MOTO (still trying to figure out how to make them self-aware.)
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Sat Oct 15, 2011 6:28 am    Post subject: Reply with quote

eferz wrote:
Sorry, I don't mean to be quibbling over semantics but I'm trying to get a handle on the lingo.


I had a terrible time with the terms used in jp1 land. I kept a list of terms that I didn't know, and eventually "published" my list as the Glossary.

Quote:
Discrete Codes

A code that gives you direct access to a function that is normally accessed by toggling or rotating. Discretes are most often used to ensure your home theater components stay completely in sync for powering on and off and changing inputs.


Now if theses had been "D i s c r e e t Codes" they would have been hidden, unobtrusive or unnoticeable. Laughing Wink Note I thought the same thing. No one had ever been so indiscreet as to write d i s c r e e t down for me so I didn't know that is was spelled differently.

Edit: Funny thing I typed "d i s c r e e t" as one word and my post was "corrected" to discrete.
Back to top
View user's profile Send private message Visit poster's website
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Sat Oct 15, 2011 7:51 am    Post subject: Reply with quote

Discrete means separate, distinct, or individual. So a discrete code just means there is an individual code to perform a particular function, as opposed to a code that toggles a state (POWER,MUTE)) or cycles through a sequence of states (INPUT) . It makes no difference whether they are present or not on the OEM remote, although they frequently are not.
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Beginners All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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