Skip to content

277. A device's power variable belongs below narrow, the renumbering that puts it there, and the width is not why the activity stays silent

Corrected by section 278. The transition this section treats as not firing did fire; what failed was the send in the list it ran, which lacked the 0x7C every corpus send carries. The silent flag's elimination below by reading 0xE24 afterwards was also invalid, since the dispatcher clears it on return, though its conclusion holds by another route. Both are kept as written.

Section 276 fixed base slot 13's header and the activity still only beeped. This is the second attempt at the same target and it separates two things that had been one: the composer now produces the variable shape Logitech's generator produces, which is a real correction, and that shape is not what was stopping the television. Both halves are measured on hardware.

What the corpus says about where a power variable goes

A variable below the table's narrow count is stored as one byte and one at or above it as two, section 35. Across the fourteen programmed configurations, counting every variable's record:

carry transitions
below narrow, one byte 91 of 194
at or above narrow, two bytes 0 of 64

A device's power variable is nothing but its transitions, so appending one at the end of the table, which is what composeDevice did, produces a shape no generator here has ever emitted. The calibration is on the same remote: its own working activity drives the same television through variable 36 on that config, below narrow, carrying the same two transitions in the same order.

The leading byte of a transition is 0x00 in 569 of 569 across those fourteen, which is worth recording because it was briefly read as a per transition enable bit. See the correction below.

The renumbering, and the site enumeration it needs

Inserting at narrow shifts every variable at or above it up by one, so every reference has to move. renumberStateVariables in packages/codec/src/compose.ts does that, same length throughout, since every site is an opcode byte or an operand's low byte already present.

Where a reference can be is one enumeration and it lives in one place, stateVariableSite in actions.ts, beside the readings that state the same fact in prose. Three kinds:

kind references across the fourteen configs
the write band, 0x80 \| n, index in the opcode 3281
0x70, 0x71, 0x72, index in the operand's low byte 3371
six sub opcodes of the 0x1F band, likewise 1511
total 8163

0 of those 8163 name a variable its own container's base slot 13 does not have, which is the closure that says the three kinds are the ones a generator uses.

A first survey of this got it wrong and the error would have been silent. It counted two of the six band sub opcodes, the pair inventory.ts needs by name, and reported 100 references where there are 1511. On the container actually being built it said 28 references had to move where the true figure is 57, so a renumbering built on it would have left 29 instructions naming the wrong device in a file that parses, checksums and round trips. That is why the enumeration is exported from the one module that already knows, with a test that reads the prose readings back and fails if the two lists ever disagree.

What deliberately needs no rewrite, each checked rather than assumed: base slot 14's records are selected by 0x72's high byte rather than indexed by the variable, section 39; base slot 16's are reached through a transition's action list, section 154; a transition's own operand is a list index. A name tree node at level 1 does carry the index, section 77, and is rewritten.

Written and confirmed on hardware

Written to the spare Harmony One on 8 September 2026. The diff against what the remote already held was 80 bytes in 5 blocks, since the remote carried the sibling configuration and only the renumbering differs, so this is much the cheapest write performed here. Every erase checked both neighbours, the configuration read back byte for byte identical, and the remote restarted itself.

section 276's build this one
the variable 51, two bytes 50, one byte
its address in memory 0x13C 0x13A
what it holds after a restart 00 00 00
after pressing the row 01 00 01
where the 0xFE run starts 0x13E 0x13D

Corrected in place. The left column's restart value read 0xFE 0xFE, which is what the first build held before section 276 corrected its header; the rebuild it compares against read 00 00, section 276's own table. The boundary beside it was always the rebuild's.

And the seven existing activities came through the renumbering identical, instruction for instruction, checked by walking every one's enter list before and after with the indices mapped through the shift.

The television still does not respond, so the width is refuted

What works, all of it measured by pressing the row on the connected remote: the row beeps, the activity's keypad map is selected and its volume and channel keys drive the television correctly, the counter goes to 8, and the power variable goes 0 to 1, which is exactly the transition its record declares. What does not happen is the power code, and the screens do not change either.

So the variable's width was not the cause. The claim that survives is the corpus one, that this is the shape a generator emits, which is reason enough to keep the change.

