beware that's prototyping ina very early stage ...
This Alexa Custom Skill connects Alexa to your Home Assistant instance, allowing you to control devices and request status updates in German.
- Amazon Developer Account for Alexa Skills Kit (ASK) development
- AWS Lambda access
- Home Assistant with the Conversation API enabled
- Home Assistant Long-Lived Access Token for authentication
- Go to the Alexa Developer Console.
- Click "Create Skill".
- Enter a name (e.g.,
the homeassistant). - Choose Custom as the skill type and AWS Lambda as the backend service (recommended).
- Upload the Interaction Model:
- Navigate to Build → Interaction Model → JSON Editor.
- Replace the content with the
interaction_model.jsonfile from this repository. - Click Save Model and then Build Model.
- Open the AWS Lambda Console.
- Create a new function (Python 3.9 or newer).
- When creating the Lambda function, assign it a Basic Execution Role so it can write logs to CloudWatch: AWSLambdaBasicExecutionRole
- Upload the contents of the
lambda_function.pyfile. - In Configuration → Environment Variables, set the variables listed below.
- Copy the ARN of your Lambda function.
- In the Alexa Developer Console → Endpoint: choose AWS Lambda ARN and paste the ARN.
- On the AWS Lambda console add enviroment variables as listed below
| Variable | Description |
|---|---|
HA_URL |
Base URL of your Home Assistant (e.g., https://my-ha-domain.com). |
HA_TOKEN |
Long-Lived Access Token from Home Assistant (Profile → Long-Lived Access Tokens). |
HA_LANG |
Language for the Home Assistant Conversation API (de for German, default: de). |
HA_AGENT |
(Optional) Agent ID if multiple agents are configured in HA. |
HA_HOME |
Greeting text when the skill is launched (default: Hausassistent). |
HA_PROMPT |
(Optional) Additional prompt text for more precise responses from HA. |
Once the skill is published or enabled in developer mode, you can interact with it using commands such as:
"Alexa, frage den Haushelfer"
"Status Klimaanlage"
"schalte die Kaffeemaschine aus"
Currently the interaction is done in German, but can be easily translated to en ...
- It's working against my HA installation, where it's using a chatgpt assistant client
- I can ask to report the status of the exported sensors in differnet means and also actions are possible.
- interaction via Alexa developer console and alexa chat of the alexa app are working in ground functionality
- interaction via speach need a good rythmus, which is mainly caused by the alexa frontend
- one-shot actions are currently only working in the chats
- to catch the requests the intent needs a starting word/clause since the simple alexa intent interaction only allows this
- Errors and debug output appear in the CloudWatch Logs of your Lambda function.
- If Alexa reports that Home Assistant is not reachable:
- Check
HA_URLandHA_TOKEN. - Make sure your Home Assistant instance is accessible from AWS.
- Check