Home Assistant Assist through Alexa (skill)

I have found a way of getting this working. More than happy to share it with you and anyone else interested.

I did exactly as your docs say; I set up AWS Hosted (not self hosted)

English, USA w/ Virginia in Lambda.

Please, post your solution to help others who are in the same situation.

Buy you are an AI integration with Assist?
Why didn’t you use the Alexa hosted version which is simpler to install and configure?

No, I do not have any AI integration, at all, anywhere.

according to what I read on your first post, it sounded like it was a lot better. I dont know what the 8-second limitation is, but that did not sound good. And you mentioned timeouts with the Alexa version.

AWS hosted , takes a little longer time to install, but does not have Alexa’s 8-second limitation, works with asynchronous calls and uses Account Linking to obtain the Home Assistant access token. This version allows you to use integrations with AI, even slower and more complex models, such as the “Extended OpenAI” integration.

No, have no significant differences.
If you doesn’t use AI integration on Assist, your Assist answer the questions and commands fast, 1-2 secs. max.

You do not need to use AWS version.

1 Like

I’m trying to set up Alexa version but at this point in the doc, I cannot save the ARN, I get an error.

###### Save Failed
https://developer.amazon.com/alexa/console/ask/build/custom/amzn1.ask.skill.48e3b6b0-3163-40c1-9ab1-a6c04271dae9/development/en_US/endpoint#

The trigger setting for the Lambda arn:aws:lambda:us-east-1:893776744604:function:HomeAssistantAssist-SmartHome is invalid. Error code: SkillManifestError

I’m putting in the ARN seconds after clicking the button to copy it from the console.

so then I deleted the Skill and tried again, and I get this error…

Failed to save skill information
Please make sure that "Alexa Smart Home" is selected for the event source type, for provided arn [Invalid value] : arn:aws:lambda:us-east-1:893776744604:function:HomeAssistantAssist-SmartHome

I’m following the doc word-for-word, step-by-step

Note: I moved on to Account Linking and it saved fine. Tried to add ARN to the skill again, same error.

I also completely redid the Lambda function (which saves fine) and that did not help… I cannot save the Skill.

btw, the Docs are incorrect: you must Choose “Alexa” in the drop-down, then after that, the next page gives you 2 options (radio buttons)… one is “Alexa Smart Home” … which is what I’m selecting of course.

While I appreciate the diligent documentation that is 99% accurate… the workflow is challenging.

Account linking is not necessary for Alexa hosted version.
I trying something wrong, I can’t help you, sorry.

I suggest you to use ChatGPT.

I’ve forked the repo with updated config.cfg and lambda_function.py at GitHub - t07que/HomeAssistantConversationStarter: A modified version of fabianosan's Alexa Skill that enhances integration with Home Assistant by: Allowing you to start a conversation with Home Assistant Assist using a custom prompt. Works with Home Assistant Assist, ChatGPT, Google Gemini, or any backend exposed through the conversation platform.

There are instructions to install

For anyone interested it builds on top of this project to allow you to initiate a conversation from a a prompt given from an automation within home assistant.

1 Like

Really good solution.
Reading your code, I now understand what you wanted to do, I believe I had not understood your idea before.

You want to pull request?
I can add you as member of the project.

What does this modification do?

He added a way to start the skill from automation from Home Assistant.
Is a specific use, but is well done.

Thank you I appreciate that, I’m glad reading the code explained it!
I have created a pull request now with an additional installation instruction file, and modified the readme to direct users to the additional installation instructions about how to make change after the initial skill has been created.

If you are happy with the changes it should be fine to import code from the new branch straight into the Alexa dev console when setting up the skill from scratch, although I haven’t tested that yet.

You can probably see from the code already but the extra feature doesn’t impact original functionality, if there is no input text available in HA it will simply open the skill like before.

1 Like

Thank you.
I saw you pull request, but I what to do some changes in the documentation in done.

Is possible to submit a new pull request only with this files?

config.cfg
lambda_function.py
and
Installation_updated_for_conversation_starter.md

I’ll adjust documentation to link your instructions and merge full config and lambda files.

Thank you!

1 Like

Looks great, happy to be a part of the project.

I realised a simple way of extending the length of the prompt: by splitting it into multiple text helpers in HA and recombining them in the lambda function. I tested it though, and it starts to take too long to respond once the prompts get any longer than 255 chars, so it needs more work.

1 Like

@fabianosan , @Jack_Hopperton any change to also implement it on the AWS hosted?

I’ll do the merge in this weekend

Done the merge from AWS version to hosted version with these changes:

- Added "ä ü ß" to improve German speech and better handling regional number separator
- Added new configuration option ask_for_further_commands to control Alexa's behavior after an answer
- Some improvements

Now I’ll merge the enhancements from hosted to AWS version.

nice thanks, i will try when i get home

Hi @fabianosan,

Have you tested what I discussed a few months ago? About the answer “no” in the middle of a sentence and the Assistant just closing the skiill before I finish it?