mike-grant / haaska

Home Assistant Alexa Skill Adapter that supports v3 of the Alexa Smart Home Skill API
MIT License
539 stars 118 forks source link

Succeessful test #143

Closed andrewng88 closed 4 years ago

andrewng88 commented 4 years ago

where do I go from here?

1) how do you let alexa recognise all your devices?

p/s : I got charged 1USD , is this normal? I will only be charged once right? I'm not using anything with this account.

Thanks

thehijacker commented 4 years ago

I am in same situation. Test was success, but my Alexa is not discovering any devices. I played with location setting and changing it everywhere to Ireland, but that does not help.

Anyway had same issue and managed to solve it?

andrewng88 commented 4 years ago

For my case, I login using the same aws to alexa website and re-setup all my alexa devices. After that I was able to scan after adding the smart home ( IIRC ).

thehijacker commented 4 years ago

Hello. Sorry I do not understand. Same AWS to Alexa website? Adding Smart Home (IIRC)? Can you explain a bit more please.

andrewng88 commented 4 years ago

Meaning if your login for aws should be the same as alexa.amazon.com

thehijacker commented 4 years ago

It can not be the same. I had to create new account on aws. Email was same but password is different. Am I missing something?

andrewng88 commented 4 years ago

It might not be the same password but I used the same email for AWS and alexa

thehijacker commented 4 years ago

I have same email. Redone now everything from start. Delete skill, lambda, ... Test was a gain a success.

Here is the log output of test:

START RequestId: 84bf234e-e358-43f0-b16c-fa8c6b3a0058 Version: $LATEST [DEBUG] 2019-12-29T12:48:03.17Z 84bf234e-e358-43f0-b16c-fa8c6b3a0058 calling alexa/smart_home with {'directive': {'header': {'namespace': 'Alexa.Discovery', 'name': 'Discover', 'payloadVersion': '3', 'messageId': '1bd5d003-31b9-476f-ad03-71d471922820'}, 'payload': {'scope': {'type': 'BearerToken', 'token': 'access-token-from-skill'}}}}

[DEBUG] 2019-12-29T12:48:03.31Z 84bf234e-e358-43f0-b16c-fa8c6b3a0058 Starting new HTTPS connection (1): ***.info:18123

[DEBUG] 2019-12-29T12:48:03.531Z 84bf234e-e358-43f0-b16c-fa8c6b3a0058 https://***.info:18123 "POST /api/alexa/smart_home HTTP/1.1" 200 23715

END RequestId: 84bf234e-e358-43f0-b16c-fa8c6b3a0058 REPORT RequestId: 84bf234e-e358-43f0-b16c-fa8c6b3a0058 Duration: 612.74 ms Billed Duration: 700 ms Memory Size: 128 MB Max Memory Used: 64 MB Init Duration: 210.17 ms

On alexa.amazon.com I deleted all existing devices (from Yeelight skill) and clicked Discover. It only found Yeelight lights from Yeelight skill. Nothing from my Home Assistant. haaska skill is linked correctly and enabled.

How to debug this? Where to see the logs what happened? Do I need additional port opened on my firewall to my HA server? I now only open port 18123 that is NAT-ed to port 8123 on my Linux server runnning HA. Maybe this is a problem?

thehijacker commented 4 years ago

Finally after two days of trying everything possible, my devices from HA got detected. Now to share what I had to do to make it work. My Amazon account was first registered on amazon.com (USA). I live in Slovenia and ordered my Echo devices from Amazon.de as in Slovenia we do not have Amazon online store.

In all of my devices my location is set to Slovenia. When my devices were not detected I changed device location but this did not help.

I have one more custom skill in my development account and for that one I noticed I had language set to English (US). That skill is working fine so for haaska skill I added language English (US). It did not help and it seems to create different skill for US region. This gave me an idea. I checked possible language option in lambda and I had my haaska setup for Ireland. I switched to N. Virginia and had to redo lambda from start. But I got an us-east-1 ARN. Test was a success so I went back to my skill in developer console and as default endpoint used the us-east-1 ARN. I also enabled both North America and Europe, India region and repeated us-east-1 ARN for North America region and additional eu-west-1 ARN for Europe, India region.

Then I unlinked and linked back haaska skill and clicked discovery. Boom. It found all my devices.

I hope this post helps someone else that is strugling with same issues as I had.