Skip to content

Add inStart and ezAdjust commands to open the factory menus - #192

Merged
klattimer merged 1 commit into
klattimer:masterfrom
lab34:factory-menu-commands
Oct 4, 2026
Merged

klattimer merged 1 commit into
klattimer:masterfrom
lab34:factory-menu-commands

Conversation

@lab34

@lab34 lab34 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two commands that open the TV's factory service menus:

lgtv --name MyTV --ssl inStart [pin]    # In-Start service menu
lgtv --name MyTV --ssl ezAdjust [pin]   # EZ Adjust menu

Why

Both menus live in the hidden app com.webos.app.factorywin. A plain system.launcher/launch of that app id starts it in the foreground but keeps it invisible (it silently closes whatever app was running, showing nothing). The menu only actually displays when the app is launched with the factory trigger params and unlocked by sending the service PIN as button presses over the pointer input socket:

  1. ssap://system.launcher/launch with payload {"id": "com.webos.app.factorywin", "params": {"id": "executeFactory", "irKey": "inStart"}} (ezAdjust for the other menu)
  2. wait ~2 seconds
  3. open the pointer socket (ssap://com.webos.service.networkinput/getPointerInputSocket) and send type:button presses for each PIN digit (default 0413, the widely documented default; override with the optional argument)

Implementation

  • New LGTV/instart.py with LGTVInStart, mirroring the existing LGTVCursor pattern (main connection for the launch + getCursorSocket, then re-init the websocket on the pointer socket path to send the digits).
  • LGTV/__init__.py special-cases the two commands, like sendButton (they bypass parseargs, so they are not listed in the --help epilog).
  • README command list updated.

Testing

Tested end to end against a webOS 5 TV (OLED CX series) over --ssl: both inStart and ezAdjust launch the app, and the menu becomes visible after the PIN is sent. Sending an incorrect PIN simply leaves the menu hidden (no harm), and closeApp com.webos.app.factorywin exits it.

The factory menus (In-Start, EZ Adjust) live in the hidden app
com.webos.app.factorywin. A plain launch starts the app in the
background but keeps it invisible: it only shows up when launched
with the executeFactory trigger params and unlocked by sending the
service PIN digits over the pointer input socket.

Add an LGTVInStart helper which launches factorywin with
{"id": "executeFactory", "irKey": "inStart"|"ezAdjust"}, opens the
pointer socket via getCursorSocket and sends the PIN, mirroring the
existing LGTVCursor pattern.

- lgtv --name MyTV --ssl inStart [pin]
- lgtv --name MyTV --ssl ezAdjust [pin]

The PIN defaults to the widely documented default 0413 and can be
overridden as an optional argument. Like sendButton, these commands
bypass parseargs and are not listed in the --help epilog.
@klattimer
klattimer merged commit c7a5151 into klattimer:master Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants