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 1, 2, 3  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Beginners
View previous topic :: View next topic  
Author Message
Anthony_Patrick



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

                    
PostPosted: Fri Apr 15, 2011 5:30 pm    Post subject: Input selection state engine Reply with quote

I have a ViewSonic N3250W television which does not support discrete input selections (I have looked for discrete input selections using all possible EFCs for this device with no success). However, the N3250W does have a next "video source" function (EFC 246) that rotates through the 7 possible inputs (it does not go through the "menus" for this - it simply rotates to the next input selection whenever the corresponding button is pressed).

Now I would really like to simulate discrete input selection (it would make things much easier to use). A "state sensitive protocol" similar to ToadTog would do the job nicely - however I would need at least seven states rather than the two that ToadTog-s offer. A keypress to this protocol would identify the desired result state and the keycode(s) to be sent as the protocol rotates step by step until it reaches the desired state. A pause between each step of the rotation is needed to allow the N3250W to stabilize (two to three seconds as the inputs are being switched inside the TV).

Has anyone done anything like this? It sounds like a really handy gadget that could be used for lots of different things.

... Tony Patrick


Last edited by Anthony_Patrick on Fri Apr 15, 2011 11:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Capn Trips
Expert


Joined: 03 Oct 2003
Posts: 3990

                    
PostPosted: Fri Apr 15, 2011 8:21 pm    Post subject: Reply with quote

It can be done, in theory, with the existing ToadTog and Pause protocols.

First create a Pause command of the required duration.

Then, you would have to use three of the eight ToadTog flags to define your seven states (and is "tuner" an eighth?).

Like input 1 would set flags 0 to 1, 1 to 0 and 2 to 0 (100)
input 2 would set 010
input 3 = 110
input 4 = 001
input 5 = 101
input 6 = 011
input 7 = 111
tuner = 000

