Haaska Echo Error

You forgot a comma after the ha_cert line.

it should be

“ha_cert”: “ca-certificates.crt”,

Ok back at it today I was able to get this,

Execution result: succeeded

this morning.
But in the log I got this

Discovery failed: HTTPSConnectionPool(host=‘xxxxx.duckdns’, port=443): Max retries exceeded with url: /api/states (Caused by NewConnectionError(’<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe841184690>: Failed to establish a new connection: [Errno -2] Name or service not known’,))

It is almost the same as before.

It sounds to me like an issue with letsencrypt / duckdns.
The error you provided clearly indicates a problem connecting to your duckdns address.

First thing you should try is remove the port from in your config

“ha_url”: “https://my.duckdns:443/api

https already connects on port 433 so it’s overkill adding it, don’t know if it will solve the issue.
Next double check the letsencrypt and duckdns setup.

@x140x1n Well I have checked and rechecked and also Reinstalled everything and still get the same Error. I have followed every step, I’m about to give up, but I have one more thing I think I’ll try if you think t may work.

It looks like there is more then one way to install the letsencrypt files, do you think it may have something to do with maybe the way it is installed?

Thanks

I followed the guide here:

The only thing I did additionally to make it work for me, which was also discussed below the guide, is a chmod on the letsencrypt archive folder structure.

@x140x1n Thank you for all your help.I did another full Install today on a different SD card, after I was done I got it working, and then I checked everything over, and found on my other one I had forgot to put the .org at the end of duckdns in the config.json file. Now things are working Great.

Thank you

No worries, glad you go it working now.

Thank you! I was missing that file and while the lambda function works, without that file, you get a security warning now that I have added it, the warning is gone! I was able to create the haaska skill and I can see it and use it on my amazon echo.

1 Like

@JuliusLedoux/@x140x1n : How were you able to enable the haaska skill on the amazon app? I get an error saying “Unable to link your Skill”. I had the same problem you did with with SSL, but now I am pretty sure my HTTPS is setup correctly. Is there anything I need to configure in my configuration.yaml before enabling my skill? When I go to the AWS console and test my skill I don’t get any errors on my log output (before I had an SSL error).
This is my current log output info:

Execution result: succeeded(logs)

START RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Version: $LATEST
END RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
REPORT RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Duration: 464.19 ms Billed Duration: 500 ms

I have been stuck trying to figure out what is wrong with my configuration and why am I getting an “account linkage required” message below the button to enable my Skill.

Please help!

Do you have this entry on your configuration.yaml:

http:
api_password: YourPassword
ssl_certificate: /etc/letsencrypt/live/yourdomain.duckdns.org/fullchain.pem
ssl_key: /etc/letsencrypt/live/yourdomain.duckdns.org/privkey.pem

At some point I had to re-link the amazon account and double check the password for the lambda function everywhere that I used it.

I do have the same http entries in my configuration.yaml. I have tried to redo my haaska configuration once, but I got the same problem (not being able to do an account linkage). Is there any log on the RPI that I could use to check my connection error with AWS?

When run “make test” on my RPI and I get the following results:

Unknown output type: ENTER
{
“header”: {
“payloadVersion”: “2”,
“namespace”: “Alexa.ConnectedHome.System”,
“name”: “HealthCheckResponse”,
“messageId”: “xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”
},
“payload”: {
“isHealthy”: true
}
}
true

I can also see a list of all my devices in my AWS Console log output:

