How does the Remote Control work?

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

Previous topic - Next topic

TimC

It sounds like a silly question, but there is a good reason for asking.

In my setup I use a HDMI Matrix switch, a HDMI extender and an IR extender to extend the outputs of the various devices I have to the Main bedroom at the other end of the house.

This allows my wife to watch programs she has recorded while she does Heamodialysis in her bedroom.

so far I having difficulty achieving this. So far the signal doesn't quite make it (likely a configuration issue). As a result, I can't really tell if the remote will work or not once I get the configuration issue sorted (Another thread).

The remote control is another issue. I have the impression that the remote uses RF rather than Infrared hence the little dongle supplied.
However, I notice that the IR extender I use lights up, when I use the Icebox remote in the bedroom, as if it has detected an Infrared signal, so perhaps it also uses Infrared after all.
I also note that the Remote shows a led indication when a button is pressed when it is a long way from the Icebox. I'm not sure what the LED is supposed to show. It doesn't seem to be described anywhere.

I'm not sure what this all means, but I need to find out how to extend to remote signal to allow it to work from the bedroom, otherwise the Icebox will not serve our needs. I will have to bin the Icebox and find an alternative PVR.

Any ideas?
Icebox, Fetch box (Not IceTV Capable)

DeltaMikeCharlie

#1
The IceTV remote that I have is RF-based.  It has a LED indicator light, but when I point it at my IR receiver, I see no activity.  You can also test it with a digital camera.  With a normal IR RCU, you will see flashing lights when you point the RCU at the camera lens and press a button.  I also tried this with my ICE RCU and saw nothing.

The IceBox will work with an after-market remote control unit.  Which is exactly what I do.

The IceBox is simply expects input from a USB HID (Human Interface Device) such as a USB keyboard, USB mouse or other device that uses the HID protocol.

If you already have an IR extender, then you could purchase an IR receiver for the IceBox and pick the RCU of your choice.  The IceBox will also understand way more buttons than the handful that the native ICE remote provides.

Have a look at a 'Flirc USB': https://flirc.tv/products/flirc-usb-receiver?variant=43513067569384

You can train/configure it to work with a wide range of IR RCUs.  The Flirc receives the IR code from the RCU and then produces a HID output that the IceBox can understand.  I think that you need a Windows PC to run the configuration software.

I personally use an old RCU/receiver that came with a Windows Vista laptop many, many years ago and it worked fine out of the box with no configuration required at all.

RC6.jpgIR RX.jpeg

EDIT/NOTE: The IR receiver that I use does not generate HID output.  However, there are tools that allow the Linux kernel to interpret the IR codes.

The following post specifically addressed Topfield remote controls, but the principle would be the same for any IR RCU.  Learn the IR codes, put them in a configuration file and map those codes to Kodi functionality.

https://oztoppy.forumchitchat.com/post/remote-control-testing-12529503

You may need some Linux command-line skills to accomplish this.

EDIT/NOTE 2: Perhaps the IceBox supports HDMI-CEC.

If your TV and the IceBox support HDMI-CEC, and you can already control your TV via IR extender, perhaps enabling CEC will allow you to control your IceBox.

DeltaMikeCharlie

Quote from: DeltaMikeCharlie on July 13, 2023, 09:03:18 AMIf your TV and the IceBox support HDMI-CEC, and you can already control your TV via IR extender, perhaps enabling CEC will allow you to control your IceBox.
I tried CIC with my IceBox and it did not work for me.
I also found that there is a device that will intercept HDMI-CIC commands and send them via USB.
https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter

IanL-S

I found this discussion very interesting. Many thanks for you input Delta Mike Charlie.
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

TimC

Thanks DMC,

I'll try the Flirc and see what happens.



Icebox, Fetch box (Not IceTV Capable)

TimC

OK, I received m new Flirc IR Receiver.

Interesting. Basically the receiver comes in a little box. Thats it! No Instructions.

