auchter / haaska

Home Assistant Alexa Skill Adapter
262 stars 60 forks source link

Alexa and Haaska Issue #32

Open intrawit opened 7 years ago

intrawit commented 7 years ago

i followed exactly what bruhautomation said but i get the error message when i run the test.

{ "errorMessage": "Unable to import module 'lambda_function'" }

i did upload the haaska file from my pi clicked save and test and then i get the errormessage.

please help

intrawit commented 7 years ago

what must the handler be in aws?

gabrielbratescu commented 7 years ago

The handler should be: haaska.event_handler

intrawit commented 7 years ago

What must the redirect urls be on developer account to link Alexa with home assistant?

On 09 Feb 2017 15:14, "Intrawit" notifications@github.com wrote:

i followed exactly what bruhautomation said but i get the error message when i run the test.

{ "errorMessage": "Unable to import module 'lambda_function'" }

i did upload the haaska file from my pi clicked save and test and then i get the errormessage.

please help

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/auchter/haaska/issues/32, or mute the thread https://github.com/notifications/unsubscribe-auth/AXphhAI9CnmD05bgKNfDHzpdl3j0fRYiks5raxE_gaJpZM4L8HD- .

gabrielbratescu commented 7 years ago

You find the redirect URLs in the Configuration page of the skill. Something like https://layla.amazon.com/api/..... and https://pitangui.amazon.com/api.....

intrawit commented 7 years ago

But those redirect urls is not working.. That is why I am asking.

On 11 Feb 2017 15:24, "gabrielbratescu" notifications@github.com wrote:

You find the redirect URLs in the Configuration page of the skill. Something like https://layla.amazon.com/api/..... and https://pitangui.amazon.com/api.....

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/auchter/haaska/issues/32#issuecomment-279143603, or mute the thread https://github.com/notifications/unsubscribe-auth/AXphhAoDh6OhEW55cMfu5QnMRjF7diz6ks5rbbaLgaJpZM4L8HD- .

gabrielbratescu commented 7 years ago

In what sense are they not working ? You have to copy them to Amazon/your app/web settings/Allowed Return URL

intrawit commented 7 years ago

I copy them from the developer skill page to the login to Amazon account. I even tried it to put it in the Web browser to test the URL but it just shows me a white page and says message= null

On 11 Feb 2017 15:51, "gabrielbratescu" notifications@github.com wrote:

In what sense are they not working ? You have to copy them to Amazon/your app/web settings/Allowed Return URL

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/auchter/haaska/issues/32#issuecomment-279145015, or mute the thread https://github.com/notifications/unsubscribe-auth/AXphhBIew8NylfMFtzMmQ-V2abYNUzDNks5rbbzvgaJpZM4L8HD- .

gabrielbratescu commented 7 years ago

It's on to return null, because in browser you are not sending the required information. Go to next step. Please be aware that the video from bruhautomation has some missing info, so double check the video with setup info from the first page of this project.

intrawit commented 7 years ago

Where can I get the full info for the full project?

On 11 Feb 2017 16:14, "gabrielbratescu" notifications@github.com wrote:

It's on to return null, because in browser you are not sending the required information. Go to next step. Please be aware that the video from bruhautomation has some missing info, so double check the video with setup info from the first page of this project.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/auchter/haaska/issues/32#issuecomment-279146311, or mute the thread https://github.com/notifications/unsubscribe-auth/AXphhNvPuB5Anzt4LANTcjryccfrF4U7ks5rbcJHgaJpZM4L8HD- .

gabrielbratescu commented 7 years ago

I don not know what you mean by that. Today I was able to set it up by using bruh's video and the setup info from this project. It's not a walk in the park, but it works. If you need some help, send me a private message and maybe we can do somenthing.

mzjlswatt commented 7 years ago

@gabrielbratescu Hi,did u successfully use the Alex?i fellowed the video step by step,nothing missed I think,finally my Alex app need account linking,I don't know what's the account!

intrawit commented 7 years ago

The Alexa is working on basic commands.it just when I ask Alexa to link through to the home assistant to switch of lights..that doesn't work.

On 12 Feb 2017 03:06, "mzjlswatt" notifications@github.com wrote:

@gabrielbratescu https://github.com/gabrielbratescu Hi,did u successfully use the Alex?i fellowed the video step by step,nothing missed I think,finally my Alex app need account linking,I don't know what's the account!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/auchter/haaska/issues/32#issuecomment-279188354, or mute the thread https://github.com/notifications/unsubscribe-auth/AXphhD19PwwJHCYjGT0D41uBJjIzLc2rks5rblsGgaJpZM4L8HD- .

gabrielbratescu commented 7 years ago

@mzjlswatt Yes, it works. I can say Alexa turn on /off "device from HA". Except a few failures, see issue #34 . I don't know for sure what do you mean by account linking. When you start Alexa app you need to login with your amazon account. And then install the skill you just created (haaska). You find it under Skills/Your skills. After that it tells you you need to discover your devices, do so. A list of discovered devices will the appear in Alexa. Here I had some issues because the I had some devices without friendly_name or haaska_name and Haaska would generate an error on discovery. The way the script is working right now is that an error occures on one device, it stops and no devices are discovered. All or nothing. Please check pull request #29 . I made this modification to my script in order to work.

@intrawit After installing Haaska skill, did Alexa discovered your devices ? Do you see them in Alexa/Smart Home menu ? Please read also the above response.

For the future, please tell me the minute from the bruh's video where are are stuck on. I am not a native english and it's easier for me to understand at what step are you

iyesildirek commented 7 years ago

I am not able to enable the haaska skill on my amazon app. I 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

When I got to my AWS console and test my skill I get the following in my log output:

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 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 },

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.

Any ideas what I am doing wrong?

trisk commented 7 years ago

@iyesildirek "Account linkage required" is normal for this skill, which requires OAuth (Login with Amazon). When you click "Enable", you will be sent to the Login with Amazon page for the security profile you created.

mohaggag commented 7 years ago

Do i need a real echo to run this skill . I mean the discovery command is only available on a real amazon echo but i am using The AVS on a raspberry pi so I don't know if this skill will work or not

trisk commented 7 years ago

@mohaggag I believe it will work if you can access the Smart Home web interface for Alexa while signed into your Amazon account, http://alexa.amazon.com/spa/index.html#smart-home

mohaggag commented 7 years ago

@trisk no not working

trisk commented 7 years ago

@mohaggag can you be more specific? Does the Smart Home page list the skill you created and the "Discover Devices? link?

mohaggag commented 7 years ago

@trisk yes

redstar2k1 commented 7 years ago

@mohaggag so what is "not working"? No devices shows up in the "Smart Home" page after you try to "Discover Devices"? If so, what country/region is your Amazon Developer account set (https://developer.amazon.com/settings/profile/detail.html) and on what region (North America/Europe) is your Lambda skill set?

shadow05139 commented 6 years ago

replace whatever is in the handler box with:

haaska.event_handler