Hi together,
i have installed and configured HA and Alexa custom skill. If i ask Alexa with the right utterance “Alexa, ask butler alfred ping zztestscript” the connection between HA and Amazon is ok. Alexa gives me the right answer, but do not execute the script.
The configuration is done via this manual: Amazon Alexa Custom Skill - Home Assistant
This is the outcome of the debug log in HA:
2023-01-17 14:31:41.413 DEBUG (MainThread) [homeassistant.components.alexa.intent] Received Alexa request: {'version': '1.0', 'session': {'new': True, 'sessionId': 'amzn1.echo-api.session.xxxxxxxxxxx', 'application': {'applicationId': 'amzn1.ask.skill.xxxxxxxxxxxxxxx'}, 'attributes': {}, 'user': {'userId': 'amzn1.ask.account.xxxxxxxxxxxxxxxxxxxxxx', 'accessToken': 'xxxxxxxxxxxxx'}}, 'context': {'Viewports': [{'type': 'APL', 'id': 'main', 'shape': 'RECTANGLE', 'dpi': 213, 'presentationType': 'STANDARD', 'canRotate': False, 'configuration': {'current': {'mode': 'HUB', 'video': {'codecs': ['H_264_42', 'H_264_41']}, 'size': {'type': 'DISCRETE', 'pixelWidth': 1280, 'pixelHeight': 800}}}}], 'Viewport': {'experiences': [{'arcMinuteWidth': 346, 'arcMinuteHeight': 216, 'canRotate': False, 'canResize': False}], 'mode': 'HUB', 'shape': 'RECTANGLE', 'pixelWidth': 1280, 'pixelHeight': 800, 'dpi': 213, 'currentPixelWidth': 1280, 'currentPixelHeight': 800, 'touch': ['SINGLE'], 'video': {'codecs': ['H_264_42', 'H_264_41']}}, 'Extensions': {'available': {'aplext:backstack:10': {}}}, 'System': {'application': {'applicationId': 'amzn1.ask.skill.xxxxxxxxxxx'}, 'user': {'userId': 'amzn1.ask.account.xxxxxxxxxxx', 'accessToken': 'xxxxxxxxxxx'}, 'device': {'deviceId': 'amzn1.ask.device.xxxxxxxxxxx', 'supportedInterfaces': {}}, 'apiEndpoint': 'https://api.eu.amazonalexa.com', 'apiAccessToken': 'xxxxxxxxxxx'}}, 'request': {'type': 'IntentRequest', 'requestId': 'amzn1.echo-api.request.xxxxxxxxxxx', 'locale': 'de-DE', 'timestamp': '2023-01-17T13:31:41Z', 'intent': {'name': 'Ping', 'confirmationStatus': 'NONE', 'slots': {'pings': {'name': 'pings', 'value': 'zztestscript', 'resolutions': {'resolutionsPerAuthority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.xxxxxxxxxxx.Pings', 'status': {'code': 'ER_SUCCESS_MATCH'}, 'values': [{'value': {'name': 'zztestscript', 'id': 'xxxxxxxxxxx'}}]}]}, 'confirmationStatus': 'NONE', 'source': 'USER', 'slotValue': {'type': 'Simple', 'value': 'zztestscript', 'resolutions': {'resolutionsPerAuthority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.xxxxxxxxxxx.Pings', 'status': {'code': 'ER_SUCCESS_MATCH'}, 'values': [{'value': {'name': 'zztestscript', 'id': 'xxxxxxxxxxx'}}]}]}}}}}}}
Intent config in HA:
Ping:
action:
service: script.turn_on
target:
entity_id: script.{{ pings | replace(" ", "_") }}
speech:
type: plain
text: Ping erfolgreich
HA sample script:
alias: zztestscript
sequence:
- type: turn_on
device_id: xxxxxxxx
entity_id: switch.licht
domain: switch
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- type: turn_off
device_id: xxxxxxxx
entity_id: switch.licht
domain: switch
mode: single
Alexa Skill config:
{
"interactionModel": {
"languageModel": {
"invocationName": "butler alfred",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "AMAZON.NavigateHomeIntent",
"samples": []
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
},
{
"name": "Ping",
"slots": [
{
"name": "pings",
"type": "Pings"
}
],
"samples": [
"Ping",
"ping {pings}"
]
}
],
"types": [
{
"name": "Pings",
"values": [
{
"name": {
"value": "zztestscript"
}
}
]
}
]
}
}
}
I do not know where i can find the issue, that the script is not startet. Any idea?
Thanks a lot!