The area below shows the result returned by your function execution.
{
“header”: {
“payloadVersion”: “2”,
“namespace”: “Alexa.ConnectedHome.Discovery”,
“name”: “DiscoverAppliancesResponse”,
“messageId”: “xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx”
},
“payload”: {
“discoveredAppliances”: [
{
“modelName”: “Unknown”,
“actions”: [
“turnOn”,
“turnOff”,
“incrementPercentage”,
“decrementPercentage”,
“setPercentage”
],
“friendlyDescription”: “Home Assistant Light”,
“version”: “Unknown”,
“additionalApplianceDetails”: {
“entity_id”: “light.hue_white_lamp_1”,
“dimmable”: true
},
“manufacturerName”: “Unknown”,
“friendlyName”: “Hue white lamp 1”,
“applianceId”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“isReachable”: true
},
… etc,

It seems like I am close to finish the setup, but there is something stopping me from enabling my haaska skill…

Hi iyesildirek,

I had the same issue about linking the account. I had to re-link the amazon account, I doubled checked the passwords for the accounts on all the places. As you may have noticed Hasska is convoluted in the sense that you have to create multiple accounts to make it work. Sorry if I cannot be of more help, but I remember that I re-linked the account, and that I had to retype the password on the developer site… https://sellercentral.amazon.com/gp/homepage.html

Hi

ive been trying to set this up with the latest version of Haaska on my Hass.IO setup.

I also use letsencrypt for SSL, and have no issues reaching the hass.io webpage internally or externally via fqdn (securely)

I think im nearly there, just need a little more guidance :slight_smile:

Ive also been running into SSL errors when doing the lambda test functions. I believe uploading the certificates as you said could fix this, but i noticed that the config.json options are different in the latest version? and im not sure what option to put here for the “ha_cert”: option

These are the sample config.json settings:

“url”: “http://localhost:8123/api”,
“password”: “”,
“ssl_verify”: false,
“expose_by_default”: true,
“exposed_domains”:

its a differnt format to “ha_ …”:

You will have to use the ssl_verify option, have a look at the haaska github page.
https://github.com/auchter/haaska#config-values

Thank you for your reply, i finally figured it all out. This forum in particular was a missing piece.

I gathered information from multiple sources and basically got it all working. To summarise what I did

  1. Setup the Alexa Skill in the AWS Developer console
  2. Setup the Oauth Authentication on AWS http://login.amazon.com/
  3. Setup the Lambda function and link it to the Alexa Skill

This is the muddy yukky difficult area. The lambda function:

  1. Lambda requires you must use SSL on hass host for this to work I believe
  2. config.json must contain “ssl_verify”: “ca-certificates.crt”, (copy the certificate file is an important step to getting past those nasty lambda unsecure errors! Thank you!
    2.1. Once I got past the SSL error i was getting ‘timed out’ errors. Increase the Lambda function timeout to 30 seconds fixed this.
  3. the URL I used to make this work included the 443 port number. “https://hassio.yourdomain.com:443/api
  4. Lambda test function on Bruhautomation is out of date. Used the pre-canned Alexa discovery lambda functions.
  5. Lambda function fails with errors if you expose everything in config.json. Ie. “exposed_domains”. So I removed the ones I dont need. - only exposed the following :
    “cover”,
    “input_boolean”,
    “light”,
    “switch”
  6. Had issues linking the account to Echo when doing it over web-browser Chrome. This issue presented itself when you request to link the skill and redirected to the OAuth URL. - Had to copy and past the redirect URL into Internet Explorer to complete the linking of the skill.

I hope this helps anyone else who is trying to set Haaska up. Its all working perfectly now with the exception of Alexa not understanding how to open my ‘cover’ entities… not sure whats going on there

1 Like

Hey,
I have the same issue and im a bit confused around the SSL cert stuff.

  1. Is the cert file I use the same one from the “HTTP:”/“ssl_certificate:” part of my configuration.yaml?
  2. Do I then copy the cert file to the Haaka folder, reference it in the config.json, and then run Make?
  3. Im guessing i’ll have to do this each time my letsencrypt cert expires?

Hey FletchNZ

It’s nothing in home assistant configuration.yaml

I coped the file from home assistant /etc/ssl/certs/ca-certificates.crt

This is not the certificate that letsencrpyt generates since that’s in a different folder location. I believe this could be the root certificate, but I can’t be sure.

You need to copy this file to the same folder as the haaska config.json file, then configure your config.json to include :

SSL_verify : “ca-certificates.crt”

Then run make.

1 Like

Thank you so so much!!! I followed your instructions and ran the discovery tests and i’m getting devices back.
I need to edit back my config back so i’m seeing more than climate devices but its finally working!

Edit - I see I have a friendly name that causes the discovery to fail, I guess ill just keep excluding things until I work out which one causes it to fail.

Glad it’s working for you! :slight_smile: