An Alexa skills kit that converts custom voice commands into MQTT messages for home automation systems deployed on AWS Lambda.
git clone https://github.com/mattmattmatt/alexa-iot.gitThis Alexa skills kit bridges voice commands and MQTT-based home automation systems. It interprets incoming Alexa intents and translates them into MQTT messages sent to your broker, enabling voice control of custom smart home devices. The skill runs on AWS Lambda and handles device discovery automatically. It supports self-signed certificates for secure MQTT connections and can be adapted to work with alternative protocols like HTTP or Pushbullet. Ideal for developers building custom voice-activated home automation without relying on pre-built integrations.
Configure your MQTT broker credentials in `/env.js`, ensure SSL certificates are placed in `/certificates/ca.crt` if needed, then run `npm install` and `make deploy` to upload to AWS Lambda. Test locally with `node index2.js` before deploying. Define your custom intents in the interaction model at Amazon Developer Console.
Control custom smart home devices via Alexa voice commands
Route Alexa intents to MQTT brokers for home automation
Create voice entry points for non-standard home automation systems
Enable voice control of Tasker AutoRemote or HTTP-based systems
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/mattmattmatt/alexa-iotCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create an Alexa skill that allows users to control their home automation system via voice commands. The skill should integrate with an MQTT broker to send commands to devices. The skill should support commands for [DEVICE_TYPE] in [ROOM_NAME] such as 'turn on', 'turn off', 'set brightness to [VALUE]', and 'set temperature to [VALUE]'. Provide the necessary code and instructions for setting up the skill and connecting it to the MQTT broker.
## Alexa Skill for Home Automation
### Overview
This Alexa skill allows you to control your home automation system via voice commands. The skill integrates with an MQTT broker to send commands to your devices.
### Supported Commands
- Turn on/off devices
- Set brightness levels
- Set temperature
### Setup Instructions
1. **Prerequisites**: Ensure you have an MQTT broker set up and running. You will also need an Amazon Developer account to create the Alexa skill.
2. **Create the Alexa Skill**: Go to the Alexa Developer Console and create a new skill. Choose the 'Custom' model and 'Provision your own' backend.
3. **Define the Interaction Model**: Add the necessary intents and slots for your devices and commands. For example:
- Intent: `TurnOnIntent`
- Slot: `DeviceType`
- Slot: `RoomName`
- Intent: `SetBrightnessIntent`
- Slot: `DeviceType`
- Slot: `RoomName`
- Slot: `Value`
4. **Implement the Backend**: Use the Alexa Skills Kit SDK to handle the intents and send the appropriate MQTT commands. Here is a sample code snippet in Node.js:
```javascript
const Alexa = require('ask-sdk-core');
const mqtt = require('mqtt');
const client = mqtt.connect('mqtt://your-mqtt-broker');
const TurnOnIntentHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'TurnOnIntent';
},
handle(handlerInput) {
const deviceType = Alexa.getSlot(handlerInput.requestEnvelope, 'DeviceType').value;
const roomName = Alexa.getSlot(handlerInput.requestEnvelope, 'RoomName').value;
client.publish(`home/${roomName}/${deviceType}/set`, 'ON');
return handlerInput.responseBuilder
.speak(`Turning on the ${deviceType} in the ${roomName}`)
.getResponse();
}
};
exports.handler = Alexa.SkillBuilders.custom()
.addRequestHandlers(TurnOnIntentHandler)
.lambda();
```
5. **Test and Deploy**: Test your skill using the Alexa Simulator in the Developer Console. Once tested, deploy your skill to the Alexa Skills Store.AI-powered recruiting for top talent
Automate your browser workflows effortlessly
Get more done every day with Microsoft Teams – powered by AI
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan