Can't import IR code file

I got a set of hex codes from Parasound, in XLS format. I exported to csv. I looked at it in text editor, looks fine. I get error “Invalid CSV record at position 1: CSV deserialize error: record 1 (line: 1, byte: 401): missing field key

Here are the first few lines:

BALANCE FRONT,PRONTO,0000 006D 0022 0002 0156 00AB 0015 0041 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0015 0015 0040 0015 0041 0015 0041 0015 0041 0015 0044 0015 0015 0015 0041 0015 0015 0015 0041 0015 0041 0015 0015 0015 0015 0015 0017 0015 0041 0015 0015 0015 0041 0015 0015 0015 0015 0015 0041 0015 0040 0015 0041 0015 060F 0156 0055 0014 0E53
BALANCE LEFT,PRONTO,0000 006D 0022 0002 0156 00AB 0015 0041 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0015 0015 0040 0015 0041 0015 0041 0015 0041 0015 0044 0015 0041 0015 0041 0015 0015 0015 0041 0015 0040 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0041 0015 0015 0015 0015 0015 0041 0015 0040 0015 0041 0015 060F 0156 0055 0014 0E53
BALANCE REAR,PRONTO,0000 006D 0022 0002 0156 00AB 0015 0041 0015 0040 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0015 0015 0041 0015 0041 0015 0040 0015 0041 0015 0044 0015 0041 0015 0041 0015 0015 0015 0015 0015 0040 0015 0015 0015 0040 0015 0017 0015 0015 0015 0015 0015 0040 0015 0040 0015 0015 0015 0040 0015 0015 0015 0041 0015 060F 0156 0055 0014 0E53
BALANCE RIGHT,PRONTO,0000 006D 0022 0002 0156 00AB 0015 0041 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0015 0015 0040 0015 0041 0015 0041 0015 0041 0015 0044 0015 0041 0015 0015 0015 0041 0015 0041 0015 0040 0015 0015 0015 0015 0015 0017 0015 0015 0015 0041 0015 0015 0015 0015 0015 0015 0015 0041 0015 0040 0015 0041 0015 060F 0156 0055 0014 0E53
BASS DOWN,PRONTO,0000 006D 0022 0002 0156 00AB 0015 0041 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0015 0015 0040 0015 0041 0015 0041 0015 0041 0015 0044 0015 0041 0015 0015 0015 0041 0015 0015 0015 0041 0015 0015 0015 0015 0015 0017 0015 0015 0015 0041 0015 0015 0015 0040 0015 0015 0015 0040 0015 0041 0015 0041 0015 060F 0156 0055 0014 0E53

What am I doing wrong?

I had a similar problem with an Emotiva pre/proc. In that case, though, while they were known to be Pronto codes, for some reason they were given in rich text format, so I had to copy/past into a text editor, so more room for error.

When I click the link “click here for formats we accept” it’s dead.

First dumb question: should the heading “Key,format,code” be included as the first line? I did, no luck either way.

When i create a blank remote it creates a file whose first line is “key”, “format”, “code”. Should the double quotes be included in the heading?

Maybe I’ll try that now.

Glad nobody in this helpful community has responded yet. I would have posted a never mind, but it was way past bed time.

Yes, you do need the column titles, and yes, you do need the double quotes. I guess they’re escape characters to tell R2 they’re not code or keys. Paying more attention to the instructions, which say the order of the columns is irrelevant, this would not make sense without the column headers.

Adding to that confusion, when I corrected this in Libre Office Calc, it somehow inserted non-ASCII characters instead of the double quotes, even though I was supposedly exporting it as .csv R2 kept nagging me that it only accepted ASCII or unicode, even though it was ASCII. Well, except for those characters. All good now though.

Hi, @Wotan. Thanks for posting your findings to answer your own question. I would like to understand how to import some IR codes but I can’t figure out how to even upload a CSV file. Could you point me in the right direction, please?

Hi,
your first line in your csv file should be
key,format,code

Maybe also the blanks could be also a problem.

So please try the following as CVS file:

key,format,code
BASS_DOWN,PRONTO,0000 006D 0022 0002 0156 00AB 0015 0041 0015 0041 0015 0041 0015 0015 0015 0015 0015 0015 0015 0015 0015 0017 0015 0015 0015 0015 0015 0015 0015 0040 0015 0041 0015 0041 0015 0041 0015 0044 0015 0041 0015 0015 0015 0041 0015 0015 0015 0041 0015 0015 0015 0015 0015 0017 0015 0015 0015 0041 0015 0015 0015 0040 0015 0015 0015 0040 0015 0041 0015 0041 0015 060F 0156 0055 0014 0E53

Hope that helps
Cheers
Marco

From the top menu of the Web configurator, go to “remotes”. I don’t have it in front of me right now, but instead of selecting a brand and device (which gives very generic codes that may or may not work) you need to “create blank”. I believe next you click the pencil icon for edit, then there is a “bulk import” button. Click on that, and you should be able to browse for the file you want on your computer. As Marco42 points out, the first line in your csv file should be a heading like “key, format, code”. The column titles do not need to be single or double quoted, though I think either are accepted (but I could be wrong). The columns can be in any order so long as they correspond to the heading. Also, if your codes are in Pronto format the format column is optional.

Many manufacturers supply remote hex codes for their devices (check the “support” sections). Often they are in Microsoft Excel format. You can open these in a spread sheet program like Excel or Libre Office Calc, and export as csv. After that I like to open them in a text editor like Notepad or Emacs or, one of my favorites, Edit Pad Pro under Windows, and make sure there are no formatting codes left behind by the spread sheet program. There should be nothing but ASCII letters and numbers (a through f for the hex codes), spaces (which i believe are ignored), commas and carriage returns. Each line should end with a carriage return. In Edit Pad Pro (and probably other text editors) you can turn on a paragraph symbol to show them

