Skip to content

227. Logitech's own catalogue names a rhythm, and their analyser had named three of them wrongly

A protocol family's name in the rhythm table used to come from Logitech's analyser, and every entry named that way was wrong. Section 160 retired their analyser as evidence for a rhythm, having measured it accepting two rhythms their compiler does not emit and naming both correctly, and section 162 found it wrong about a family outright. What was left unexamined is that it was still the only source of a name for a corpus measured entry. Three entries were named that way. All three carried another family's durations.

The fix is not three renames. It is that Logitech states the rhythm of each of their families, so a rhythm can be looked up rather than named by a decoder, and nameByCatalogue in bin/protocols.ts does that for every entry the generator produces.

Where the statement comes from

../logitech-harmony-ir-archive, a third party's checkout of Logitech's infrared database, pinned at commit d84df0b: 684 protocol definitions in Logitech's own IrProtocol shape, each stating its carrier and its durations in microseconds. Decision 15 in docs/decisions.md governs what may cross into this repository from it, which is durations and names through our own converter and never a file of its own. packages/codec/src/archive.ts is that converter and packages/codec/test/archive.test.ts its tests, which skip without a checkout exactly as the corpus tests skip without a lab.

The calibration, which is what makes the naming worth anything

Of the 31 frame rhythms in our own table, 30 are reproduced from Logitech's definition field for field, and none disagrees. The two measurements have nothing in common: ours came off configurations their compiler produced for appliances chosen here and off records real remotes were carrying, theirs was fetched from their service and transcribed by somebody else. The one absence is MitsubishiO1 Dual 8 16 Bit, which sends two codes inside one frame and is not the one cell per bit shape this converter reads.

Reading their notation into ours took four conventions, three of which were lessons this project had already paid for once:

  • A cell is stated in either order and it matters. A pulse distance family states (mark, space) with the space carrying the bit; a pulse width family such as Sony states (space, mark) with the mark carrying it. Our reader takes a train from its first mark and reads (mark, space) pairs, so a space first cell shifts everything by one.
  • A lone opening mark means three different things and the cell says which. Where the mark carries, the cell's constant space is the header's space: their header [2400], cell (600, 600 or 1200) is our header [2400, 600], flat 600 for Sony 12 Bit. Where the space carries and a lead in sits in another slot, the lead in is the header: JVC 16 Bit's 8400 and 4200 are in a code segment named JVC 16 Bit KeyCodeStart, which is section 159's finding in Logitech's own vocabulary. Where the space carries and there is no lead in at all, the lone mark is the opening burst our table calls firstMark, 270 against 260 for all fourteen later cells of the Sharp scheme.
  • The segment named for the family is the frame, not the first one. JVC 16 Bit's repeat is a separate segment, and reading segment zero gives a lead in carrying no payload. The archive's own README warns about the same trap from the other side, for 4.81% of its commands.
  • The carrier is the truncated reciprocal. floor(1e9 / f), section 41. Comparing the other way round reported 30 of 37 families as disagreeing by one nanosecond, which is how this was got backwards once already.

357 of the 684 definitions read as a frame rhythm. The 327 refusals are counted by reason and each names a shape still to be written rather than a family that cannot be expressed: 105 are biphase, where the bit is which half of the cell carries the carrier and our table already has a shape for four of them, and 142 state something other than two cells, which includes the base four families.

The lookup, and what it refuses

The key is the carrier, the header and the four durations, matched exactly: the point of asking their catalogue is to get their answer rather than a nearby one. 653 of the 684 definitions are distinct on that key. Every one of the 24 rhythms held by more than one family is that family at several bit widths, Sony 12, 15 and 20 among them, so the width from keycodeFields narrows it, and 17 rhythms are still ambiguous afterwards. Those keep the name they had: a guess is worse than an old name.

It runs per rhythm and not per entry, and the data is what asked for that. The group their analyser called MemorexO1 32 Bit holds three rhythms, and renaming the group whole would have buried the smallest of them.

What moved