I knew enough to know that I needed to plug it into a PC to go further and yes, when I plugged it in to my PC and access to the internet was available, the unit took me to a website.
Again, not much in the way of instructions, but I went to the download section and selected the unit I purchased and downloaded the Windows version of the Software, which runs on my PC.
I opened the exe file, after a bit of a battle with my firewall, and the software opened.

From there it was fairly straight forward.

I chose the KODI remote from the list of controllers and configured the buttons shown with my old Skippa remote.
Select a button on the screen and press the equivalent button on the remote. I added the number buttons in the hope that I would be able to use them to switch channels.

I saved the configuration and removed the receiver and plugged it into one of the side USB ports of the icebox, and the remote immediately started working, mostly.

There are still a few issues to work through though.
I will need guidance on how to get the Home and IceTV buttons working.
I can get by, but it would be better if I can get something up and running.

The number buttons worked as well, but there are some issues with how the numbers worked.

Initially pressing "1" gave me Channel 10, "2" Channel 2, "90" Channel 90, etc, except "7" and "9" didn't work.
Note: I had set the "Use channel numbers from back end", but when I logged into IceTV on my PC, looked at my IceTV Channel settings, I found that I had 9 and 7 disabled.
However enabling and saving the changes didn't work.

I then tried a soft reset and rescan, but that didn't work either as the rescan assigned 5 digit numbers to all channels except for the 7 group.  7 works though.

The 5 digit numbers seem to come from the Backend, whatever that is.
If I disable the "Use channel numbers from back end" option the 5 digit numbers change to the mor normal 1/2 digit numbers, but they no longer line up with the correct channel numbering.

I have tried several scans and the insanity, i.e. doing the same thing and expecting a different result, prevailed.

Is there a way to do something in the "backend" that will stick?
Icebox, Fetch box (Not IceTV Capable)

DeltaMikeCharlie

Quote from: TimC on July 19, 2023, 12:31:18 AMThere are still a few issues to work through though.
I will need guidance on how to get the Home and IceTV buttons working.
I can get by, but it would be better if I can get something up and running.

With 'Home' and 'IceTV. buttons on the Skippa remote, what functions did you want them to perform in Kodi?  Once you know that, you can find the keystroke that Kodi uses and then map those keystrokes to those RCU keys.

As far as I know, the Flirc emulates a USB keyboard and translates the IR codes into USB keystrokes.  The Kodi template that Flirc used probably just had the ability to map the most popular functions for Kodi.

If the Kodi functions that you wish to perform are already configured within Kodi to have Keyboard shortcuts, then you just need to manually configure your Flirc to generate those codes.

If the Kodi functions do not already have a keystroke, then you will have to find a keystroke that Kodi dopes not use and then build a custom keymap to invoke that function from that keystroke.  You will then need to configure Flirc to send the keystroke that you used.

I think that you can save the Flirc config file.  If you are willing, perhaps you could share that config file on the forum so that other people could use it too.

Quote from: TimC on July 19, 2023, 12:31:18 AMIs there a way to do something in the "backend" that will stick?
The frontend is Kodi and the backend is 'tvheadend' (TVH).

You can get to the TVH configuration screen using a web browser, go to:
http://{IceBox IP Address}:9981

Within TVH, when you tune, you tune to a 'Service', not a 'Channel'.  If you go into 'DVB Inputs | Services', you should see two services called 'Channel 9 Sydney' (for example).

If you look to the right on the list, you can see the 'Service ID' and the 'Local channel number'.  One of the services should have LCN 9 and the other LCN 91, at least in Sydney.  The service IDs should be identical.

If you click in the little 'info' button on the services list, you will see that they use all of the same PIDs.  These 2 services are simply aliases for the same content this is so that 'Channel 9' can still be found on channel 9.  As far as I can tell, the IceTV setup only creates a 'channel' for 91, not 9.

Now, if you go into 'Channel / EPG | Channels', you will see the list of channels that you get in Kodi and this is where the 'backend numbers' come from.  You should find that there is no channel with the number 9.  However, considering your success with 91, you should be able to find that.

At this stage you can do 1 of 2 things.  Create a new 'channel' for LCN 9, or simply renumber 91 to 9.

