Vicky's Lookup Tool

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

xnappo
Expert
Posts: 862
Joined: Tue Dec 30, 2003 12:29 pm

Vicky's Lookup Tool

Post by xnappo »

Hi Vicky,

I asked this a while back, but... I have to ask again (you said no last time).

Why can't you add a feature to your awesome lookup tool to generate a starting point .rmdu file? Currently when I do this, I copy the HTML output of the tool like this:
http://www.getzweb.net/jp1/data_returns ... bpid=++151

into OpenOffice, and the paste the columns into RM-IR and manually set up the protocol info.

Looking at the file format of an RDMU, it seems like whatever is generating the HTML table should be able to be modified to directly spit out a .rdmu:

Code: Select all

Remote.name=URC-8910(New) Extender 1
Remote.signature=CPT0CPx1
DeviceType=DVD
DeviceIndex=2
SetupCode=2000
Protocol=01 2A
Protocol.name=MCE
ProtocolParms=116 15
FixedData=E2 80 0F 74
Function.0.name=0
Function.0.hex=00
Function.1.name=1
Function.1.hex=01
...
I really think this would be a nice feature for new users!

Thanks for considering it :)

xnappo
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

xnappo wrote:Hi Vicky,

I asked this a while back, but... I have to ask again (you said no last time).

Why can't you add a feature to your awesome lookup tool to generate a starting point .rmdu file?
Okay, first off, while I’m an RM user, I'm not intimately familiar with the guts of the program. I know that there is source code available for RM but there are two programming languages that I can’t read, and java is one of them, so that’s not going to do me any good.

Looking at the file format of an RDMU, it seems like whatever is generating the HTML table should be able to be modified to directly spit out a .rdmu:

Code: Select all

Remote.name=URC-8910(New) Extender 1
Remote.signature=CPT0CPx1
DeviceType=DVD
DeviceIndex=2
SetupCode=2000
Protocol=01 2A
Protocol.name=MCE
ProtocolParms=116 15
FixedData=E2 80 0F 74
Function.0.name=0
Function.0.hex=00
Function.1.name=1
Function.1.hex=01
...
My instinct tells me that this is not nearly as clear cut as you seem to think. I fully appreciate the difficulties that Greg and Graham face when they deal with protocols.ini and the RDF’s and quite frankly I’m just not in their league.
I know that RM can be very forgiving about the Remote name and I’ve probably got the remote signatures right, but then you get to the device type and device index, which vary by remote. So you need to capture that information from the RDF’s. Then it’s the Protocol. I’m not sure if the protocol is available for the remote, in which variant form. I’d have to make sure that the protocol names I get from Rob’s spreadsheet exactly match the protocols named in RMIR…. So I’ve got to actually understand protocols.ini got to know protocols available by processor and by variant by remote…. It just seems mind boggling to me.
Currently when I do this, I copy the HTML output of the tool like this:
http://www.getzweb.net/jp1/data_returns ... bpid=++151

into OpenOffice, and the paste the columns into RM-IR and manually set up the protocol info
I just went in and did a paste into RM and see that it doesn’t parse the data into two columns like KM does. It puts all the data into one column. I can see how that would be annoying. I know this has bugged you for quite a while, and the auto generating of an RDMU seems to be too difficult for me, but I have a compromise. What if on that page after I give you all the Function/EFC’s

I copy and paste for RM users
Functions
num 0
num 1
...

EFC’s
198
134
...

This would make it so you could skip the Open Office Step.
xnappo
Expert
Posts: 862
Joined: Tue Dec 30, 2003 12:29 pm

Post by xnappo »

vickyg2003 wrote: I know this has bugged you for quite a while, and the auto generating of an RDMU seems to be too difficult for me, but I have a compromise. What if on that page after I give you all the Function/EFC’s

I copy and paste for RM users
Functions
num 0
num 1
...

EFC’s
198
134
...

This would make it so you could skip the Open Office Step.
Hi Vicky,

Okay - that sounds good - that step is definitely what I am trying to avoid.

