auchter / haaska

Home Assistant Alexa Skill Adapter
261 stars 60 forks source link

HASSIO... how to? #87

Open chadbone opened 6 years ago

chadbone commented 6 years ago

I am wondering if there is a way to use this if I am running HASSIO? Thanks for your time! This looks really awesome!

peteredw-tele2 commented 6 years ago

+1 on this! Looks great

abbapatris commented 6 years ago

I too would like to know how to do this

sumitrajancse commented 6 years ago

Hi, Can you please provide some details how to do this on hassio ?

thizzle commented 6 years ago

This should just work with any instance of Home Assistant, as long as you configure the URL in the config.json file. Have you tried following the step-by-step instructions in the README file?

Dowden commented 6 years ago

I am still unclear on what the resolution is?

cbrherms commented 6 years ago

The app isn't run on your device that's running home assistant so it doesn't matter if it's hassio, aio, or hassbian. Haaska is an Alexa skill. Give the step by step a try in the readme

Dowden commented 6 years ago

cbrherms, I don't think you understand what the issue is....that everyone is haveing problems with.

The Python code generated from the start of the Readme file, you quoted earlier, does not create a readable file that Lamda compiles.

2 questions Are you running HASSIO?

Are you Running Haaska on Hassio?

In theory, Yes you are correct the file runs from the docker files on the Amazon site. I get that!

Note: I did get it to run from an old docker file generated from my old home assistant docker file. The issue I had with it was it was a bunch of broken links. Not all my amazon devices were being picked up in the app and if they were then not all my devices were refreshing properly.

So, in theory, it will work as you state. Practicality is seriously lacking on the part of HASSIO

What everyone is asking is how to create seamless docker files that work. I have exported the haaska directory and zipped it but it never loads properly in the LAMDA function the haaska.py file will not compile.

I am working on this issue now but your responses are not helping resolve the issue, they are seriously confusing. Please clarify what solutions you have found for loading the zip file correctly in the Lamda function.

I am still unclear as to what the resolution is.....Please advise

Dowden commented 6 years ago

Thizzle Please do not close this. The other one. #94 was closed with no proper resolution.

hudunak commented 6 years ago

I can run the first build command on my mac with docker. However, when I run the second command

sudo docker run -v "$PWD":/usr/src/app haaska

I get this error:

xx-MacBook-Air:haaska xx$ sudo docker run -v "$PWD":/usr/src/app haaska docker: Error response from daemon: Mounts denied: The path /users/xx/documents/dockerfile/haaska is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info. . ERRO[0000] error waiting for container: context canceled

When I look at the file sharing settings, I see that /Users is included. What should I do to fix this issue?

sumitrajancse commented 6 years ago

Hi.. hassio has introduced home cloud with version 0.60 with which you can control your home assistant things via Amazon Alexa.

cbrherms commented 6 years ago

Home cloud is paid for and only available to American users isn't it? Plus, it's going to still be in beta for the next for months anyway.

hudunak commented 6 years ago

I really would like to use this add-on but I am stuck with the second command. As I did not have success with sudo docker run -v "$PWD":/usr/src/app haaska ,I tried to run sudo docker run -v user:/usr/src/app haaska and created the zip. Now I can't figure out how to take the file from the virtual location to my host device. I am too close to make it work I guess.

Update: I managed to make it work with Hassio

crzg commented 6 years ago

Update: I managed to make it work with Hassio

@hudunak any hint? Have tried recently and can't get it up, any help welcome!

cbrherms commented 6 years ago

@crzg AWS have no disabled the option of choosing the V2 API when uploading code. As this project uses V2 and not V3 it now won't work in its current state though if you check the forks of this project you'll find there are 2 people who are working on making it V3 compatible. I believe both are pretty much at the same stage with it working?

hudunak commented 6 years ago

@cbrherms

I found on the internet that it is possible to make the v2 selectable again with some tricks. Someone explained that here: https://github.com/auchter/haaska/issues/102

hudunak commented 6 years ago

@crzg could you let me know where you are stuck so I can try to explain that part of the process

cbrherms commented 6 years ago

@hudunak Thanks for the pointer. That explains why my V2 setup is still working fine. Was meaning to actually check whether it's still selected but now that I know that the forks are being worked on I'm not going to mess about with it until they're ready.

crzg commented 6 years ago

@hudunak

Thanks for the offer - I have followed both auchter's readme as well as the BRUH Automation video (which incidentally despite being on older platforms for skill and function creation, also conflict - e.g. one suggests client ID/secret from login.amazon.com here but the readme suggest the same details on the developer console under "Apps & Services", select "Login with Amazon")

Where I stand now is that I have followed both in many variations (e.g. Lambda function in USA, Europe - I am based in Ireland so I tried both; Alexa skill setup in English (US)/English (UK)). The function seems to at least partly work (text execution results discover devices, however log output comes up with a InsecureRequestWarning - perhaps a source of concern? Have DNS/SSL setup, server is accessible at https://[mynickname].duckdns.org:8123)

Used the workaround to get V2 selected too.

Have the skill enabled and linked on Alexa, but no device discovery. Let me know if any screenshots/logs would help!

hudunak commented 6 years ago

@crzg

It seems you are at the end of making it work. Could you do these steps and let me know if anything changes?

Could you also share your execution results for this test code: { "header": { "payloadVersion": "2", "namespace": "Alexa.ConnectedHome.Discovery", "name": "DiscoverAppliancesRequest", "messageId": "F8752B11-69BB-4246-B923-3BFB27C06C7D" }, "payload": { "accessToken": "1" } }

crzg commented 6 years ago

@hudunak

Thank you for all the help - in the background I set up a fresh US Lamdba function and this one now seems to work, so somewhere along the way I presume that one of the accounts is setup US (though all seem to be Irish..)

Unfortunately this means it is rather slow to respond (3-4 seconds) - is this usual? And considering US function works, would this help pinpoint where a mistake on my part may lie or could this be an issue with European Lamdba functions in general? Very odd..