entry became codes corroborated by
MemorexO1 32 Bit 38.0 kHz, 81 codes Toshiba 32 Bit 81 the compiled entry of that name, 622 codes
MemorexO1 32 Bit 38.0 kHz, 24 codes Roku 32 Bit 1 24 nothing but the rhythm
MemorexO1 32 Bit 38.0 kHz, 3 codes stayed MemorexO1 32 Bit 3 their analyser and their catalogue agreeing
SharpO1 48 Bit 38.0 kHz Sharp 48 Bit 2 33 the compiled entry of that name, 345 codes
SharpO1 48 Bit 36.4 kHz PanasonicV2 48 Bit 12 the compiled entry of that name, 4 codes

Three of the five are confirmed by a route with nothing in common: the corpus set merged onto an entry their compiler had produced and their catalogue had named, so two independent sources agree on both the rhythm and the name. Roku 32 Bit 1 rests on the rhythm alone and its row says so, source being corpus. The 3 code entry is the case the tie breaker exists for: 9000/4500/560/560/1690 is stated for MemorexO1 32 Bit and for PDP 32 Bit alike, and their analyser said MemorexO1, so two sources naming one of two candidates settles it where either alone would not.

The table went from 38 entries to 37 and its confirmations from 6 to 9, which is the shape of the result: fewer rows, more of them confirmed twice. Every entry is now one rhythm reproducing every one of its own codes to the microsecond, and no entry has a spread at all, where before one covered its 108 codes only within 2%. That entry was three families.

Two claims this kills

A family does not arrive at two carrier frequencies. The whole evidence for that was two entries their analyser both called SharpO1 48 Bit, at 38.0 and 36.4 kHz. Their real SharpO1 48 Bit is a 38.2 kHz protocol with a 20500 microsecond closing gap, and neither entry was that. Logitech states one carrier per family. The carrier stays in the key because a rhythm is only a rhythm at a frequency, which is a different reason from the one that was recorded.

One rhythm does not carry two names with no rule for choosing. docs/config-format.md and the table's own header said the table kept both Sharp 48 Bit 2 and SharpO1 48 Bit because there was no rule about which name a caller would ask with. There is a rule: the catalogue states the rhythm, so the rhythm identifies the family. Their two vocabularies do still differ, section 159, which is what the heardAs field on a row is now for, and it is kept precisely because a claim that their analyser is unreliable needs a case somebody can check.

What should have caught it here, without the archive

Two things, and both were already written down in this document.

The section that measured those three duration sets recorded that from 8990/4490/568/552 to 9000/4500/562/562 the mark goes down while the clear space goes up. A recording tolerance moves both the same way, so that pair of numbers was already saying two definitions rather than one wobbling.

And the same paragraph said the third set "is nominal NEC exactly", which is a statement that it is a protocol in its own right, and then concluded the variation was per appliance within a family. The measurement was right, the inference was wrong, and what carried the wrong inference was trusting the analyser's name for the group after this project had already stopped trusting it for a rhythm.

The generator refuses to write the table without the archive, since a regeneration on a machine without one would silently restore the analyser's names. No checkout, an environment variable pointing at nothing, and a schema version this reader does not know all give the same refusal and a nonzero exit, and that was measured with the table compared before and after to confirm it writes nothing.

The second pass: biphase, and the 424 families the corpus has never seen

Written the same day, once the first pass had shown the converter could be trusted.

Biphase reads too, which took the reading from 357 of the 684 definitions to 459. A biphase family states its two cells in opposite orders out of the same two lengths, a clear bit space then mark and a set bit mark then space, and that is what the first pass was counting as a malformed pair. The polarity is read off which cell opens on a mark and it is genuinely per family: their Magnavox 13 Bit sends a set bit mark first and their Philips RC5 13 Bit Toggle, which their own schema also calls RC5, sends it space first. The lead in is the header's atoms exactly as they stand, since our table stores intervals rather than a count of cells.

All four of our measured biphase rows agree with their definitions, half cells, polarity and lead in pulse for pulse, including Microsoft 30 Bit's thirteen interval lead. So the calibration is 34 of 35 with none disagreeing, up from 30 of 31, and the one absence is still the dual code family.

The 424 stated entries are the payload. Every family the catalogue defines, that this converter reads, and that no configuration here holds a record of, is now a row with source: 'stated' and codes: 0. The table went from 37 entries to 461, which is the difference between answering for 37 of Logitech's families and answering for 461 of their 684.

424 and 461 are the counts of the day and they are 421 and 458 now, section 230: three of these rows were withdrawn on 31 August 2026, their rhythm being one this table's shape states wrongly rather than one it cannot state, which is a worse failure than a refusal and was found by comparing against Logitech's own renderings. The counts below are left as they were measured, and the live figures carry a fact: marker in docs/status.md and docs/config-format.md.

Three things about those rows are deliberate:

  • codes: 0, exact: 0 and spread: 0 are the honest numbers in all three places, not one flag and two placeholders. Nothing here was measured off anything.
  • No tail and no held, so blockOfStatedCode refuses them and only the frame can be built. Corrected the next day, section 228: their definition states what follows a frame, in a field nobody here had read, and reading it reproduces all 29 blocks measured off their compiler to the microsecond. 16 of these 424 rows carry a whole block as a result. What their definitions do not state, on 645 of 684, is how many times a repetition is sent, so the other 408 stay buildable rather than writable. 424 and 408 are 421 and 405 since section 230. The reason given here, that what follows a frame does not follow from the bits, was true and was the wrong reason: it does not follow from the bits and it did not have to.
  • Every claim in stated.test.ts about the corpus is now scoped to the measured 37, through one MEASURED filter, and the calibration in archive.test.ts excludes the stated rows for the opposite reason: a stated row agrees with the catalogue by construction, so counting it as agreement is circular and would grow more convincing the more rows were added.

Two rules of ours turn out to be common in Logitech's catalogue rather than oddities, which is worth more than the rows themselves.

Logitech 24 Bit was for a long time the only family whose set bit is the shorter carried half, and a comment in the test said so while calling it "exactly the shape of claim this project distrusts: a rule no counterexample could reach". Three more turned up as the corpus grew. The catalogue defines 84 more. So an emitter must read the polarity off the table per family, and that is no longer an inference from four cases out of 37.

The oneMark shape, where the mark rides with its own cell's bit so there is no constant half at all, was three families out of 37 and was first read as a defect: a reader demanding one flat length refused all three and lost 29 catalogue commands. The catalogue defines 52 more of them.

What is still refused is 225 definitions in eight named buckets, and naming them is the point, since one "could not read" bucket hides which reading to write next:

definitions shape
75 base four, a cell is one of four lengths. Quad in a family's own name, and our table has a shape for it, but a definition does not state that shape's digit widths or closing gap
67 base sixteen, a cell is one of sixteen lengths. Hex in the name, and there is no shape here at all
35 one interval per bit, so equal bits merge on the wire. ADA 40 Bit sends a clear bit as an 833 space and a set bit as an 833 mark, so three set bits are one 2499 mark. No shape here, and a decoder cannot read one off a train without knowing the family
29 a header this converter cannot read as a lead in
12 a cell that is not one mark and one space
3 biphase whose two cells differ slightly in their half cell lengths, 890/917 against 876/904. Our shape has one mark and one space, and no record here needs more
3 no segment named for the family
1 neither half of the cell varying

The first three are shapes rather than defects, and each needs its own reading with a calibration to score it against. The three biphase ones are the case for not inventing a field: a per bit value half cell could be added in an afternoon and nothing here could check it.

One question a stated family raised and the measured ones answered. Their 3B Technology 27 Bit states a lead in of a 260 mark and a 265 space, and its clear bit cell opens on a 250 space, so a code whose first bit is clear emits two spaces in a row. On the wire that is one 515 space and no appliance can tell the difference; in a stored record it is either two words or one, and this family has no record here to say. All four biphase families that do have records behave the same way on one bit value or the other, whichever leaves the lead in beside a like half, and each reproduces every record it was measured over to the microsecond, 533 records between them. So the stored form keeps the two apart and the emitter is already right. It is pinned by a test, because it stops being harmless the moment a block is derived from their definitions.


Section 226 | the archive | section 228. Section 227 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.