If you want to create a new channel 9, just copy the settings for 91 calling it '9 New' temporarily.  Do not set a channel number or select a service.  This is because from this screen, if you select a service, you can't tell the difference between 9 and 91.

Go back into 'services' and find the one with LCN 9.  Edit it and then select '9 New' from the dropdown channel list.  Go back to 'channels' and rename your new channel to what it should be.  The number should be 9.  Make sure that it is enabled.

In Kodi, make sure that you enable using the front end numbers.  The new channel should turn up in Kodi immediately, however, the EPG data may take some time to come through.

TimC

DMC,

Slight Misunderstanding here.
Quote from: DeltaMikeCharlie on July 19, 2023, 08:45:49 AMWith 'Home' and 'IceTV. buttons on the Skippa remote, what functions did you want them to perform in Kodi?  Once you know that, you can find the keystroke that Kodi uses and then map those keystrokes to those RCU keys.

These are keys on the Icebox Remote that don't have equivalents on the Skippa remote. Not the other way around.

As for the Channel number mappings. I found that all the channels that have 5 digit numbers have a Local Channel Number of 0.
I assume something in the setup sees the 0 and automatically assigns the 5 digit numbers.

OK I have a fix.

Next question is why isn't the back end picking up the local numbers correctly?

Also, If I go through the process fixing this up manually, will the settings hold through a soft reset?

My guess is no. I imagine every time there is a rescan all these settings go away.

I really don't want to be assigning 40 odd channel numbers every time a soft reset is required.
Icebox, Fetch box (Not IceTV Capable)

raymondjpg

Quote from: DeltaMikeCharlie on July 19, 2023, 08:45:49 AMWith 'Home' and 'IceTV. buttons on the Skippa remote, what functions did you want them to perform in Kodi?  Once you know that, you can find the keystroke that Kodi uses and then map those keystrokes to those RCU keys.
I think the question (probably implied) is what did those buttons do on the Skippa? I suspect something that cannot be done in IceBox. Navigation around Kodi is pretty straightforward using arrow keys and enter, also backspace and escape keys to go back in menus. However the behaviour (resulting actions) of the backspace and escape keys are slightly different in IceBox from a Windows Kodi implementation. This difference cannot be changed by remapping Flirc keys. There may also be some functions in media playback such as volume control and subtitle toggle that are controllable by remappimg remote buttons using the inbuilt Kodi template in Flirc but I haven't tried that myself.

Quote from: DeltaMikeCharlie on July 19, 2023, 08:45:49 AMAs far as I know, the Flirc emulates a USB keyboard and translates the IR codes into USB keystrokes.  The Kodi template that Flirc used probably just had the ability to map the most popular functions for Kodi.
Yes, it shows up in Windows as a HID keyboard device.


Quote from: DeltaMikeCharlie on July 19, 2023, 08:45:49 AMNow, if you go into 'Channel / EPG | Channels', you will see the list of channels that you get in Kodi and this is where the 'backend numbers' come from.  You should find that there is no channel with the number 9.  However, considering your success with 91, you should be able to find that.
I may be wrong but the only way I could get channel order right was to manually renumber them in the Number column. So I have numbered 1-25 the channels I want to see, with the Enable column checkbox enabled. Then clicking the Number column head to line them up to check all is correct. Then on Kodi enabling the first three options under PVR & Live TV|Channels settings.
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

DeltaMikeCharlie

Quote from: TimC on July 19, 2023, 11:30:28 AMThese are keys on the Icebox Remote that don't have equivalents on the Skippa remote. Not the other way around.

My apologies.  Here is a map of that key codes the ICE RCU create.

https://forum.icetv.com.au/index.php?topic=7571.msg39109#msg39109

'Home' produces a 'home' keyboard keystroke and 'Ice' produces a 'back space'.

Quote from: TimC on July 19, 2023, 11:30:28 AMNext question is why isn't the back end picking up the local numbers correctly?

I don't know.

Quote from: TimC on July 19, 2023, 11:30:28 AMAlso, If I go through the process fixing this up manually, will the settings hold through a soft reset?

I agree, these changes would probably be lost after a soft reset.

DeltaMikeCharlie

Quote from: raymondjpg on July 19, 2023, 11:31:41 AMI may be wrong but the only way I could get channel order right was to manually renumber them in the Number column. So I have numbered 1-25 the channels I want to see, with the Enable column checkbox enabled. Then clicking the Number column head to line them up to check all is correct. Then on Kodi enabling the first three options under PVR & Live TV|Channels settings.
This sounds like what I do.  In TVH, the channel numbers need to be set to the desired LCN.  In Kodi, backend ordering/numbering needs to be enabled.

raymondjpg

#11
Quote from: TimC on July 19, 2023, 11:30:28 AMThese are keys on the Icebox Remote that don't have equivalents on the Skippa remote. Not the other way around.
There is a home button on the Flirc Kodi template that any Skippa key could be mapped to. Just remember that Skippa keys can only be mapped to one function, not multiple functions, in Flirc, so choose a "free" key. The home key just jumps back to the first Kodi setup screen you see on bootup.

What exactly the IceTV key achieves with the IceBox RCU I do not know.

Quote from: TimC on July 19, 2023, 11:30:28 AMAlso, If I go through the process fixing this up manually, will the settings hold through a soft reset?

My guess is no. I imagine every time there is a rescan all these settings go away.

I really don't want to be assigning 40 odd channel numbers every time a soft reset is required.
I don't know because I do not have an IceBox, but any reset that just involves an IceBox reboot will not affect channel numbering, whereas I'd say that any reset that involves a channel scan or rescan probably will.

Edit: I just checked the IceBox RCU on a Virtualbox installation of IceBox BYO and if by IceTV key you mean the blue star key then that takes IceBox direct to TV Recordings. There is no equivalent key in the Flirc Kodi template, but as DMC pointed out it is just a backspace that can be mapped to a Skippa key. No matter where in the IceBox Kodi setup you are that key will always take you to TV Recordings. The same behaviour is not seen in vanilla installations of LibreELEC so it looks like a custom mapping in IceBox. Quite how that is achieved, I haven't looked into, but it would explain the difference in behaviour of the backspace key between IceBox and Windows installations of Kodi.
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD

TimC

Finally I managed a decent scan that only left the Channel 10 services without the correct numbers, which I could correct fairly easily. I am a bit concerned about doing the same thing and getting different results, but hopefully I won't need to do a soft reset again. I think there's an emoji for that.  A really nervous looking one.

Quote from: DeltaMikeCharlie on July 19, 2023, 11:50:51 AMHere is a map of that key codes the ICE RCU create.

Unfortunately the key codes don't help as the Flirc doesn't provide any info about what codes it is using where.

I eventually ended up with a mapping of the Skippa remote that sort of works.

You can change channels using the number buttons and a press of the menu button once or twice brings up a list of recordings.

Sort of workable but not all that intuitive.  The record button doesn't work and I had some difficulty getting a recording to play.

I suspect the Flirc's Kodi keyboard doesn't line up with The Icebox one.

Quote from: DeltaMikeCharlie on July 19, 2023, 08:45:49 AMI think that you can save the Flirc config file.  If you are willing, perhaps you could share that config file on the forum so that other people could use it too.

Yes I can save the config to a file, but it would only be of use to someone with a Skipp Remote.

How do you add a file to this forum?  I can see how to add a picture, a link, an email, even a Youtube video, but not a file.

Finally some thoughts on the Flirc.

While the concept is great, it has limitations.
While you can program a configuration easily enough, there is no was to check what you have set up.
It would be good if you could press a button on your remote and see which button the Flirc recognises it as.
The Config file is not human readable so you cant tell what the Flirc is doing.
Support is not all that good as the designer is the only person providing support. He relies on Forums for most of the  support and given how little data is accessible, no one else knows much either. The forums are prety broad brush.

The list of remotes it emulates is pretty limited. Most are really gaming or streaming remotes, i.e. not really set up for things like a PVR.

