Skip to content

340. Keeping a device on between activities removes its switch off from the other activities' starts, and an activity's type does not choose its key alone

Todo todo-compile-650.md 3.10 and 3.11. Two questions about what Logitech's compiler does with a setting: what MyHarmony's "leave devices on when switching activities" changes in a configuration, and how to get a compile with an empty activity key, which clearActivityKey needs as its model.

Sources checked: MyHarmony's decompiled client, work/myharmony/src/: the setting is one device's, "I want to keep this device on when switching Activities and only turn it off when I press the Off button", in the device's power settings view, which sets IsPoweredOnBetweenActivities in the device's power feature and saves that one feature with UserFeatureManager/SaveUserFeatures. No client code sets an activity's group; the service assigns it. This document, sections 280, 291 and 314.

The compile pair. The Harmony 650's starting setup (h650_start_config, section 338's) and the same record after two changes made by packages/corpus/bin/build-setup.ts --stage options: the Denon's keep on flag set, and Muziek saved again as Custom. The account read both back, the flag true and Muziek Custom with activity group 0. The record was then synced by MyHarmony to the bench 650 and read off it (h650_options_config), so this compile is the one a person's sync produces.

Keeping the Denon on

The starts of the four activities differ in two writes and no others: Kodi kijken's and Muziek's no longer write Denon_Power 0. Those are the two activities that do not use the Denon. TV kijken and Film kijken still write it 1, nothing is added anywhere, and the All Off list still names the Denon's power variable in both compiles. So on the remote, switching from TV kijken to Muziek leaves the Denon on, and only All Off switches it off, which is what the setting's wording says. The composer can already build that shape by leaving a device out of the targets it completes with 0, section 280; it had no per device option for it until todo-compile-650.md 5.1.1.

Composed since, and closed against the pair. keepDeviceOn cuts the device's write of 0 out of every activity's start in a configuration that already holds them, two calls deep, and leaves the All Off list alone; activityPowerTargets takes the kept devices as keepOn for an activity composed afterwards. Applied to the compile without the setting, it cuts two writes, one in Kodi kijken's start and one in Muziek's, six bytes, and the power writes of all four starts then equal the compile with the setting, activity by activity and in order. The two ends of that check are two compiles Logitech made, so the closure does not lean on our reading of either. What it does not show: a device kept on whose switch off sits in a list several activities share, which this pair does not hold; the function cuts a shared list once and reports every activity reaching it.

Heard on a file of ours, todo-compile-650.md 5.1: the KPN box kept on with keepDeviceOn in Logitech's starting compile and with keepOn in our Plasma kijken, written to the Harmony 650. Switching from Plasma kijken to Muziek sent the KPN box nothing, and All Off then sent its power (reads/20261009T101603Z-ir-test-harmony-650-the-test-setup-composed-onto-logitech-s-starting-configuration.json).

Heard on the Harmony 650, with no write, on this compile as synced (reads/20261008T131427Z-ir-test-harmony-650-the-denon-kept-on-between-activities.json). TV kijken sent the LG's, the KPN box's and the Denon's power on and their inputs. Muziek then sent Kodi's and the Sony's power, the LG's PowerOff and the KPN box's toggle, and the Sony's Function three times for its Audio 2, and nothing to the Denon. All Off then sent the Denon's power off, Kodi's and the Sony's, so the remote had counted the Denon as on throughout.

Seen once and unexplained: at the Listen to Music press the screen went dimmer and stayed so until the batteries came out after the run. Muziek's start in this file holds its power and input steps and the start up and working screens, the same kinds of step as TV kijken's, and the same as in the starting compile, so the file gives no step that sets a light level. How the 650 sets its screen's light is not read; the Harmony One's light state machine is section 103 and is arch 12's. The battery level was not read at the time.

Afterwards, with the same cells in and the cable in, state variable 17 read 0 (0xE21). Section 317 reads it as a battery gauge, since four pictures are drawn only by programs switching on it. Its writers in the 0.2 build do not look like a battery reading: 0x11D18 clears it in an initialisation, and 0x11D34 copies 0x3E9 into it, reached from three routines at 0x11D7E, 0x11DA0 and 0x11DC6, each of which pushes a byte pair into a 30 slot ring buffer at 0x3B7 (0x11C28, the count at 0x3B6 against 0x1E) and, when the push succeeds, raises the variable to 1 or 2 if it is lower. What the buffer holds is not read, so section 317's reading is doubted here and not refuted.