Then set up your ToadTog macros (I assume you'd use numeric button or shifted numeric buttons) to sense all each flag in turn, leading you to 7 (or 8) possible logic paths to execute a specified number of "video source" and "pause" sequences based on what was sensed.

I've never tried to set anything that complex up, but if you keep track of the three flags accurately, it should work.
_________________
Beginners - Read this thread first
READ BEFORE POSTING or your post will be DELETED!


Remotes: OFA XSight Touch, AR XSight Touch
TVs: LG 65" Smart LED TV; Samsung QN850BF Series - 8K UHD Neo QLED LCD TV
RCVR: Onkyo TX-SR875; Integra DTR 40.3
DVD/VCR: Pioneer DV-400VK (multi-region DVD), Sony BDP-S350 (Blu-ray), Toshiba HD-A3 (HD-DVD), Panasonic AG-W1 (Multi-system VCR);
Laserdisc: Pioneer CLD-D704.
Amazon Firestick
tape deck: Pioneer CT 1380WR (double cassette deck)
(But I still have to get up for my beer)
Back to top
View user's profile Send private message
mdavej
Expert


Joined: 08 Oct 2003
Posts: 4501

                    
PostPosted: Fri Apr 15, 2011 8:39 pm    Post subject: Reply with quote

I agree, I think this is doable with the 8 Toadtog bits you already have. But it will take some effort to figure out. I did something similar to track where I was in a favorites list. THIS may give you some ideas.
Back to top
View user's profile Send private message
ElizabethD
Advanced Member


Joined: 09 Feb 2004
Posts: 2348

                    
PostPosted: Fri Apr 15, 2011 10:00 pm    Post subject: Reply with quote

I have a receiver with a similar problem of inputs in a circle. On 6131, mdavej's toadTog scheme works well. Here's how mdavej designed it and how it's in my remote, so you can modify for TV.

Receiver Menu button cycles through several inputs using DSM special protocol:
AUD/Menu is DSM: X_dev8,Xshift-3

The toadTogs (aud/shift-numbers are inputs)
dev8 SHIFT-3 ToadTog(3,ForceOff) [On->Off]:SHIFT-4 [Already Off]:< Blank >
dev8 XSHIFT-3 ToadTog(3,ForceOn) [Already On]:XSHIFT-4 [Off->On]:X_AUD;SHIFT-3 CD

dev8 SHIFT-4 ToadTog(4,ForceOff) [On->Off]:SHIFT-5 [Already Off]:< Blank >
dev8 XSHIFT-4 ToadTog(4,ForceOn) [Already On]:XSHIFT-5 [Off->On]:X_AUD;SHIFT-4 TV

dev8 SHIFT-5 ToadTog(5,ForceOff) [On->Off]:SHIFT-6 [Already Off]:< Blank >
dev8 XSHIFT-5 ToadTog(5,ForceOn) [Already On]:XSHIFT-6 [Off->On]:X_AUD;SHIFT-5 DVD

dev8 SHIFT-6 ToadTog(6,ForceOff) [On->Off]:SHIFT-7 [Already Off]:< Blank >
dev8 XSHIFT-6 ToadTog(6,ForceOn) [Already On]:XSHIFT-7 [Off->On]:X_AUD;SHIFT-6 TUNER

dev8 SHIFT-7 ToadTog(7,ForceOff) [On->Off]:XSHIFT-3 [Already Off]:< Blank >
dev8 XSHIFT-7 ToadTog(7,ForceOn) [Already On]:SHIFT-3 [Off->On]:X_AUD;SHIFT-7 Tape

Since you control how frequently you press, in my example, the Menu button, pauses might not be needed. In fact this runs at about 1/sec at best on the 6131 (tested with widget watching a macro of menu, menu, menu...)
_________________
Liz
Tweeking 8910, HTPro/9811, C7-7800, 6131o, 6131n, AtlasOCAP-1056B01, RCA-RCRP05B and enjoying the ride Smile


Last edited by ElizabethD on Fri Apr 15, 2011 10:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
cauer29



Joined: 03 Feb 2010
Posts: 236

                    
PostPosted: Fri Apr 15, 2011 10:47 pm    Post subject: Re: Input selection state engine Reply with quote

Anthony_Patrick wrote:
I have a ViewSonic N3250W television which does not support discrete input selections (I have looked for discrete input selections using all possible EFCs for this device with no success). However, the N3250W does have a "video source" function (EFC 246) that rotates through the 7 possible inputs (it does not go through the "menus" for this - it simply rotates to the next input selection whenever the corresponding button is pressed).

Now I would really like to simulate discrete input selection (it would make things much easier to use). A "state sensitive protocol" similar to ToadTog would do the job nicely - however I would need at least seven states rather than the two that ToadTog-s offer. A keypress to this protocol would identify the desired result state and the keycode(s) to be sent as the protocol rotates step by step to the desired state. A pause between each step of the rotation is needed to allow the N3250W to stabilize (two to three seconds as the inputs are being switched inside the TV).

Has anyone done anything like this? It sounds like a really handy gadget that could be used for lots of different things.

... Tony Patrick


It might be easier if there is a key that guarantees switching to one particular input and then after that, count through the circle to the desired input. You might try punching a channel number, as many TVs will automatically switch to TV mode and a fixed number of input sel presses after that will get you to the desired input.

My ancient TV has 2 separate input circle groups. One is HDTV, HDMI, HDCP, DVI, VGA all via one button cycles through. The other is SDTV, S-Video, AV1, AV2, Component cycling via different button. Pressing the HDTV circle button followed by the SDTV circle button, guarantees that you end up at the beginning of the SDTV circle. From there, any given mode is a fixed number of button presses.

The procedure to go to VGA for instance, is to press the SDTV circle button and then the HDTV circle button. That puts it on the HDTV circle and then 4 presses of the HDTV circle button puts it on the VGA input. It's a little more complicated since switching to the HDTV circle requires a 3 second delay after, since the TV won't respond to that circle button for 3 seconds, before accepting further input. Once it's switched to HDMI, it'll take 3 more circle buttons in quick succesion to get to VGA input. A similar procedure is done to get to a given input on the SDTV circle.

A.A.
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 12:26 am    Post subject: Reply with quote

Wow! Thanks for all the suggestions.

Unfortunately the Viewsonic N3250W TV does not have a "guaranteed switch to one particular input" so the technique suggested by cauer29 won't work for me.

The mechanism suggested by ElizabethD / mdavej works the-other-way-around. It allows the use of a single key to rotate through the set of possible input selections where the device does NOT have a rotate-input function. I have the opposite problem; I can rotate the inputs but I can't directly select the specific discrete input I want without going through the TV menuing system. For instance what I would really like to do is when I press the "DVD" button on my remote to select my DVD device, I would like the TV to automatically switch to the input connected to the DVD player regardless of which input I was previously using. This technique would make things a lot less confusing for others that are using the system.

I already use four ToadTogs to simulate Discrete On / Discrete Off. One for the TV and the other three for connected devices (Cable tuner; DVD/VCR/Mcard Combo unit; and a networked digitial media receiver - Western Digital Live HD).

I had previously thought of using Captn Trips method. However this leads to 7 x 4 x 2 (for a total of 56) DSMs to track all the possible logic paths (8 x 4 x 2 = 64 if the all eight states are needed) plus 1 keymove for the Pause plus 6 DSMs (7 if all eight states are used) for sending the requisite number of "next video-source / pause" sequences plus 6 DSMs for setting the resultant state. This results in a total of 69 DSMs / keymoves and will by far exceed the amount of memory that is available in the remote. I only have 224 bytes still free and am already using the extender. BTW my remote is the Comcast URC-1167 JP1.3 version.

... Tony Patrick


Last edited by Anthony_Patrick on Sat Apr 16, 2011 5:23 pm; edited 2 times in total
Back to top
View user's profile Send private message
underquark
Expert


Joined: 20 Jun 2005
Posts: 874
Location: UK

                    
PostPosted: Sat Apr 16, 2011 2:31 am    Post subject: Reply with quote

Might it be possible to split the problem into two parts?

Pressing the device key calls a macro in two parts:

1] Read the state of the TOADTOG and get to a "base" input
2] Advance round the circle x number of times where x varies by device type.
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 3:17 am    Post subject: Reply with quote