I'm not sure where to go from here.
Icebox, Fetch box (Not IceTV Capable)

DeltaMikeCharlie

Quote from: TimC on July 20, 2023, 12:59:15 AMUnfortunately the key codes don't help as the Flirc doesn't provide any info about what codes it is using where.

I eventually ended up with a mapping of the Skippa remote that sort of works.

...

I'm not sure where to go from here.
You could consider a completely manual mapping process.  After all, the Flirc is just pretending to be a USB keyboard.

Here are some pages describing Kodi keyboard shortcuts:

https://kodi.wiki/view/Keyboard_controls
https://www.maketecheasier.com/cheatsheet/kodi-keyboard-shortcuts-cheatsheet/
https://beebom.com/kodi-keyboard-shortcuts/
https://github.com/xbmc/xbmc/blob/master/system/keymaps/keyboard.xml

(I'm sure that your search engine of choice can find more.)

Where there is an obviously equivalent function, match that key ('stop' = 'x').  Where there is no obvious equivalent, like the Skippa AutoSkip/Unskip, perhaps map them to something that you do all the time.

raymondjpg

#14
Quote from: TimC on July 20, 2023, 12:59:15 AMUnfortunately the key codes don't help as the Flirc doesn't provide any info about what codes it is using where.
It looks to me like the IceBox custom keyboard mapping is a bit difficult to interpret, so better not to try. Just focus on what the Skippa remapping with the Flirc is capable of doing.

Quote from: TimC on July 20, 2023, 12:59:15 AM...a press of the menu button once or twice brings up a list of recordings.
We've already covered this. A Skippa key remapped to backspace will always bring up a list of recordings.

Quote from: TimC on July 20, 2023, 12:59:15 AMSort of workable but not all that intuitive.
This is a misundertanding of what the Flirc is capable of. It is just a keyboard device, and you can map any Skippa key to any keyboard function. Which key it's mapped to is immaterial, and the remapped function of that key may bear no relationship to how that key is labeled. I don't consult the face of my remotes to work out which key does what, I do it by feel, and if you are going to use a remote like a Skippa then be prepared for functionality that is completely alien to what the remote used to do on the Skippa

Quote from: TimC on July 20, 2023, 12:59:15 AMThe record button doesn't work and I had some difficulty getting a recording to play.
I found that the record button of the IceBox RC on its own doesn't do anything, but a joint press of the record and enter keys seems to do something.I have no idea what keystrokes are sent as "previoussong".

This is one of the occasions where, at least for the time being, it is probably easier to use the context menu. Map a Skippa remote key to "c" and use the arrow keys to move up and down the menu then enter.

Quote from: TimC on July 20, 2023, 12:59:15 AMI suspect the Flirc's Kodi keyboard doesn't line up with The Icebox one.
I think we've already established that the IceBox has some custom keyboard mapping.

You are not limited to the Flirc Kodi template, use the full qwerty keyboard template as well. You can mix and match.

Quote from: TimC on July 20, 2023, 12:59:15 AMWhile the concept is great, it has limitations.
As a programmable keyboard emulator I doubt you'll find an equivalent, let alone anything better.

Quote from: TimC on July 20, 2023, 12:59:15 AMWhile you can program a configuration easily enough, there is no was to check what you have set up.
The best check is the proof that the keypress does what you intended with the remapping!

Quote from: TimC on July 20, 2023, 12:59:15 AMIt would be good if you could press a button on your remote and see which button the Flirc recognises it as.
If you have a Windows PC then install Flirc, open up Notepad, and press keys on the remote.

Quote from: TimC on July 20, 2023, 12:59:15 AMThe list of remotes it emulates is pretty limited. Most are really gaming or streaming remotes, i.e. not really set up for things like a PVR.
It will work with any IR remote that issues keyboard commands. Use the qwerty template.

Quote from: TimC on July 20, 2023, 12:59:15 AMI'm not sure where to go from here.
Persist.
Beyonwiz T2, Beyonwiz U4, IceBox BYO with Hauppauge WinTV-dualHD (x2), Hauppauge WinTV-quadHD