Control your computer remotely using Alexa voice commands with full Portuguese language support!
Alexa Computer Control is a complete voice-controlled solution that allows you to remotely manage your computer using Amazon Alexa. Built with Node.js, AWS Lambda, and the Alexa Skills Kit, it provides secure Wake-on-LAN functionality, safe shutdowns, status monitoring, and full Portuguese language support.
- π Remote Power On: Wake-on-LAN support for remotely turning on your computer
- π Safe Shutdown: Secure shutdown with 1-minute safety delay
- β Cancel Shutdown: Ability to cancel scheduled shutdowns
- π Status Monitoring: Check if your computer is online and running time
- π§π· Portuguese Support: Full Brazilian Portuguese voice command support
- πΊπΈ English Support: Also accepts English voice commands
- π Secure Authentication: API key-based security for all endpoints
- π± Multi-platform: Works with any Alexa-enabled device
- π Home Automation: Perfect for smart home setups
- βοΈ Cloud-based: Uses AWS Lambda for reliable cloud execution
- Turn On: "Alexa, peΓ§a para o controle do computador ligar meu computador"
- Turn Off: "Alexa, peΓ§a para o controle do computador desligar meu computador"
- Check Status: "Alexa, peΓ§a para o controle do computador verificar status do computador"
- Cancel Shutdown: "Alexa, peΓ§a para o controle do computador cancelar shutdown"
- Turn On: "Alexa, ask Computer Control to turn on my computer"
- Turn Off: "Alexa, ask Computer Control to turn off my computer"
- Check Status: "Alexa, ask Computer Control to check computer status"
- Cancel Shutdown: "Alexa, ask Computer Control to cancel shutdown"
βββββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β Alexa Device βββββΆβ Alexa Skills βββββΆβ AWS Lambda βββββΆβ Your Computerβ
β β β Service β β Function β β (Local) β
βββββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββ
β β
β βΌ
β ββββββββββββββββ
β β Express β
βββββββββββββΆβ Server β
β (Node.js API)β
ββββββββββββββββ
- AWS Account with Lambda and Alexa Skills Kit access
- Ubuntu/Linux Computer to run the local server
- Wake-on-LAN enabled on your computer
- Node.js 18+ installed
git clone https://github.com/kidush/alexa-computer-control.git
cd alexa-computer-control./get-network-info.shThis script will help you find your network interface and MAC address.
cd computer-server
# Copy and configure environment variables
cp .env.example .env
# Edit .env file with:
# - API_KEY: A strong secret key
# - COMPUTER_MAC: Your network card MAC address# Install ethtool if not available
sudo apt install ethtool wakeonlan
# Enable Wake-on-LAN (replace 'eth0' with your interface)
sudo ethtool -s eth0 wol g
# To make it permanent, add to /etc/rc.local:
echo "ethtool -s eth0 wol g" | sudo tee -a /etc/rc.local# Install server dependencies
cd computer-server
npm install
# Install Lambda function dependencies
cd ../lambda-function
npm installcd computer-server
npm startThe server will be available on port 3000.
# In another terminal
./test-server.shYou need to expose your local server so AWS Lambda can access it:
Option A: ngrok (Recommended for testing)
# Install ngrok: https://ngrok.com/download
ngrok http 3000
# Note the public URL provided (e.g., https://abc123.ngrok.io)Option B: Router Port Forwarding
- Configure port forwarding: port 3000 β your computer's internal IP
- Use your external IP in COMPUTER_SERVER_URL
Option C: VPN/VPS
- Set up a VPN tunnel to your home computer
Automated Deployment:
# Configure AWS CLI first
aws configure
# Deploy using our script
./deploy-lambda.shManual Deployment:
-
Go to AWS Lambda Console
-
Click "Create function"
-
Choose "Author from scratch"
-
Name:
computer-control-alexa-skill -
Runtime:
Node.js 18.x -
Create the function
-
Upload the code:
cd lambda-function
zip -r function.zip .
# Upload function.zip via AWS Console- Configure environment variables:
COMPUTER_SERVER_URL: Your server's public URLAPI_KEY: Your secret API keyCOMPUTER_MAC: Your computer's MAC address
-
Go to Alexa Developer Console
-
Click "Create Skill"
-
Name: "Controle do Computador" (or "Computer Control")
-
Primary language: "Portuguese (BR)" (or "English (US)")
-
Model: "Custom"
-
Hosting method: "Provision your own"
-
Configure Interaction Model:
- Copy content from
alexa-skill/interactionModel-pt-BR.json - Paste in the JSON Editor
- Copy content from
-
Configure Endpoint:
- Type: AWS Lambda ARN
- ARN: Your Lambda function ARN
- Region: Your AWS region
-
Test the skill in the simulator
- β Strong API Key: Use a minimum 32-character random API key
- π₯ Firewall Configuration: Allow only necessary traffic
- π Monitor Logs: Watch server logs for suspicious activity
- π HTTPS Preferred: Configure SSL certificate if possible
- πͺ Consider VPN: Use VPN instead of direct exposure when possible
- β° Safety Delays: 1-minute shutdown delay for safety
- π― Endpoint Protection: Authentication required for all critical endpoints
- β API key authentication
- β CORS protection
- β Input validation
- β Audit logging
- β Safe shutdown delays
- β Error handling
- Verify the skill is enabled in your Alexa account
- Confirm invocation name: "controle do computador" (PT) or "computer control" (EN)
- Check skill status in Alexa Developer Console
# Check if server is running
curl http://localhost:3000/health
# Check server logs
cd computer-server && npm start
# Test with your API key
curl -H "Authorization: Bearer your-api-key" http://localhost:3000/health# Check WoL status
sudo ethtool eth0 | grep Wake-on
# Enable WoL
sudo ethtool -s eth0 wol g
# Test locally
wakeonlan 00:11:22:33:44:55
# Check BIOS settings for WoL support# Test shutdown command locally
sudo shutdown -h +1
# Check user permissions
sudo visudo
# Add: username ALL=(ALL) NOPASSWD: /sbin/shutdown- Check CloudWatch logs for detailed error messages
- Verify environment variables are set correctly
- Test server URL accessibility from external networks
alexa-computer-control/
βββ computer-server/ # Local Node.js server
β βββ server.js # Express server with API endpoints
β βββ package.json # Server dependencies
β βββ .env.example # Environment configuration template
βββ lambda-function/ # AWS Lambda function
β βββ index.js # Alexa skill handler
β βββ package.json # Lambda dependencies
βββ alexa-skill/ # Alexa skill configuration
β βββ interactionModel-pt-BR.json # Portuguese interaction model
β βββ interactionModel.json # English interaction model
β βββ skill-manifest.json # Skill manifest
βββ deploy-lambda.sh # Automated AWS deployment script
βββ test-server.sh # Server testing script
βββ get-network-info.sh # Network information helper
βββ QUICK_START.md # Quick setup guide
βββ README.md # This file
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/ |
GET | β | Server status |
/health |
GET | β | Health check |
/shutdown |
POST | β | Shutdown computer |
/cancel-shutdown |
POST | β | Cancel shutdown |
/wake |
POST | β | Wake-on-LAN |
# Get network information
./get-network-info.sh
# Test local server
./test-server.sh
# Deploy to AWS Lambda
./deploy-lambda.sh
# Start local server
cd computer-server && npm start
# Start with custom port
cd computer-server && PORT=8080 npm start- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- π Issues: GitHub Issues
- π Documentation: Check the
QUICK_START.mdfor detailed setup - β¨ Features: Request new features via GitHub Issues
- Amazon Alexa Skills Kit for voice interface capabilities
- AWS Lambda for serverless computing
- Node.js and Express.js for the local server
- Wake-on-LAN protocol for remote power management
π Happy voice controlling! Now you can manage your computer from anywhere in the world with just your voice!