It really ends up being the same problem:

Say the TV can be set to anyone of eight sources (including tuner) and you want to switch to an other of the seven (or stay with the same input). Hence you have 8 x 8 (=64) paths you can follow... When you know where the "path ends", you can then use a macro to send (one of the possible 7 actionable) requisite number of "next video-source / pause" sequences to switch the TV input accordingly. The new "state" of the TV input can then be remembered by USING three keycodes to switch the three associated toadtog bits on or off as required. Total: 64 (paths) + 7 (actionable outcomes) + 1 (pause protocol) + 6 (set toadtog state bits on or off) = 78 DSMs / keymoves.

Although I have only four physical devices, my DVD/VCR/M-card combo unit has multiple outputs. A higher quality output (YPrPbPg) can be selected for DVD operations than say for the VCR that can only use up to the S-video output. I have programmed the DVD/VCR/M-card combo onto the AUX device and use the "A", "B", "C" buttons when in AUX to select the Memory Card / DVD / VCR functions - so I would want to switch TV inputs when I do this as well. I really do need all those 7 states! (BTW: one of the seven states do include the TV tuner)

In any case, thanks for the idea - gave me another way to look at the problem. However because of the number of DSMs required; I don't think it is possible to do this with toadtogs because of memory limits in the remote - sigh! I hope someone can help me think of another way...

... Tony Patrick


Last edited by Anthony_Patrick on Sat Apr 16, 2011 5:24 pm; edited 2 times in total
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 4:20 am    Post subject: Reply with quote

Tony,

In order to get this to work reliably you really need to be able to get the TV into a known state.

What happens when you go in through the menu to get to the sources?

Is the current item highlighted as soon as you enter? Or does it default to antenna before you start pressing the navigation arrows?
If nothing is highlighted what happens if you just press enter?


