Lg Thinq Universal
/install lg-thinq-universal
LG ThinQ Universal Manager
🎯 Goal
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.
📦 Supply Chain & Dependencies
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 theLG_DEVICE_ID.
- Network Access: The installation script connects to
pypi.orgto download these libraries.
🔑 Obtaining Credentials
If the user asks how to get their tokens, provide these instructions:
- Visit the Portal: https://connect-pat.lgthinq.com
- Log In: Use your official LG ThinQ account.
- Create Token: Click "ADD NEW TOKEN", give it a name (e.g., "OpenClaw"), and select the required features.
- Copy PAT: Copy the generated Personal Access Token (PAT) immediately.
- Identify Country: Use your 2-letter ISO country code (e.g.,
US,IN,GB).
🛠️ Prerequisites
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.
🔄 Agent Workflow (Mandatory)
Follow these steps in order when a user requests setup:
Step 1: Discovery
Run the automated discovery script. It validates configuration and prepares the device database.
Mandatory Safety Flow:
- Generate Manifest: Run
./setup.sh(without flags). - Brief User: Present the Manifest and explain exactly what actions will be performed.
- Ask for Permission: Use
ask_userto obtain explicit consent. - Execute: Only after approval, run:
./setup.sh --confirm.
Step 2: Assemble Workspace
Review the output from Step 1. Present the discovered devices to the user. Once an ID is selected, move immediately to assembly:
- Generate Manifest: Run
python3 scripts/assemble_device_workspace.py --id \x3CDEVICE_ID>(without flags). - Ask for Permission: Use
ask_userto obtain consent for the file/directory operations. - Execute: Run:
python3 scripts/assemble_device_workspace.py --id \x3CDEVICE_ID> --confirm.
Step 3: Document and Persist
After the assembly script completes, you MUST immediately:
- Analyze: Review the
[AVAILABLE COMMANDS]and[ENGINE CODE]printed by the script. - Consult Reference: Read
references/api-reference.mdfor technical headers and control logic. - Generate SKILL.md: Create the documentation in the new directory using
references/device-skill-template.mdas your guide. - Persistence: Save the trigger phrase, skill path, and command summary into your global
MEMORY.md.
⌨️ Universal Management Commands
Use these commands for maintenance and discovery:
| Command | Description | Use Case |
|---|---|---|
python scripts/lg_api_tool.py list-devices |
List all linked appliances | Verify connectivity |
python scripts/lg_api_tool.py save-route |
Discover regional server | Fix "Route not found" errors |
python scripts/lg_api_tool.py get-state \x3Cid> |
Get raw device state | Deep debugging |
python scripts/lg_api_tool.py --help |
Show all API tool options | Explore advanced features |
🛡️ Security Mandates
- Zero-Leak Policy: NEVER ask the user to paste their
LG_PATinto the chat. - Credential Isolation: NEVER copy
LG_PATinto generated device skill directories. OnlyLG_DEVICE_IDis permitted in those locations. - Local-Only: All API communication must remain local.
📚 References
| Document | Purpose |
|---|---|
references/skill-creation.md |
Detailed post-setup workflow for creating device skills |
references/skill-generation-guide.md |
Instructions for building device-specific SKILL.md files |
references/manual-setup.md |
Manual installation steps (without setup scripts) |
references/api-reference.md |
Technical details on API headers and control logic |
references/device-example.md |
Complete example of a generated device skill |
references/public_api_constants.json |
Public API keys and constants used by the scripts |
🚨 Error Handling
| Symptom | Resolution |
|---|---|
401 Unauthorized |
Token expired. Guide user to https://connect-pat.lgthinq.com. |
No devices found |
Verify device is added to the official LG ThinQ App on mobile first. |
Permission denied |
The script should already be executable. If not, inform the developer. |
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install lg-thinq-universal - 安装完成后,直接呼叫该 Skill 的名称或使用
/lg-thinq-universal触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Lg Thinq Universal 是什么?
Universal LG ThinQ device setup and control. Discovers appliances and generates secure device skills. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 384 次。
如何安装 Lg Thinq Universal?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install lg-thinq-universal」即可一键安装,无需额外配置。
Lg Thinq Universal 是免费的吗?
是的,Lg Thinq Universal 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Lg Thinq Universal 支持哪些平台?
Lg Thinq Universal 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Lg Thinq Universal?
由 Utkarsh Tiwari(@utkarshthedev)开发并维护,当前版本 v1.1.0。