I am trying to set up haaska after the unfortunate news that I’m unable to use Home Assistant Cloud at the moment (wrong location), and (unless my circumstances change) unable to afford to subscribe from March next year.
I have followed some updated instructions (https://pastebin.com/aucq7sDY) and now have a reasonably good idea about how all the components of the set up connect together.
I have set up my Skill, my lambda instance, and my security profile/”log in with Amazon” settings and I have had quite a bit of success. My lambda returns a successful looking message when I run it - "Execution result: succeeded” and the code beneath it shows all my devices. Further, once my skill is published, I can go into the Alexa app and connect my account.
Therefore, I think I have set up the lambda correctly and the Login with Amazon correctly. Unfortunately, I do not discover any devices when I “Discover devices” on my Alexa app. So, it seems to me that it’s a problem between the Skill and the Lambda instance.
My Alexa skill is correctly listed in the Lambda configuration, and it’s enabled with the slider/switch.
Within the skill, it’s set to Interaction Model - "Smart Home Skill API” and under the configuration I have the lambda referenced as Default endpoint, and also the Europe option. ( arn:aws:lambda:eu-west-1:660030XXXXXX:function:haaska ). The Skill language is set to English (U.K.).
Unfortunately, it doesn’t work. The only thing I can think of is that this might be because the payload for the skill is set to v3. Various threads indicate this should be set to v2. V2 is no longer selectable as it’s been deprecated. Can anyone help with fixing this issue?
Happy to provide logs if you can tell me what I need to provide!
Reading a bit about payloads in the Alexa skill, it appears there were indeed some quite big changes going from v2 to v3, so unless Haaska has been updated we may no longer be able to set this up. Does anyone know?
Does your lambda work OK?
Naviagate to your lambda, and in the top right corner there should be a drop down of test events. If you don’t have any events, add this one:
I just setup haaska with a new zip file because I wanted to add medial.player. I remember previously that the order of the components in the config.json affect how it was discovered. It might be the issue if you changed or re-ordered this. Yesterday, I only changed the url and password at first.
OK, then I would suggest that’s the first thing that’s wrong.
How confident are you that you made the haaska.zip OK?
You edited config.json.sample and renamed it to config.json and then edited it to include your duckdns address (and port 8123) and your API password?
You should have a file called “config.json” in your config folder that looks like this:
Except URL and password should be filled out with your specific details. Can you connect to your HA instance via your external (duckdns) URL and port through a web browser??
My URL is fine. I’m using Let’s Encrypt SSL and port forward 443 to 8123. I can access my the frontend using https://[mydomain]/states when I am outside.
Great. And you have put that (along with pasword) in to the config.json file before you created the zip using “make”? In which case, a few settings you should check within the lambda:
The lambda is called “haaska”.
You have Alexa smart home as a trigger, and amazon cloudwatch logs as a resource.
Run time is python 3.6 and Handler is haaska.event_handler
You’ve uploaded your haaska.zip for the code and you can see it as haaska.py in the lambda page.
execution role is “Choose an existing role”! and then “lambda_basic_execution”.
Guess what, no more errors after I change the timeout value to 20 seconds under “Basic Settings”. I can see my devices in json under details. However, they are still not discover in the Alexa app.
Good news! I recreated the skill and it was a success! I can see all the devices I wanted to expose. However, I notice that all the device type is still specified as “Light”.