How does the Remote Control work?

Started by TimC, July 12, 2023, 11:41:04 PM

Previous topic - Next topic

TimC

#15
OK I think I am there. Basically I had to use trial and error across multiple Controllers in Flirc to find equivalent commands.

The key for others to set up, is to know which Flirc controllers and buttons to align with their equivalent on the IceBox remote. 

Which keys are used on your remote is up to you, but I will explain what I did for my remote at the end.
I did the set up in a Windows OS, but there are Mac and Linux versions of the software available.
I am assuming you know how to download and install the Flirc software.

With the Flirc Software running and the Flirc USB receiver plugged into a UBB port on your computer, the process is to:
1. On the Flirc window select "Controllers menu > Kodi" - This presents a standard? Kodi keyboard on the window
2. On the Kodi Keyboard:
  a. select the "1" button and press the 1 key on IR Remote of your choice
  b. Repeat for all the number keys, 2, 3, 4, 5, 6, 7, 8 ,9 and 0.
  c. Repeat for the navigation keys, Enter, Up, Down, Left and Right.
  d. Repeat for the Sound Control keys, Mute, Volume_Down and Volume_Up.
  e. Repeat for the playback control keys, Rewind and Fast Forward - the other playback control keys need to come from another controller.
  f. Repeat for the data display keys, Info and EPG.
3. On the Flirc window select "Controllers menu > Full Keyboard" - This presents a US style keyboard on the window
4. On the Full Keyboard:
  a. select the "Home" button and press your choice for an equivalent Home key on IR Remote (I chose the Menu key on my Skippa remote)

5. On the Flirc window select "Controllers menu > Microsoft WMC" - This presents a Microsoft WMC keyboard on the window
6. On the Microsoft WMC Keyboard:
  a. select the "Record" button and press the Record key on your IR Remote
7. On the Flirc window select "Controllers menu > Media Keys" - This presents a Media Keys keyboard on the window
8. On the Media Keys Keyboard:
  a. select the "Next" button and press the Stop key on your IR Remote
9. On the Flirc window select "Controllers menu > Fire TV" - This presents a Fire TV keyboard on the window
10. On the Fire TV Keyboard:
  a. select the "Menu" button and press your choice for an equivalent Menu key on IR Remote (I chose the Blue key on my Skippa remote)
  b. select the "Back" button and press the Back key on your IR Remote
  c. select the "Play/Pause" button and press the Play key on your IR Remote
  d. select the "Home" button and press your choice for an equivalent Home key on IR Remote (I chose the Menu key on my Skippa remote)

That gives you a Remote with more capabilities than the IceBox remote.
You can:
* choose your channels using the number keys
* Fast Forward and Rewind your recordings
* Open the EPG directly from the remote

For those who want to see what other keys can be included, the approach I used was to plug both the RF and Flirc USB units into my PC and using the Keyboard Tester software.

Once you have installed the Keyboard Test software and have both USB units plugged into your PC, simply pressing the RF Remote key gives a code for the RF Remote key you need to look for.
From here it is messy as I was unable to find any info about what codes the Flirc is generating.
Its a matter of trial and error of selecting a Keyboard and Button in the Flirc software and programing a spare button on you IR Remote, and then looking at what code is displayed in the Keyboard Test software when you press the newly programmed button on your IR Remote.

Tedious but doable.

Postscript: The Flirc can be susceptible to Infrared generated by TV LED Backlighting causing spurious key code generations.  A scan through the Flirc Forums suggests two things.
1. Shield the Flirc from direct exposure to Infrared from the TV Screen.
2. When programming the keys, hold the Remote Control button down for 3 seconds. As soon as the Flirc detects the IR from pressing the button the app responds with the Recorded Successfully message, but sometimes fails to get a good enough recording. The result being that the Flirc can misinterpret the TV Backlight Infrared.
I redid mine and put the Flirc directly in the screen (I have the Flirc on a USB lead) and connected it to a laptop running an online Keyboard tester (How I discovered the initial issue) and left it running for a while and there were no longer any spurious key codes generated.

