The Haaska Super Thread

okay, mine was a yaml indentation issue. only after reviewing it in a proper code editor that highlighted the code blocks could i see it because it was otherwise a valid yaml file

1 Like

Is there a way to monitor if haaska is down in uptime robot?
eg we can monitor https://myhassio.duckdns.org:8123

So is there a way to know if haaska down and if it is how do we reset it?

How do you solve the Problem I have the same error while i try to setup Alexa to Home
Assistant.I did everything as it is disrcibed in the youtube Channel everything Smart Home.

Hi,

Did anyone face this error when doing the haaska function setup and test? Tried reloading the zip file but nothing works. I am on the latest HA OS and version.

{
“errorMessage”: “Unable to import module ‘hasska’”
}

START RequestId: 58ace516-e7ac-4de2-86f1-f4a6d710394e Version: $LATEST
Unable to import module ‘hasska’: No module named ‘hasska’

END RequestId: 58ace516-e7ac-4de2-86f1-f4a6d710394e
REPORT RequestId: 58ace516-e7ac-4de2-86f1-f4a6d710394e Duration: 1.10 ms Billed Duration: 2 ms Memory Size: 128 MB Max Memory Used: 42 MB

Don’t know if this will help, but take a look earlier in this thread:

Yep, i tried reloading the zip. Still got back the same error code. Any possible areas you feel i can check?

I also found another thread mentioned about missing Request folder. Did a check on mine and its there.

I am also getting:
{
“errorMessage”: “Unable to import module ‘lambda_function’”
}

and I cant seem to find a way to resolve it?

Getting this error and cannot figure out the issue:

{
“errorMessage”: “401 Client Error: Unauthorized for url: https://_______.duckdns.org/api/alexa/smart_home”,
“errorType”: “HTTPError”,
“requestId”: “d4a39a89-f0c7-4613-8f75-93d4e2cbadca”,
“stackTrace”: [
" File “/var/task/haaska.py”, line 111, in event_handler\n return ha.post(‘alexa/smart_home’, event, wait=True)\n",
" File “/var/task/haaska.py”, line 66, in post\n r.raise_for_status()\n",
" File “/var/task/requests/models.py”, line 940, in raise_for_status\n raise HTTPError(http_error_msg, response=self)\n"
]
}

Seems to indicate HA is failing the request from Haaska due to not being authorized. Take a look at your config.json in Haaska. Above is a post from me that points to yet another post in this thread that gives an example of what the config.json should look like.

I came across this thread…

Hi all… today I received this email from AWS:
SBJ: [Action Required] AWS Lambda end of support for Python 3.6
ello,

We are contacting you as we have identified that your AWS Account currently has one or more Lambda functions using Python 3.6 runtime.

We are ending support for Python 3.6 in AWS Lambda. This follows Python 3.6 End-Of-Life (EOL) reached on December 23, 2021 [1].

As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in two stages. Starting July 18, 2022, Lambda will no longer apply security patches and other updates to the Python 3.6 runtime used by Lambda functions, and functions using Python 3.6 will no longer be eligible for technical support. In addition, you will no longer be able to create new Lambda functions using the Python 3.6 runtime. Starting August 17, 2022, you will no longer be able to update existing functions using the Python 3.6 runtime.

We recommend that you upgrade your existing Python 3.6 functions to Python 3.9 before August 17, 2022.

End of support does not impact function execution. Your functions will continue to run. However, they will be running on an unsupported runtime which is no longer maintained or patched by the AWS Lambda team.

The following command shows how to use the AWS CLI [3] to list all functions in a specific region using Python 3.6. To find all such functions in your account, repeat this command for each region:

aws lambda list-functions --function-version ALL --region us-east-1 --output text --query “Functions[?Runtime==‘python3.6’].FunctionArn”

If you have any concerns or require further assistance, please contact AWS Support [4].

[1] PEP 494 – Python 3.6 Release Schedule | peps.python.org
[2] Runtime support policy - AWS Lambda
[3] AWS Command Line Interface
[4] https://aws.amazon.com/support

is it something I’d be concerned to?
TIA

I got the same email and am hesitant to upgrade for fear it breaks everything, and I honestly struggled to get it to work in the first place and fear losing this functionality that I use quite often. Hopefully a braver and smarter soul than me can bring some clarity to this situation.

I tried to upgrade Python version from 3.6 to 3.9 editing runtime settings in AWS, under Haaska layers.
Saved, tried to “test” but it fails. Funny that my Alexa commands still work, I don’t know if they will stop working now or then, so I will wait for someone able to clarify too :slight_smile:

as explained below, there was an old domain in haaska config.json on AWS.

That should work fine. I just updated my version. What was the error you got when you ran the test?

I managed to update my lambda to python 3.9 on AWS and it’s working for me

to update to python 3.9
head to aws.amazon.com
login
type lambda in searchbox
find your function i.e. haaska
click on the function
go to code tab
scroll down to runtime settings and press edit (right hand side)
select python3.9 save
done

11 Likes

If I run test, I get this error:

Task timed out after 3.01 seconds

This is the test code I’m running

{
  "directive": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "Discover",
      "payloadVersion": "3",
      "messageId": "1bd5d003-31b9-476f-ad03-71d471922820"
    },
    "payload": {
      "scope": {
        "type": "BearerToken",
        "token": "access-token-from-skill"
      }
    }
  }
}

nevermind, my haaska setup on AWS was 2 years old and there was my old domain inside config.json, that’s why it failed… my fault!
test passed after swapped domain and generated a new token (just in case…)

I’ve recently upgraded to 3.9 and everything’s working as expected. It would be probably a good idea to update the step-by-step instructions on the Wiki to recommend 3.9 instead of the legacy 3.6.

Also for some reason after I’ve activated the new runtime I had to re-add the Alexa Smart Home trigger in AWS Lambda to make it working again.

I think this has happened because originally I had the version number included with the “Default endpoint” ARN which became invalid after the upgrade.

So if your skill stops working, check the AWS Lambda page whether your function still has the “Alexa Smart Home” trigger set up and also check the Developer Console whether your default endpoint is version-agnostic.

This worked for me, test came back with all devices after selecting Python 3.9 and Save

I did likewise…thanks!
However I noticed that in my case, I have a file named haaska.py and the first line is:

#!/usr/bin/env python3.6

I don’t know if this line overrides the “Runtime setting” or not, so I simply

  • changed this line to python3.9,
  • file->save
  • deploy (click on the button)

retested and it appears to still work.

1 Like