The screens not changing is a second, expected symptom and it is todo.md 1.2.4 rather than a mystery: all seven working activities' enter lists open with 0x7E, enter the activity's own screen mode, and composeActivity builds no such mode, so there is nothing for it to enter.

The record is not the difference, and neither is the silent flag

Two candidates checked and both dead.

The record. Ours against two working power records on the same configuration, byte for byte:

working TV_Power     header 00 00 01 00 02 00 00   values 00 01 00 00 00 ee 0d 7f / 00 00 00 01 00 ef 0d 7f
working Denon_Power  header 00 00 01 00 02 00 00   values 00 00 00 01 00 f1 0d 7f / 00 01 00 00 00 b4 03 7f
ours    LG_Power     header 00 00 01 00 02 00 00   values 00 00 00 01 00 c8 12 7f / 00 01 00 00 00 c8 12 7f

Identical in shape, and the order is not it either, since Denon_Power states its 0 to 1 first as ours does. The only difference of substance is that ours runs the same list for both directions, being a toggle.

The silent flag. 0x07 band 0xFF sets one byte, 0xE24 on arch 12 (Harmony One), and the state write skips its notification when it is nonzero, section 73. Read on the connected remote after the press it is zero, so nothing was suppressed that way. That reading cannot show it, section 278: the dispatcher clears the byte as the write returns. Worth recording separately: the flag gates more than section 73's "whether the screen redraws" suggests, since at 0x2A5B8 a nonzero value branches past the record fetch and the whole transition walk.

What the firmware says should happen, and a correction inside this section

The walker is 0x2A37A on arch 12 (Harmony One), reached from the state write at 0x2A598. It advances the flash cursor past first, reads second, reads the count, and then per transition reads a leading byte into 0xD24, the from into 0xD25 and the to into 0xD27. Matching is a pair of comparisons against the old and new values with two special cases, 0xFFFE as a wildcard and 0xFFFD meaning the value changed, and 0xD29 survives as 1 only if both halves match. On a match with 0xD24 zero, 0x24D22 is called, which is what runs the action.

Ours matches: from 0 equals the old value and to 1 equals the new one. So the firmware as read says this transition should fire, and it does not.

The correction. BTFSS 0xD24,7 two instructions before the firing call was first read here as the gate on the action itself, which would have made the leading byte an enable bit that a writer must set. It is not: bit 7 gates 0xD2B and the action is reached with 0xD24 zero, which is what all 569 corpus transitions carry. The wrong reading came from stopping at the first conditional branch before the call rather than following both arms, and it would have produced a rail demanding a byte no generator writes.

What is not established

Why the transition does not fire. It did; section 278. Every candidate this section could reach is dead: the header, the variable's width, the record's bytes, the record's order, the silent flag, and the firmware path as far as the firing call. 0x24D22 itself is unread, and so is whatever the enter list's missing 0x7E and 0x07 set up.

Whether the two leading instructions are a prerequisite. All seven working activities open with 0x7E then 0x07 and ours opens with neither, which is the last systematic difference left. The cheap discriminator does not need a screen built: point a 0x7E at a mode the configuration already has, which is cosmetically wrong and mechanically sufficient, and see whether the code goes out.

Whether a two byte variable's transitions would fire at all, which this section set out to test and cannot answer either way now: the shape is gone from the composer, and the corpus has 0 of 64 to compare against.

Where it lands

  • docs/config-format.md, base slot 13, on where a composed variable goes and why.
  • packages/codec/src/actions.ts: stateVariableSite, STATE_BAND_SUBS, STATE_LOW_BYTE_OPCODES.
  • packages/codec/src/gspm.ts: actionListSites, immediately below actionList because the two share one layout rule.
  • packages/codec/src/compose.ts: renumberStateVariables, and the insertion at narrow.
  • packages/codec/src/sections.ts: STATE_TABLE_HEADER, which was three literals and a fourth.
  • packages/codec/test/actions.test.ts: the enumeration against its own prose, and the 8163 site census with its zero out of range.
  • packages/codec/test/compose.test.ts: the header's new shape per architecture, the entry pointers surviving in order, the names moving with their variables, a per host census of displaced references, and the refusals.

Section 276 | the archive | section 278. Section 277 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.