Postscript:  I have noted an error in the procedure (step 4). The procedure has been corrected with the addition of Step 10. d.
Icebox, Fetch box (Not IceTV Capable)

IanL-S

Thanks for posting the detailed process that you used. I am sure that many of us will find it very useful.
IceTV: IceBox + BYOB IceBox + 2xTRF-2400 + 2xTF7100HDPVRtPlus + SKIPPA [RIP] + T2 + U4 + V2
No IceTV: a few Toppys and T2
Synology NAS
Check out the oztoppy wiki and oztoppy Forum for Toppy help

raymondjpg

Quote from: TimC on July 20, 2023, 10:40:19 PMThe key for others to set up, is to know which Flirc controllers and buttons to align with their equivalent on the IceBox remote.
If you have a networked PC in the bedroom area then a better solution would be to install Kodi on that with the TVHeadend PVR addon using IceBox as the back end. That would give you live TV, and the option either to play back recordings from the TV or Video menus.

One significant advantage of this setup would be that it would enable Flirc configuration for Kodi without the complication of the IceBox custom key mapping. Also playback of recordings using an external player if you are so inclined.
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

TimC

#18
Quote from: raymondjpg on July 21, 2023, 08:56:10 AMIf you have a networked PC in the bedroom area then a better solution would be to install Kodi on that with the TVHeadend PVR addon using IceBox as the back end. That would give you live TV, and the option either to play back recordings from the TV or Video menus.

While a simple enough for getting the Icebox running on its own, my case is more about integration with other technology.
My entertainment setup involves several bits of technology.

A Fetch TV box
An Apple TV box
A Toppy (as Backup)
Two Skippas (Now dying and to be replaced by the IceBox)
A BlueRay DVD Player
An AV amplifier (in the lounge room)

All these feed through a 2 x 6 way HDMI Matrix Switch to the main TV in the Lounge Room and to a HDMI Extender/Receiver linked by ethernet cable to the Main Bedroom at the other end of the house. An RF HDMI extender doesn't quite make it. About 20 Meters and 3 walls is a little bit beyond the range of the RF.
I use a separate Infrared extender to improve reliability.

This allows My wife access to entertainment from all our devices while she is in the bedroom doing dialysis. which involves 4 to 6 hrs attached to a dialysis machine every second day. Entertainment becomes essential. It is also simple enough for my wife to operate.

In addition, I make use of RCA AV Video outputs from the devices via an AV switch and an RF AV Video extender to other TVs in the Family Room and second bedroom. The one thing that ties all this together is Infrared.
 
This setup allows all our entertainment technology to be used from anywhere in the house.

Unfortunately the RF Remote just didn't fit in with this arrangement, hence all my efforts to implement an InfraRed remote.

Icebox, Fetch box (Not IceTV Capable)

TimC

#19
By the way I found that the pic following appears to show incorrect code numbers.
RCU Scancodes.jpg

The following images shows the code numbers my Key Test program shows.

 RCU Scancodes-Corrected.jpg

Note: I couldn't find what the power key code was, as every time I tested it, my PC turned off.

Postscript:  I have noted an error in the second picture The Key code for KEY_VOLUMEDOWN is actually 174 (not 74).
Postscript: An omission noted in the second picture. The Key code for the KEY_PLAY_PAUSE button is 179.
Icebox, Fetch box (Not IceTV Capable)

raymondjpg

Some useful information about Flircs and keycodes at https://forum.flirc.tv/index.php?/topic/2706-flirc-harmony-keyboard-how/:

Controllers are interchangeable. They only group different keys together, but Flirc doesn't store information about selected controller. So you can record some keys from one controller and some keys from another. Most controllers (like Kodi for example) are just a collection of pre-configured, ready to use keyboard shortcuts and you can actually achieve the same functionality using full keyboard controller if you know those shortcuts.

