Skip to content

Testing Haaska

Anthony Lavado edited this page Feb 18, 2019 · 2 revisions

After setting up haaska, you may find it useful to test the installation to make sure everything is working.


Using the Lambda console

Use the Lambda interface to test that haaska can reach your service.

  1. Log in to the Lambda console.
  2. Click on your "haaska" function.
  3. Click on the "Test" button at the top right of the page.
  4. Give the test a custom name in the "Event name" field. Copy the following JSON in to the test console:
{
  "directive": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "Discover",
      "payloadVersion": "3",
      "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
    },
    "payload": {
      "scope": {
        "type": "BearerToken",
        "token": "access-token-from-skill"
      }
    }
  }
}
  1. Click "Create", and your test should now be listed in the drop-down box beside the "Test" button.
  2. Click the "Test" button, and if the test succeeds, a green checkmark will appear. Congratulations! Your haaska function can communicate with your Home Assistant install.

If there is a problem, and the test fails, please expand the "Details" section. Copy the contents of the result text box, and see our "Need help?" section.


Using make on your system (advanced)

If you have the AWS CLI and jq installed, you can run a test by using make discover. This will communicate to your Lambda function, and run the same payload request as above.

This should return a JSON listing the devices exposed through the HomeAssistant API.

Clone this wiki locally