Use local node dist/cli.js only.
Do not use plugin APIs.
Do not invent device mappings.
MEROSS_EMAIL and MEROSS_PASSWORD before cloud commands.MEROSS_REGION is optional.npm install && npm run build.devices.json or other files.set-device command, show exact deviceId, capability, and value to the user and get explicit confirmation.deviceId first.devices.json.switch capability is valid.devices.json in skill root.node dist/cli.js setup-once '{}'
setup-once rewrites device set to normalized entries:deviceId=plug_channel=0capabilities=["switch"]node dist/cli.js <command> '<json-input>'
Supported commands:
list-devicesget-stateset-devicediscover-cloud-devicessetup-onceCore patterns:
node dist/cli.js list-devices '{}'
node dist/cli.js get-state '{"deviceId":"plug_abc"}'
node dist/cli.js set-device '{"deviceId":"plug_abc","capability":"switch","value":"on","confirmation":{"userConfirmed":true,"deviceId":"plug_abc","capability":"switch","value":"on"}}'
node dist/cli.js set-device '{"deviceId":"plug_abc","capability":"switch","value":"off","confirmation":{"userConfirmed":true,"deviceId":"plug_abc","capability":"switch","value":"off"}}'
node dist/cli.js discover-cloud-devices '{}'
node dist/cli.js setup-once '{}'
For delayed switch commands:
deviceId, capability, value, and absolute user-timezone timestamp before scheduling.confirmation object in the scheduled set-device payload.stdoutstderr, non-zero exitDEVICE_NOT_FOUND, DEVICE_OFFLINE, AUTH_FAILED, MEROSS_API_ERROR, INVALID_INPUT, REGISTRY_ERROR, AMBIGUOUS_DEVICE, CONFIRMATION_REQUIRED, INTERNAL_ERROR共 3 个版本