After you have a code set in Web Configurator, you can start assigning hard and soft buttons to commands. With each assignment you make you get a list of available commands, from what you downloaded, got from the generic devices, or learned manually (which I haven’t had to do so far). For the hard buttons you should be in “map buttons”, with a list of commands that are usually similar to the ones in you code set, but you still need to assign them. When you’re in a particular field of button names, a pointer shows you what physical buttons on the remote you’re assigning. The list of available commands to assign could be long, but there is a search function.

The company Global Cache makes devices that you put on your network and they can convert data from the network to various protocols like IR or RS232. I bought one of their IP to RS232 devices, and hope to be able to use it with R2 some time down the line. They also have an extensive database of IR codes, called “control tower”. Access is free, but to get more than a line at a time you need to register and be verified. This happened within a business day for me. I have yet to find a device that is not listed in this database The trick is the codes they send you, which you have to copy from your email, paste into a text editor and save as a csv, include multiple protocols. I was beside myself trying to delete the columns I didn’t need until kennymc.c pointed out that all I needed to do is edit the heading line so that the “key” item points to the commands column and the “code” item points to the hex (Pronto) code. Then all other fields are ignored.

I’ve been trying to suggest politely to the team that they include this information in their “getting started” document… Also, I hope down the road they can assist us in configuring Global Cache IP to IR or Wi Fi to IR devices to supplement the feeble IR signal sent by the dock, or to use on a device outside the line of sight.

1 Like

@Wotan please take a look at this screenshot of a partial dataset from Global Cache:

Using your suggestions from an earlier post above, I saved this as a CSV file, changed the “function” header to “key”, and then “code1” to “code” and tried to import. It said successful import, but 0 records were imported. Go figure that one.

So I figure I need to adjust the headers somehow, but to what? And I hope I don’t have to physically eliminate columns; I hope the import routine will just skip over the ones it can’t read or does not want.

It also has a “format” column and a button that will show which formats it supports. Alas, the button is not operational. I respectfully request that such info is provided soon to users; hard to move forward.

So that’s where I am in import-land. Any help from anybody much appreciated.

How do you know that zero records were imported? When you go to assign a button on the remote, is the list of commands empty? It’s not an error I have seen, if it says the import was successful.

Actually, I think it’s “hexcode2” that needs to be changed to “code”. Try that.

1 Like

It’s hexcode1 you have to change to code. This is the PRONTO code. hexcode2 and code2 are actually empty when you look at the two commas at the end of each paragraph. code1 is another format which I think is also planned to be supported when you look at the roadmap. This will probably also include the iTach devices Wotan mentioned, since this integration was announced during the Kickstarter campaign as a stretch goal…

1 Like

Ok, I contacted Anthem directly and got their codes in a different format. After some simplification, here is what I came up with (abbreviated for space):

The quotes around the first two code names were just a failed experiment. They did not change the error I received:

I’m missing something that’s probably real simple. It’s saved as csv, BTW. Does anybody see my mistake?

Update: I added quotes around Key and Code and got almost the same error as follows:

I used to have a knack for troubleshooting, but I’m stumped. And as a gentle suggestion, this isn’t how end users should be spending their time.

You sent us a spread sheet image just for readability, right? If there is just one non-ASCII character anywhere you’ll get an error like that. The separator tokens in csv are commas, obviously. I suggest re-posting this as text for troubleshooting help. Some text editors will display a square or other symbol for an unknown character. Even if the spread sheet program says it’s exporting as csv, it may not be.

I’m pretty sure quotes around any record are ignored, though I haven’t tried it everywhere. When I put quotes around the heading titles in Libre Office Calc and exported as csv, the quotes were non-ASCII instead.

Thanks for the correction.

The column names have to be in lower case like key and not Key

2 Likes

And my gentle suggestion: a simple two or three page tutorial on importing or lerning IR codes could have saved many users much head banging. I too am pretty good with troubleshooting and I appreciate this isn’t a “don’t worry your pretty little head about what’s going on under the hood” (with an attractive lady smiling at you every time you fire up the configuration program) product like Harmony, but I had many headaches getting to square one with this thing. Once I got there, it was pretty much the slow climb up the learning curve I was expecting, though. Now at least it’s gotten to be more fun.

Good to know.

Kudos to @kennymc.c for cracking the code; in my case, lower case headers. Honestly it might have been next year before I tried that one.

Before that, I used excel’s CLEAN function to scrub the text, then copied and pasted values on top of the original text.

Okay now at Base Camp 3 in route to Mt. Olympus. Thanks to all for help thus far. Couldn’t have done it without others taking the time to document their successes and failures.

kennymc.c in particular has been most helpful to me. Maybe some day if I end up writing code for UC I’ll name something kennymc.c in his honor :slight_smile:

1 Like

Hi, just received my remote and am struggling to import the IR dataset. I am a long time Philips pronto programmer and still use the TSU9800 for my HT.
I copied for testing some codes directly from Prontoedit to an Excel file and saved it as CSV.

I also do get the error "Invalid CSV record at position 1: CSV deserialize error: record 1 (line: 1, byte: 34): missing field key.

Unfortunately I can’t attach the file itself, but this is a screenshot. Wouldn’t it be much easier if Unfolded would provide a simple importsheet?
What is wrong about this file? It also doesn’t work when I leave the " " around key etc…

Hi Teejoo,

can you save the file as csv and open it with an Texteditor like VSCode or notepad ++
Think that could help and eliminate problems like special characters etc.

Cheers

It looks like this when I open it with notepad.

Oh, nice. Please remove all “
Then save be sure that at the end of the line are now special characters.
Then save it and give it a try. Maybe Pronto needs to be in uppercases.