🦀 ClawHub
Local Tuya Light Control
by @ooxtcoo
Control local LSC/Tuya lamps and groups to turn on/off, set brightness, colors, white modes, query status, or onboard after repair or network changes.
TERMINAL
clawhub install fully-local-tuya-light-control-skill-lsc-connect-app-devices📖 About This Skill
name: tuya-lights description: Control Hari's locally configured LSC/Tuya lamps and lamp groups from the workspace Tuya registry. Use when the user asks to turn a lamp or group on/off, dim to a percentage, set white mode, set warmweiß/kaltweiß, change named colors, query lamp status, or onboard/update local Tuya lamps after repair or network changes. Typical triggers: 'Stehlampe an', 'Stehlampe 50%', 'Stehlampe rot', 'Küchenlampe aus', 'alle Lampen aus', 'Vorzimmer an', 'Vorzimmer aus'.
This skill may be installed outside the Tuya project directory, so do not assume the project root is relative to this SKILL.md.
Use these default project locations first:
C:\Users\1111\.openclaw\workspace\tuya-lights%USERPROFILE%\.openclaw\workspace\tuya-lights~/src/tuya-lightsIf the local installation uses a different location, adjust this SKILL.md to match the actual project path.
Prefer the Go CLI variant:
lampctl.exelampctlUse Python only as fallback when the CLI binary is not available.
Source of truth
tuya_lamps.jsonlampctl.exe (Windows) or lampctl (Linux/Android)lamp_control.pytuya_test_lamp.pyKEY_EXTRACTION.mdONBOARDING.mdCommand patterns
Windows PowerShell / CMD (ohne cd, direkt mit .\):.\lampctl.exe stehlampe on
.\lampctl.exe stehlampe brightness --value 50
.\lampctl.exe stehlampe color --value rot
.\lampctl.exe kitchen off
.\lampctl.exe all off
.\lampctl.exe vorzimmer onLinux / Android / Termux (mit cd)
cd ~/src/tuya-lights && lampctl stehlampe on
cd ~/src/tuya-lights && lampctl stehlampe brightness --value 50
cd ~/src/tuya-lights && lampctl stehlampe color --value red
cd ~/src/tuya-lights && lampctl küche off
cd ~/src/tuya-lights && lampctl all off
cd ~/src/tuya-lights && lampctl vorzimmer onPython fallback only if CLI is unavailable
python lamp_control.py stehlampe on
Natural language mapping
an -> onaus -> off50% -> brightness --value 50rot/blau/grün/... -> color --value warmweiß -> warmwhitekaltweiß -> coldwhitealle Lampen -> group allVorzimmer -> group vorzimmerOnboarding / repair
If a lamp was repaired, re-paired, or moved to another network, assume thelocal_key may have changed. Read KEY_EXTRACTION.md and ONBOARDING.md, refresh the key, test with the preferred CLI first (lampctl status ), then use tuya_test_lamp.py --probe if Python fallback is needed, and finally update tuya_lamps.json.Portability note
This skill intentionally prefers explicit standard project paths so it can still work after being copied into a separate OpenClaw skills directory. If a local installation uses a different layout, update this SKILL.md so the binary and project paths match that environment.Current live lamps
kitchenlivingroom_floorvorzimmer1vorzimmer2vorzimmer3vorzimmer4Live groups
allvorzimmerDiscover devices
lampctl discoverC:\Users\1111\.openclaw\workspace\tuya-lights\lampctl.exe" stehlampe off