Closed MelleD closed 1 day ago
Please add your proposed changes to the wiki to explain how to use and the features it has
Yes, of course I will do it if the changes are ok with the config.py too. In the end you only have to set the Ha-Url, Ha-Token and auth Tailscale Key. But I will describe the workflow with forking and adding images, but it takes a bit of effort ;)
Thats ok with me.
Please dont edit the wiki directly. Write any mods or new text in here so I can double check before making the changes permanent
Here are some steps you need to take:
The premise is that Tailscale Integration is installed in HA and the HA instance is available as a node.
[AWS Introduction ECR] (https://aws.amazon.com/de/ecr/getting-started/)
[AWS Introduction credentials] (https://docs.aws.amazon.com/de_de/keyspaces/latest/devguide/access.credentials.html#SigV4_credentials)
Remember both carefully because the secret is only displayed once and is required in the next step.
Go to your formed repo under settings. Go to secrets and variables. Create two new secrets with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from the previous step
Then build and push the Docker image under Github Actions.To do this, run .github/workflows/docker-build-push.yml
Congratulations! This is the first step and the result should look like this.
[AWS Lambda] (https://docs.aws.amazon.com/de_de/lambda/latest/dg/getting-started.html)
3.Click "Add Trigger" and copy your skill id from the previous step from the https://developer.amazon.com/alexa/console/ask skill
Now we have to log in to our Tailscale account and create an ephemeral key. Go to settings --> key
Please remember the key. You currently have to do this step every 3 months because the key can no longer be created
An HA long-living token (10 years) must then be created. See instructions above Please remember the key.
Now the following ENV variables must be inserted into the function.
DEBUG true/false HA_TOKEN HA_URL Important the TAILSCALE ip from HA e.g http://{tailscale-ha-ip}:8123. Should be start with 100.xxx.xxx.xxx TAILSCALE_AUTHKEY the ephemeral key. Should be start with tskey-auth-xxxxx
Now the Alexa skill can be tested and integrated into HA. These are the same steps.
The only thing that changes in the Alexa Skill chapter in the editor is that you don't have to create a PY for the template. Actually always click Customize
Troubleshooting: I rarely get timeouts from tailscale. Ticket is open. That's why I increased the timeout to 10 seconds.
Danger: The ECR and the AWS Lambda can cost money. For this reason the image was kept small. But you have to have a lot of traffic and updates. With testing and everything, my most expensive month was 4 cents ;)
Ping :)
Stale pull request message
This PR makes it possible to start the lambda function as a container and connect to the home assistant via Tailscale VPN. This means that it is not necessary to put your HA on the Internet.
Open points are the adaptation of the wiki and documentation. In addition, you have to clone the repo so that the Docker container can be pushed into its own ECR container in AWS.
In addition, you have to think about how to design the githubaction
If you use PY lamdba directly you now have to adapt the config.py and/or if possible also use ENV variables, then the user no longer has to adapt py at all.
I'm looking forward to feedback.