The battery read, first sent. READ_MISC selector 0x0C detail 1, section 212, which Logitech's client offers on the Harmony One alone, sent to the Harmony 650 by packages/usb/bin/read-battery.ts with those cells in and the cable in: it answered 0B 2C, 2860. On the 650's 0.2 build the arm at 0x0CB44 fills 0xD64 and 0xD63 with the high and low bytes, detail 1 from PRODH and PRODL after 0x11184 and detail 0 as a cleared high byte and data memory 0x3FF, and the sender at 0x0CB68 emits 0xD64 first, so the value is 2860. A multimeter across the cells, out of the remote, read 2.92 V: so the value is millivolts, measured under load, and 2.86 V is not a flat battery. That makes low cells an unlikely explanation for the dimmed screen, though a dip while sending is not ruled out. Detail 0 answered 00 00 with 0x3FF reading 0, which agrees and is a weak check, since both are zero. Section 212's "nothing here has asked a remote for either value yet" stops being true here.

Making Muziek Custom

Logitech's compile still puts Muziek on the Listen to Music key, and Kodi kijken, Custom from the start, still holds no key, in both compiles. So an activity's type and its group on the account do not decide its key alone. What does is not established: the four activities keep their order and their handler sets, and the one difference in the inputs is Muziek's type. Section 314's six compiles with an empty Listen to Music key are two setups, and over those thirteen compiles and this pair, fifteen in all, a key is empty exactly where the activities number two: all six with two activities leave Listen to Music empty, and the two with three, five with four and two with five fill all three keys. That is the pattern and not its cause, since no compile here holds three activities with one of them Custom.

MyHarmony's "Customize Activity Buttons" screen explains it, client sourced. The screen offers each of the three keys a list of the activities and no empty choice. Its view model, ActivityModeMapViewModel in work/myharmony/src/Web.MartiniWeb.Tasks.ActivityRemote.ButtonMapping/, builds the three keys as HardRemoteButtons keyed DeviceModeType 5 (Watch TV), 6 (Watch a Movie) and 4 (Listen to Music), each with a short press ButtonActivityAction naming an activity's id and a long press one as well, and saves them with SaveButtonMaps, as the root button map in some upgrade flows: the map keyed by neither a device nor an activity. So the key assignment is a button map of its own and not the activity's type or group, which is why saving Muziek as Custom moved nothing. A key with no activity is representable there, since the builder skips a key with neither press chosen, but the screen never produces one while there are activities to choose. So 3.11 still has no compile of the 650's own setup with an empty key; the two routes are a setup of two activities, or a root button map saved with one key left out.

The 650 has no long press, in its firmware

The client's long press activity has nothing to land on here. On the bench 650's 0.2 build (650-0.2-code-base0x9000-bench.bin) the key handler holds the bare scan code at 0x73D and raises an event by ORing a type onto it and handing the result on through 0x29B, and there are exactly four such ORs in the image: 0x80 at 0x179B2 when a new key goes down, 0xC0 at 0x17952 when a timer started at that press runs out with the key still held, and 0x40 at 0x179FA and 0x17A44 when it is let go. So a key raises press, repeat and release, section 17's three types, and nothing else. The timer's length is 0x200 times 100 for every key and 0x201 times 100 for scan 3, the Help key (MOVLW 3 ; SUBWF 0x73D at 0x179C0), and the two start at 10 and 50 (0x0E4E8): the Help key waits five times longer before its repeat, which is how holding Help differs from pressing it, section 333. The timer's unit and whether repeat fires once or keeps firing are not read here.

So a long press on an activity key could only be imitated by a configuration binding that key's repeat event, as Help's is, and Logitech's compiler binds the activity keys' press alone. That agrees with the product table, which does not declare LongPressAction for the Harmony 650 (docs/how-a-harmony-works.md). Scope: the 650's 0.2 build; the other arch 14 builds and the other architectures are not read here.

Scope, decision 16

One device, one compile pair, arch 14 (the Harmony 650). The other architectures are not checked, and neither is a device kept on that an activity uses for volume or input switching only.

Falsification

A compile with the keep on flag set whose other activities still write that device's power 0, or whose All Off leaves it out; for the key, a compile where saving an activity as Custom alone empties its key.

Where it lands

  • packages/codec/test/devicepower.test.ts: the two starts' dropped writes, exactly, nothing added, and the All Off list in both compiles; and keepDeviceOn on the first compile giving the second's starts.
  • tests/test_usb_firmware.py, TestTheHarmony650SendsTheBatteryLevelHighByteFirst, and packages/usb/test/protocol.test.ts, the battery request and its reply's byte order; HarmonyRemote.readHardwareFeature and packages/usb/bin/read-battery.ts.
  • tests/test_keypad.py, TestTheHarmony650RaisesThreeKeyEventsAndNoLongPress: the four ORs, that there are no others, and the per key delay with its starting values, as bytes.
  • packages/codec/test/activitykeys.test.ts: the three keys and their activities in both compiles. And the tally over the fifteen compiles: activities against empty keys, by count.
  • packages/corpus/src/setup.ts, keepOnPayload and customPayload, and the builder's options stage, with the door MYHARMONY_ALLOW_FEATURE_WRITE in packages/corpus/src/myharmony.ts.
  • docs/config-format.md under entry 1's activity keys.

Section 339 | the archive | section 341. Section 340 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.