Provide a secure, automated gateway for LG ThinQ device integration. This skill acts as a discovery engine and skill generator, allowing users to control their appliances via OpenClaw without duplicating sensitive credentials across multiple files.
For transparency and security, this skill performs the following automated installation steps:
Python Virtual Environment: Created locally within the skill directory to ensure isolation.
External Packages (via PyPI):
requests: Used for secure communication with the LG ThinQ API.python-dotenv: Used for local management of the LG_DEVICE_ID.Network Access: The installation script connects to pypi.org to download these libraries.
If the user asks how to get their tokens, provide these instructions:
US, IN, GB).The agent MUST ensure the following are set before proceeding:
LG_PAT: Stored in shell environment or root .env.LG_COUNTRY: Stored in shell environment or root .env.Follow these steps in order when a user requests setup:
Run the automated discovery script. It validates configuration and prepares the device database.
Mandatory Safety Flow:
./setup.sh (without flags).ask_user to obtain explicit consent../setup.sh --confirm.Review the output from Step 1. Present the discovered devices to the user. Once an ID is selected, move immediately to assembly:
python3 scripts/assemble_device_workspace.py --id <DEVICE_ID> (without flags).ask_user to obtain consent for the file/directory operations.python3 scripts/assemble_device_workspace.py --id <DEVICE_ID> --confirm.After the assembly script completes, you MUST immediately:
[AVAILABLE COMMANDS] and [ENGINE CODE] printed by the script.references/api-reference.md for technical headers and control logic.references/device-skill-template.md as your guide.MEMORY.md.Use these commands for maintenance and discovery:
CommandDescriptionUse Casepython scripts/lg_api_tool.py list-devicesList all linked appliancesVerify connectivitypython scripts/lg_api_tool.py save-routeDiscover regional serverFix "Route not found" errorspython scripts/lg_api_tool.py get-state <id>Get raw device stateDeep debuggingpython scripts/lg_api_tool.py --helpShow all API tool optionsExplore advanced features
LG_PAT into the chat.LG_PAT into generated device skill directories. Only LG_DEVICE_ID is permitted in those locations.DocumentPurposereferences/skill-creation.mdDetailed post-setup workflow for creating device skillsreferences/skill-generation-guide.mdInstructions for building device-specific SKILL.md filesreferences/manual-setup.mdManual installation steps (without setup scripts)references/api-reference.mdTechnical details on API headers and control logicreferences/device-example.mdComplete example of a generated device skillreferences/public_api_constants.jsonPublic API keys and constants used by the scripts
SymptomResolution401 UnauthorizedToken expired. Guide user to https://connect-pat.lgthinq.com.No devices foundVerify device is added to the official LG ThinQ App on mobile first.Permission deniedThe script should already be executable. If not, inform the developer.