amazon-alexa
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAmazon Alexa Skill
Amazon Alexa Skill
Overview
概述
Enables Claude to interact with Amazon Alexa for controlling smart home devices, managing routines, viewing activity history, and configuring Alexa skills and settings.
让Claude能够与Amazon Alexa交互,实现智能家居设备控制、例程管理、查看活动历史以及配置Alexa技能和设置。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/amazon-alexa/install.sh | bashOr manually:
bash
cp -r skills/amazon-alexa ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/amazon-alexa/install.sh | bash或者手动安装:
bash
cp -r skills/amazon-alexa ~/.canifi/skills/Setup
设置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set AMAZON_EMAIL "your-email@example.com"
undefinedcanifi-env set AMAZON_EMAIL "your-email@example.com"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭证,由你掌控。 Canifi LifeOS尊重你的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭证:
- 使用CDP模式完成浏览器自动化设置
- 在Playwright控制的Chrome窗口中手动登录该服务
- Claude将使用你的已认证会话,全程不会获取你的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭证,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭证仅能在你的本地设备上访问,绝不会被传输。
Capabilities
功能
- Control smart home devices
- Create and manage routines
- View voice activity history
- Manage Alexa skills
- Configure device settings
- 控制智能家居设备
- 创建和管理例程
- 查看语音活动历史
- 管理Alexa技能
- 配置设备设置
Usage Examples
使用示例
Example 1: Device Control
示例1:设备控制
User: "Turn off all the lights through Alexa"
Claude: I'll send the command to turn off all connected lights via Alexa.用户:"通过Alexa关闭所有灯光"
Claude:我将通过Alexa发送关闭所有已连接灯光的指令。Example 2: Create Routine
示例2:创建例程
User: "Create a bedtime routine that turns off lights and sets thermostat to 68"
Claude: I'll create a new Alexa routine with those actions.用户:"创建一个睡前例程,关闭灯光并将恒温器设置为68度"
Claude:我将创建一个包含这些操作的新Alexa例程。Example 3: Check History
示例3:查看历史记录
User: "What commands did I give Alexa today?"
Claude: I'll check your Alexa voice history for today's interactions.用户:"我今天给Alexa下达了哪些指令?"
Claude:我将查看你今天的Alexa语音交互历史。Authentication Flow
认证流程
- Navigate to alexa.amazon.com via Playwright MCP
- Click "Sign In" button
- Enter Amazon credentials
- Handle 2FA if enabled
- Maintain session for subsequent requests
- 通过Playwright MCP导航至alexa.amazon.com
- 点击“登录”按钮
- 输入Amazon凭证
- 若启用了双因素认证则进行处理
- 维持会话以用于后续请求
Error Handling
错误处理
- Login Failed: Retry authentication up to 3 times, then notify via iMessage
- Session Expired: Re-authenticate with Amazon
- 2FA Required: Wait for code via SMS
- Rate Limited: Implement exponential backoff
- Device Offline: Report device status
- 登录失败:最多重试3次认证,然后通过iMessage通知
- 会话过期:重新通过Amazon认证
- 需要双因素认证:等待短信验证码
- 速率限制:实现指数退避策略
- 设备离线:报告设备状态
Self-Improvement Instructions
自我改进说明
When encountering new UI patterns:
- Document Alexa app web interface changes
- Update selectors for new layouts
- Track new smart home integrations
- Monitor routine capability updates
遇到新的UI模式时:
- 记录Alexa应用网页界面的变化
- 更新针对新布局的选择器
- 追踪新的智能家居集成
- 监控例程功能的更新
Notes
注意事项
- Requires Amazon account
- Device compatibility varies
- Routines can trigger multiple actions
- Voice history can be deleted
- 需要Amazon账户
- 设备兼容性因设备而异
- 例程可触发多个操作
- 语音历史可被删除