Finally got my HP mini-remote-control (HSTNN-PRO7/RC1762302) to work
#1
Spent a long time doing this, so I thought I should share...The remote looks like

Image
My issue was that I have both an Ubuntu kodi box and a Win7 WMC box, and I have a couple regular HP mce remotes (lTSGH-IR02) and this HP mini-remote. I want to use the standard HP usb IR receivers (5188-1667) for both systems. But you can't make the regular remote "mutually exclusive"...no way to identify first as #1 and second as #2, so both media systems respond to either remote. Luckily, HP implemented the mini-remote a different low-level code implementation than the standard ones, so it can be made to operate as mutually exclusive on my kodi system while a standard remote operates the Win7 WMC system. Hurray! (PS...I also tried this with an ATI Wonder RF remote and got totally frustrated...and gave up on it).

There is an HSTNN-PRO7.lircd.conf file out there, but I couldn't get it to work. I think was produced using the HP Pavilion IR receiver rather than the stand-alone HP usb receiver. Don't know...? So I ended up using irrecord to build a new configuration file. First time through, I didn't specify a driver type, and ended up with coding similar to the already posted HSTNN-PRO7 file. Didn't work. On a later attempt, I specified the same driver type as for the standard HP usb remotes and ended up with coding that looked the same (example KEY_POWER of 0x037FEE7BF3):

sudo irrecord -d /dev/lirc0 --driver=default ~/RC1762302.lircd.conf

After it was created, I needed to go in and set the "name" field to "mceusb" apparently for it to find the appropriate entry point into the ~/.kodi/userdata/Lircmap.xml file. And here's the resulting conf file:

-------
# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.9.0(default) on Mon May  4 19:52:07 2020
#
# contributed by M R 4/5/2020
#
# created with sudo irrecord -d /dev/lirc0 --driver=default ~/RC1762302.lircd.conf
# Other versions for HSTNN-PRO7 / RC1762302/00 remote didn't seem to work with
# HP 5188-1667 / OVU4001003/00 Media Center IR USB Receiver. Maybe only for IR
# receiver on HP Media Center laptop? These codes and settings replicate those 
# from larger HP MC remote like TSGH-IR02 / 5070-5600 and in conjunction with
# lirc and kodi personalized settings. Buttons defined left to right from top to bottom.
#
# brand:                       HP mceusb replacement
# model no. of remote control: RC1762302/00 or HSTNN-PRO7
# devices being controlled by this remote: HP 5188-1667 / OVU4001003/00 MC IR USB Receiver
#

begin remote

  name  mceusb
  bits           37
  flags RC6|CONST_LENGTH
  eps            30
  aeps          100

  header       2690   884
  one           425   457
  zero          425   457
  gap          106164
  toggle_bit_mask 0x8000
  rc6_mask    0x100000000

      begin codes
          KEY_POWER                 0x037FEE7BF3
          KEY_EPG                   0x037FEE7BB0
          KEY_BACK                  0x037FEE7BB5
          KEY_VIDEO                 0x037FEE7BDB
          KEY_HOME                  0x037FEE7BF2
          KEY_RECORD                0x037FEE7BED
          KEY_STOP                  0x037FEE7BE6
          KEY_REWIND                0x037FEE7BEA
          KEY_PLAY                  0x037FEE7BE9
          KEY_FORWARD               0x037FEE7BEB
          KEY_TV                    0x037FEE7BEC
          KEY_AGAIN                 0x037FEE7BE4
          KEY_UP                    0x037FEE7BE1
          KEY_NEXT                  0x037FEE7BE5
          KEY_LEFT                  0x037FEE7BDF
          KEY_OK                    0x037FEE7BDD
          KEY_RIGHT                 0x037FEE7BDE
          SlideShow                 0x037FEE7BDC
          KEY_DOWN                  0x037FEE7BE0
          KEY_INFO                  0x037FEE7BF0
          KEY_VOLUMEDOWN            0x037FEE7BEE
          KEY_MUTE                  0x037FEE7BF1
          KEY_VOLUMEUP              0x037FEE7BEF
       end codes

end remote

------------------ 

I also needed to "augment" the ~/.kodi/userdata/Lircmap.xml file to handle some buttons the way I wanted them handled by adding a few entries to the mceusb remote definitions:

<lircmap>
    <remote device="mceusb">
....
        <print>Print</print>

        <!-- new kernel-based lirc button names -->

        <!-- MJR Add-ins for missing HP MCE Remote key definitions  4/24/2020  -->
        <teletext>Visualization</teletext>
        <liveradio>KEY_RADIO</liveradio>
        <recordedtv>RecTV</recordedtv>
        <subtitle>SlideShow</subtitle>
        <!-- MJR  -->

        <eject>KEY_EJECTCD</eject>
....
and
....
<!-- MJR - Modified for HP tiny remote to go to recorded TV 5/4/2020  -->
<!--        <myvideo>KEY_VIDEO</myvideo>  -->
        <recordedtv>KEY_VIDEO</recordedtv>
....
        <info>KEY_INFO</info>
    </remote>

-----------------------

With the limited number of buttons, and my wanting to have the min-remote do most of the things the standard remote did, I needed to add definitions for buttons that I was personally happy with. I ended up putting those in the ~/.kodi/userdata/keymaps/gen.xml file that is usually used by the kodi Keymap Editor add-on. Not sure why, but I read that the gen.xml file is not as easily messed up as the keyboard.xml and keymaps.xml files in that folder, but I think I'm wrong about that. In any case, I got comfortable with the gen.xml format as I was testing the Keymap Editor. So the gen.xml file currently looks like:

-----------------------

<keymap><global><remote><power>ActivateWindow(ShutdownMenu)</power><recordedtv>ActivateWindow(TVRecordings)</recordedtv><title>ActivateWindow(TVGuide)</title><info>ToggleFullscreen</info></remote></global><fullscreenvideo><remote><subtitle>showsubtitles</subtitle><skipminus>Seek(-10)</skipminus><skipplus>Seek(+30)</skipplus><reverse>playercontrol(tempodown)</reverse><forward>playercontrol(tempoup)</forward><left>Rewind</left><right>FastForward</right></remote></fullscreenvideo><TVRecordings><remote><stop>Delete</stop></remote></TVRecordings><shutdownmenu><remote><power>Select</power></remote></shutdownmenu></keymap>

-----------------------

I think that is it....so my mini remote does the following (left to right, top to bottom):
Exit Kodi (first push) complete exit (second push)----Guide----Back----Go To Recorded TV----Home (and start Kodi if not already running...see below)
Record (was UP)----Stop (first push) Erase Dialog (second push for recorded TV)----Slower tempo----Play/puse----Faster tempo
Go To LiveTV channels (was DN)----Skip Back 10 sec----Move Up----Skip Forward 30 sec
Move Left or Rewind----Select/OK----Move Right or Fast Forward
Subtitle Toggle----Move Down----Full Screen Toggle
Volume Down----Mute----Volume Up

-----------------------

To start kodi if it wasn't already running, I put in the trick script from here: 

https://twosortoftechguys.wordpress.com/...s-of-lirc/

and created the needed startup command to get it going on reboot. 

Other standard stuff is to add subtitle functionality to kodi if you expect that button to do anything. 

------------------

Reference: https://www.comparitech.com/kodi/kodi-subtitles/

In Kodi Settings>Player Settings>Language>Enable parsing for closed captions ... ON, Default TV show service ... use Subscene, and Default movie service ... use Subscene

Turn on Subtitles in live tv and recordings playback.

-------------------

That may be it...? This is going to be of interest to a very small audience, but I thought I'd share it nonetheless.  

B
Reply
#2
A little bit of cleanup and functional improvement...

The mini-remote is handy, but it is really mini (as in small), so easy to misplace. And it is not great for fitting in the hand to operate. Not a huge deal. I also found my initial button placement wasn't ideal, and that there was at least one function missing that I wanted to have that was similar to the WMC functionality. So the updated gen.xml now looks like:

<keymap><global><remote><power>ActivateWindow(ShutdownMenu)</power><recordedtv>ActivateWindow(TVRecordings)</recordedtv><title>ActivateWindow(TVGuide)</title><info>ToggleFullscreen</info></remote></global><fullscreenvideo><remote><subtitle>showsubtitles</subtitle><skipminus>Seek(-10)</skipminus><skipplus>Seek(+30)</skipplus><reverse>Rewind</reverse><forward>FastForward</forward><left>playercontrol(tempodown)</left><right>playercontrol(tempoup)</right></remote></fullscreenvideo><TVRecordings><remote><stop>Delete</stop><subtitle>ContextMenu</subtitle></remote></TVRecordings><shutdownmenu><remote><power>Select</power></remote></shutdownmenu></keymap>

Buttons now do the following (left to right, top to bottom):

----

Exit Kodi (first push) and Complete exit (second push)----Guide----Back----Go To Recorded TV----Home (and start Kodi if not already running)
Record (was UP)----Stop (first push) Erase Dialog (second push if in recorded TV....works only if not currently recording)----Rewind----Play/Pause----Fast Forward
Go To LiveTV channels (was DN)----Skip Back 10 sec----Move Up----Skip Forward 30 sec
Move Left or Slower tempo in Playback----Select/OK----Move Right or Faster tempo in Playback
Subtitle Toggle if in Playback / Right-Mouse-Click (context menu) if in recorded TV (allows stop recording to to permit erase)----Move Down----Full Screen Toggle
Volume Down----Mute----Volume Up

----

This puts the playback speedup/slowdown on easier to reach buttons. And Rewind/Fast Forward go back to traditional locations.
This also allows use of the "up arrow" button to stop a recording before attempting to erase it. Trying an erase on a current recording gives an error, and forcing a stop from there was a real hassle. This change makes it a little easier.

Other cleanups and enhancements are possible and likely but (hopefully) are not going to be critical for normal operation...If it seems important, I'll post it...

B
Reply
#3
This is pretty comprehensive, and could do with being shifted to the wiki (with some formatting tidyups)

Even though that remote may not be commonplace, I can see plenty of useful information about diagnosis and troubleshooting there that others will find useful.

Good write-up, bravo!
Reply
#4
Hi bluesight, so you got this RC working on Ubuntu and Windows? How do you do to make it work under Windows? I can turn on the computer via remote, but once in Windows it becomes useless.
I'm trying to use it on an Intel NUC under Windows 7, but can't make it works.
Some tips?
:-)
Reply

Logout Mark Read Team Forum Stats Members Help
Finally got my HP mini-remote-control (HSTNN-PRO7/RC1762302) to work0