Flirc doesn't deal with key codes. It works on a lower level and maps your IR signals to USB HID codes. It's up to your OS to interpret them and emit key codes to applications (which is done by the keyboard layout selection in most OSes). You can use flirc_util for more precise control as there is a "record_api" command which takes two 1-byte values (decimal) as a key definition. But you need to enter HID codes, not key codes.

I like to use this http://www.freebsddiary.org/APC/usb_hid_usages.php to get my HID codes. Scroll down to table 7 (keyboard). Bear in mind that information on that page is only true for US QWERTY and other compatible layouts. HID codes are assigned to a physical key location on the keyboard, not to a specific letter or symbol. So key "Y" on QWERTY will have the same HID code as key "Z" on QWERTZ.
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

DeltaMikeCharlie

Quote from: TimC on July 21, 2023, 02:39:31 PMBy the way I found that the pic following appears to show incorrect code numbers.
The numbers provided are the correct Linux event codes.
https://github.com/torvalds/linux/blob/d192f5382581d972c4ae1b4d72e0b59b34cadeb9/include/uapi/linux/input-event-codes.h#L191
What are the numbers that you have provided?  They don't seem to be the HID codes.

TimC

They are the codes that the Keyboard Tester software showed when each button on the Icebox remote was tested.  I couldn't test the Power Button as it turned my PC off when I pressed it.
Icebox, Fetch box (Not IceTV Capable)

raymondjpg

Quote from: DeltaMikeCharlie on July 22, 2023, 04:59:00 PMWhat are the numbers that you have provided?  They don't seem to be the HID codes.
Virtual Key code decimel https://cherrytree.at/misc/vk.htm
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

NBOSTI

Hi TimC, I have been following this thread since started, more out of interest and hoping to learn something along the way. I am not going to pretend I understand half the things discussed, I am in no way into coding and most of it is gibberish to me. I'll leave all that to the likes of those that know their stuff,.. and there seem to be a lot out there, makes me feel somewhat inadequate in my limited knowledge of such things.

I thought I might contribute this as a possible solution.
 You have mentioned that the HDMI Matrix allows you to access all media in different rooms, and that you have an Apple Tv in the setup.
If you are able to watch AppleTV content from those locations, have you tried Infuse on the AppleTV.
I use that to watch all recordings I have from my EyeTV device. I copy the recordings from the device to a folder on my serving iMac. It reads those files with no issue, even showing all description in the thumbnail when scrolling through the library. If it can work with EyeTv files, I don't see why it would not work with IceBox recordings. It reads all sub-folders and collates them into one that shows on the App.
Just a matter of pointing Infuse to any network attached device and choosing which folder to add to the library.
A simple interface with many settings/options available. Maybe try a free version to see if it works for you. I have the Pro but had no issues accessing any files with the free.
Just thought it might solve the issue of not being able to control those recordings with the RF remote, ..just use the Apple TV to do that.
Hope this is of some help.
 

TimC

#25
NBOSTI,

Quote from: NBOSTI on July 22, 2023, 08:32:29 PMIf you are able to watch AppleTV content from those locations, have you tried Infuse on the AppleTV.

No I haven't heard of infuse. It sounds interesting, but in any case, what I have setup works fine.

The key point is that I am trying to keep the operation simple, so that my wife can operate it easily (and me). I don't have to move files. I just point a remote and play whatever is available on whatever device I am watching.

The trick was to integrate an IceBox into it all.
Using the Flirc allowed me to repurpose my Skippa remotes to operate it.
Icebox, Fetch box (Not IceTV Capable)

TimC

Raymond,

Quote from: raymondjpg on July 22, 2023, 06:28:40 PMVirtual Key code decimel https://cherrytree.at/misc/vk.htm

These codes seem to align with what I found.
I don't see one in there to align with the Power Key though.

One thing I would like to know though, is what other keys in that list do something on the IceBox. For example, provided there are suitable Local Channels Numbers set up, you can use the number keys to navigate channels.

What other keys do something?

An exit key would be nice to allow you the come out of whatever you are in back to the live screen.
Icebox, Fetch box (Not IceTV Capable)

raymondjpg

#27
Quote from: TimC on July 22, 2023, 11:49:48 PMThese codes seem to align with what I found.
I don't see one in there to align with the Power Key though.

One thing I would like to know though, is what other keys in that list do something on the IceBox. For example, provided there are suitable Local Channels Numbers set up, you can use the number keys to navigate channels.

What other keys do something?

An exit key would be nice to allow you the come out of whatever you are in back to the live screen
That would be because there isn't one, but even if there were, then that reference I posted from the Flirc forum would tell you that knowing what keycodes do won't be of any great benefit in configuring Flirc. If you want to power down IceBox then use the arrow keys to navigate to the lower left icon on the home screen on Kodi and Enter, but you probably know that already.

Again, knowing what other keys in that list do in Kodi would be pointless when coming to configure a Flirc. I thought from earlier posts that you had the option of using a keyboard to control the IceBox so you have the opportunity to experiment with what keystrokes or combinations could usefully be mapped to the Flirc. Also, that you were 99% of the way there with the remapping, so maybe there are just one of two things that couldn't be covered where the context menu would be the best option.

Although perhaps not so elegant as one-touch solutions, the context menu in Kodi is effective, repeatable and reliable, and easily navigable with the arrow keys that are probably the easiest to locate by feel on a RCU. However there is a significant difference between the IceBox and Windows or vanilla LibreELEC implementations of Kodi. With the latter two you can go back a step in menus with the backspace key, but in IceBox that key is custom mapped to bring up a list of recordings. In Icebox you have to use the Esc key which works in a similar way to the backspace but which with some menus shells back to the home screen. If you use Esc on a context menu for a recordng it will take you back to the list of recordings, but on some other menus in IceBox you will see two dots at the top of the list that you won't see in vanilla Kodi implementations. Selecting those two dots and Enter behaves like the backspace key, moving back a step.

So to answer your question the Esc key may be the answer to get back to the "live" screen, or it may not. I don't know exactly what you are refering to, or if by "live" screen you mean live TV or the home screen.
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

TimC

Found a weakness for the Flirc. It can pick up Infrared from TV screens and interpret it as a key.

Apparently, the backlight LEDs on TVs can put out a fair amount of Infrared.
I originally had the Flirc mounted on a short USB cable attached to the bottom edge of our TV.

I discovered that recording playbacks would randomly jump forward from time to time.
When I connected the Flirc lead to a Laptop and ran a Keyboard tester I found that random keys were being generated (Usually "."s). On the Icebox, the "." does the equivalent of the Right arrow key hence the random jump forwards.

I have now relocated the Flirc to a position under my center home theatre speaker.
This is location allows me to still point the IR Remote generally in the direction of the TV Screen, but is shaded from the TV screen. I had to tuck it a fair way under Infrared reflects all over the place. It all seems to be working now.
Icebox, Fetch box (Not IceTV Capable)

TimC

#29
As promised I did some experimenting with a keyboard to see what the Icebox does when different keys are pressed.
You can make use of this data to enhance the settings of a Flirc and the capabilities of an IR Remote Control.

Virtual Key Codes that do something in the IceBox.docx

I am no expert on all the functions of an IceBox or the common names those with more knowledge use.
Occasionally "Something" happened, but I had no idea what, so I have provided a description of what I saw.

The reality is though, that you don't have any need to set up a remote button for these.

That being said though, I did find several keys that are quite useful and I have implemented them in my remote.

Please feel free to do some experimenting and modify the descriptions on the Microsoft word document. Let me know if you can't open a Microsoft Word file, I can generate it as a PDF file that may be more broadly usable.
Icebox, Fetch box (Not IceTV Capable)