With the way RM-IR works now, it would be really nice to someday incorporate this database into RM-IR. The way the interface is now, it is confusing that you can't 'Edit' a built-in device in order to move around the key assignments.

Thanks (and Merry Christmas!)!
xnappo
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

xnappo wrote:
vickyg2003 wrote: This would make it so you could skip the Open Office Step.
Okay - that sounds good - that step is definitely what I am trying to avoid.

With the way RM-IR works now, it would be really nice to someday incorporate this database into RM-IR. The way the interface is now, it is confusing that you can't 'Edit' a built-in device in order to move around the key assignments.

Thanks (and Merry Christmas!)!
xnappo
I wouldn't say its confusing, more that it's annoying.

The database you see on the website is my processed version. What my processed version gives you is a combination of all the remotes that I know about. Not all remotes have all these keys defined even if the keys are available, and you probably noticed that sometimes there are different EFC's for the same function.

I'm hoping to get some time to do some website changes, one will be the RM-Friendly copy. I'm also TRYING putting together some static "how to pages" that will illustrate more clearly why you should use an extender. I think if I had a clear idea of what a remote could do with an extender I would have been more adventurous.
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

After much trial and error, there is now a RemoteMaster friendly list that you can copy the functions and then copy the EFCs into remote master.
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.
xnappo
Expert
Posts: 862
Joined: Tue Dec 30, 2003 12:29 pm

Post by xnappo »

vickyg2003 wrote:After much trial and error, there is now a RemoteMaster friendly list that you can copy the functions and then copy the EFCs into remote master.
Great thanks Vicky! I will add some details to the RM-IR Wiki on how to use it.

Regards,
Chris
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

vickyg2003 wrote:After much trial and error, there is now a RemoteMaster friendly list that you can copy the functions and then copy the EFCs into remote master.
I think some a very minor change to the top list will allow copying and pasting function names and EFCs in a single operation.

When I looked at the generated HTML, I noticed there is a leading space between the EFC value and the opening td tag. Just remove that leading space. It wouldn't hurt to remove the trailing spaces as well, as well as the spaces around the function name.

Current HTML:

Code: Select all

		  <tr> 
        
          <td class="row2"> num 0  </td> 
          <td class="row2"> 012  </td> 
          </tr> 
 
        <tr> 
		          
		  <tr> 
        
          <td class="row1"> num 1  </td> 
          <td class="row1"> 236  </td> 
          </tr> 
Fixed HTML:

Code: Select all

		  <tr> 
        
          <td class="row2"> num 0  </td> 
          <td class="row2">012  </td> 
          </tr> 
 
        <tr> 
		          
		  <tr> 
        
          <td class="row1"> num 1  </td> 
          <td class="row1">236  </td> 
          </tr> 
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

no getting rid of the spaces didn't work, because even when it was
<td class="row1">236</td> when you copied and pasted it into RMIR i or notepad it was putting an extra space on the end so it still wouldn't paste.

The only thing I could do to get rid of the spaces was take it out of table cells. I spent hours trying to get that to paste.
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

It may depend on what browser you use. I use Chrome
I'll change RMIR so it strips leading and trailing spaces when pasting
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

gfb107 wrote:It may depend on what browser you use. I use Chrome
I'll change RMIR so it strips leading and trailing spaces when pasting
Yes it definately could depend on the browser.
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.
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

This turns out to be more of a pain than I thought. When IE puts HTML table columns as plain text in the clipboard, it doesn't do what all other browsers do, and even what Excel does, which is to use the TAB character as the column delimiter. Instead, they use the space character. Absolutely brilliant, don't you think? There's no way to figure out where the column breaks are when the text in any of the columns might contain a space character.

I have determined that IE (and the other browsers) also make the HTML available in the clipboard, which I can get to and parse directly to find the columns. I'll work on that.

What were they thinking!
vickyg2003
Site Admin
Posts: 7109
Joined: Sat Mar 20, 2004 12:19 pm
Location: Florida
Contact:

Post by vickyg2003 »

gfb107 wrote:This turns out to be more of a pain than I thought. When IE puts HTML table columns as plain text in the clipboard, it doesn't do what all other browsers do, and even what Excel does, which is to use the TAB character as the column delimiter. Instead, they use the space character. Absolutely brilliant, don't you think? There's no way to figure out where the column breaks are when the text in any of the columns might contain a space character.

I have determined that IE (and the other browsers) also make the HTML available in the clipboard, which I can get to and parse directly to find the columns. I'll work on that.

What were they thinking!
Yes I always wonder "what were they thinking" when I deal with MS and their "improved" products.

I do know that the "RemoteMaster Friendly List" works from IE so I think we've got it covered already. No need to fret over the cut and paste. This doesn't get us to the level that Chris has asked for, but it does make it so that both KM and RM have a convenient way to process data from my website. Right now I'm working on my husbands lap top and it really doesn't matter to me if I use KM or RM, but when I work in KM on my home computer its dog slow. I like that RM is light enough that I can have multiple instances open.
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.
xnappo
Expert
Posts: 862
Joined: Tue Dec 30, 2003 12:29 pm

Post by xnappo »

gfb107 wrote:I have determined that IE (and the other browsers) also make the HTML available in the clipboard, which I can get to and parse directly to find the columns. I'll work on that.
Well, if you are going to go that far... How much harder would it be to parse the entire page and allow it as an alternate 'Import' fuction? ie automatically fill out Protocol/Device/Sub-device/Fixed?

Okay - probably significantly harder - just thought I would ask.

xnappo
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

That would definitely be a lot harder to do. The problem is that the HTML is actually rather complex considering what the data is, and the parsing would most likely break if there are changes to the HTML for presentation changes.

You talked earlier about having the tool generate an RMDU file directly.

Vicky didn't like that idea, for some very valid reasons.

I think generating an XML file would be easy for Vicky, and easy to parse. Another option would be JSON, which is also very easy to generate and parse and is less verbose than XML, and some would say easier for humans to read. The only catch for us is that numbers must be in decimal, hex is not allowed, although we could work around that by using strings for hex values (e.g. "$0022" for PID 0022)

The JSON file format would look something like:

Code: Select all

{
  setupCode: 0000,
  deviceType: "Cable",
  protocol: { 
    name: "Zenith",
    pid: 34
  }
  deviceParms: [ 5, 0 ],
  fixedData: [ 06 ],
  functions: [
    { name: "num 0", efc: 012 },
    { name: "num 1", efc: 236 },
    { name: "num 2", efc: 076 },
    ...
    { name: "Settings", efc: 109 },
    { name: "Surround", efc: 014 }
  ]
}
An equivalent XML format would be:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<deviceUpgrade>
  <setupCode>0000</setupCode>
  <deviceType>Cable</deviceType>
  <protocol>
    <name>Zenith</name>
    <pid>0022</pid>
  </protocol>
  <deviceParms>
    <parm>5</parm>
    <parm>0</parm>
  </deviceParms>
  <fixedData>
    <byte>06</byte>
  </fixedData>
  <function><name>num 0</name><efc>012</efc></function>
  <function><name>num 1</name><efc>236</efc></function>
  <function><name>num 2</name><efc>076</efc></function>
    ...
  <function><name>Settings</name><efc>109</efc></function>
  <function><name>Surround</name><efc>014</efc></function>
</deviceUpgrade>
gfb107
Expert
Posts: 3411
Joined: Sun Aug 03, 2003 7:18 pm
Location: Cary, NC
Contact:

Post by gfb107 »

vickyg2003 wrote:I do know that the "RemoteMaster Friendly List" works from IE so I think we've got it covered already. No need to fret over the cut and paste. This doesn't get us to the level that Chris has asked for, but it does make it so that both KM and RM have a convenient way to process data from my website
I'm still going to make the change to strip leading and trailing spaces, and then I think would be worth documenting in the Wiki and/or on your page that any users not using IE can cut and paste function names and efcs in one operation from the first table. I may even go all the way to parsing the HTML just because it irks me. Maybe you can even detect the browser being used and only generate the second table when it is IE.
Post Reply