Does the menu skip unattached sources?

When you press the down arrow I assume it starts circulating from the current input.

Have you tried looking for discretes while the input source menu is up?

--------------------------------
Also what happens when you press the Channel + or the number keys when you are in a mode that doesn't support them? Does this change the input to the tuner, or does it just ignore the keypress?
_________________
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
underquark
Expert


Joined: 20 Jun 2005
Posts: 874
Location: UK

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

I agree with vickyg2003 that all efforts should be made to find either a discrete or some method of getting to a known starting point but if that is not possible:


What I had in mind uses a macro on each Device Button (or other button used to select the "discrete" input) and nine TOADTogs working on three Toggle bits.

1] Three of the TOADTOgs are called in turn with the first advancing 1 place if it equals 1, the second 2 places and the third 4 places. This effectively cycles back round to the "Base" input state, whatever you decide to nominate. e.g. 000 for TV tuner.

2] Pressing the Device Button advances x number of steps up the chain to take you to the new device.

3] TOADTogs 4 thru 9 now set the bits up to represent the new input state by a combination of Force On and Force Off.

This can be re-ordered 2, 1, 3 if it makes planning the macros easier.



A typical Device Button macro might look like this:

[existing macro stuff like assigning button groups]
TV/Input
TV/Input
TT1Read
TT2Read
TT3Read
TT1On
TT2Off
TT3On

where TTxRead reads the state of the Toggle bit and advances as necessary, TT1On cause Toggle bit 1 to Force On, TT2Off bit 2 Force Off etc.
Back to top
View user's profile Send private message
cauer29



Joined: 03 Feb 2010
Posts: 236

                    
PostPosted: Sat Apr 16, 2011 8:42 am    Post subject: Reply with quote

Anthony_Patrick wrote:
It really ends up being the same problem:

Say the TV can be set to anyone of eight sources (including tuner) and you want to switch to an other of the seven (or stay with the same input). Hence you have 8 x 8 (=64) paths you can follow... When you know where the "path ends", you can then use a macro to send (one of the possible 7) requisite number of "next video-source / pause" sequences to switch the TV input accordingly. The new "state" of the TV input can then be remembered by USING three keycodes to switch the three associated toadtog bits on or off as required. Total: 64 (paths) + 7 (outcomes) + 1 (pause protocol) + 6 (set toadtog state bits on or off) = 78 keymoves.

Although I have only four physical devices, my DVD/VCR/M-card combo unit has multiple outputs. A higher quality output (YPrPbPg) can be selected for DVD operations than say for the VCR that can only use up to the S-video output. I have programmed the DVD/VCR/M-card combo onto the AUX device and use the "A", "B", "C" buttons when in AUX to select the Memory Card / DVD / VCR functions - so I would want to switch TV inputs when I do this as well. I really do need all those 7 states! (BTW: one of the seven states do include the TV tuner)

In any case, thanks for the idea - gave me another way to look at the problem. However because of the number of keymoves required; I don't think it is possible to do this with toadtogs because of memory limits in the remote - sigh! I hope someone can help me think of another way...

... Tony Patrick


Don't forget to provide a method to get the remote back in sync with the TV. The downfall of state tracking systems is the potential complication of getting everything back in sync on the maybe not so rare occasions when a non-initiated user starts pressing buttons directly on the TV.

A.A.
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 10:55 am    Post subject: Reply with quote

Two things to remember when you are writing your macros.

LKP's can use recurrsion.

Device keys can have TWO definitions,

For example you can have the global Macro
DVD Macro := T_DVD, C_DVD, O_DVD. DVD

and then have the
DVD key be a keymove in O_DVD mode be a LKP
DVD:=short(do nothing):Long(keymoved advance source):DVD
_________________
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
unclemiltie
Expert


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

                    
PostPosted: Sat Apr 16, 2011 12:01 pm    Post subject: Reply with quote

Vicky

I believe that if you have both a keymove and a macro on a key (device, whatever) it will depend on the order in which they are found in the IR file.

At least on my extenders, if the macro is found first it will always run. If the Keymove is found first, the current device (O_Dev) is checked and if that does not match the extender keeps searching.

Also, I've never tested to see if the "order" in IR corresponds to the "order" in the IR file. Does anyone know?
_________________
this JP1 stuff is a sickness!
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 1:13 pm    Post subject: Reply with quote

unclemiltie wrote:
Vicky

I believe that if you have both a keymove and a macro on a key (device, whatever) it will depend on the order in which they are found in the IR file.

At least on my extenders, if the macro is found first it will always run. If the Keymove is found first, the current device (O_Dev) is checked and if that does not match the extender keeps searching.

Also, I've never tested to see if the "order" in IR corresponds to the "order" in the IR file. Does anyone know?


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.
_________________
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 3:17 pm    Post subject: Reply with quote

With the N3250W TV, pressing the "Menu" key simply brings up the last menu that was in use. Continued pressing of the menu key is used to cycle/rotate through the TV menus. When in the "Input Selection" menu, all seven possible inputs are displayed: tuner, AV, S-Video, YCrCbCb, YPrPbPg, HDMI. Again these menu entries are "cycled/rotated" when pressing the up or down button and the TV "remembers" the last selected state... So attempting to program the remote to use the TV menus requires tracking two states (where are we in the menuing system, and which input was last selected). However switching via the menus does eliminate the need for the pause that would be needed for the "next video-source" method. Again, because of the number of states involved (8 different menu screens, and 7 input options), the use of toadtogs and keypresses to track all possibile logic paths would be prohibitive in terms of the number of DSMs required and the associated memory requirement in the remote.

If I use any remote function other than simply selecting menu entries, when a Menu is showing; the menu is switched off and the TV resumes "normal" operation. So in effect there are no additional codes available when the menu system is active.

Neither the menu selection nor the "next video-source" skips unused inputs (which actually makes things a little easier for me).

In reference to synchronizing the remote to the system it is controlling, the technique I normally use is to cup my hand over the IR transmitter on the remote and force the remote (using whatever key-presses are needed) into the state that the system is in. Simple and effective. For the purists (or working the other way around), I can also use shift-function to put my system into sync. with the remote. The key cloaking sends the IR signal to switch the system components as required without switching the underlying toadtogs in the remote. Once the remote is sync'ed to the system, I have very few problems as most of my family simply uses the ONE remote I have left for them to use and they know not to use the physical power buttons on the devices.

I have configured my device keys to operate in a "home theater" mode - they do not transfer all of the possible remote functions to the selected device only those that are normally used (I use the principle of least astonishment to keep other family members comfortable with this technique). However once I am in a specific device mode; I can use a LKP in that mode to transfer all of the remote functions to that device. I then tweek whatever I need, flip back to the TV device, and flip forward to whatever I just tweeked so everything works like "home theater" again. This all works because IR/KMIR normally "stores" DSMs before non device specific macros and the extender allows device specific macros ie: DSMs / ToadTogs / DKPs /LKPs selecting the "first fit" that it finds.

The use of seven toadtog bits to track the TV input state is an interesting idea and I need think about how that might work. As the remote cycles forward from the existing state to the new state, it could send a "next video-source / pause" sequence for each step. The toadtog with the "1" setting would identify the existing state. The keypress to identify the new input state would set its toadtog and start the cycle until it found the last input state ("1"bit set) which it would reset then switch to another set of keypresses that cycle and send the "next video-source / pause sequence" until the new state (with the new "1" bit set) is found. I think this can be accomplished with defining 3 DSMs per state plus the 1 keymove for the pause protocol for a total of 22 DSMs / keymoves. Still big, but maybe doable.

However, I already use four toadtogs to track power settings (discrete on / discrete off for each of my four devices). I was under the impression that only 8 toadtog bits were available?

... Tony


Last edited by Anthony_Patrick on Sun Apr 17, 2011 2:08 am; edited 3 times in total
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 - Beginners All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 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