Guest User

Haaska install (modified)

a guest
Oct 8th, 2017
1,423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.67 KB | None | 0 0
  1. Haaska installation (original steps from @finity https://community.home-assistant.io/t/cant-enable-haaska-skill/20515/10 modified to suite new UI look in AWS and developer console) I’ve also added steps for the Docker alternative since I use docker on a Synology NAS (1512+)
  2.  
  3. 1) copy haaska url from github:
  4. https://github.com/auchter/haaska.git
  5. 2) Open putty and from pi user:
  6. $ sudo apt-get update
  7. $ sudo git-clone https://github.com/auchter/haaska.git
  8. (if you using Docker process, run only the sudo git-clone command)
  9. 3) Change to the haaska/config directory
  10. $ cd haaska/config
  11. 4) Rename the config.json.sample file
  12. $ mv cofig.json.sample config.json
  13. Edit the file to include your IP address:port and api password (for secured setups use your dns domain and port 443)
  14. Edit parameter to "expose_by_default": false
  15. Edit parameter to "ssl_verify": "ca-certificates.crt"
  16. Save it
  17. 5) You need to copy the ca-certificate file from your system to the “config” folder. In most cases the file exists in /etc/ssl/certs issue the command
  18. $ cp /etc/ssl/certs/ca-certificates.crt .
  19. 6) Change back to haaska folder
  20. $ cd
  21. $ cd haaska
  22. If necessary edit the makefile to run the install with pip3 instead of pip
  23. $ sudo nano makefile
  24. Edit the line for “pip” & change to “pip3” (in mine it was line 12)
  25. If you do the process via Docker, remember to change in Dockerfile as well
  26. 7) Run the makefile
  27. $ sudo make
  28. For Docker process: I needed to separate the command “docker build -t haaska . && docker run -v "$PWD":/usr/src/app haaska” in two processes, first build and then run i.e. and wait for the first to be complete
  29. sudo docker build -t haaska
  30. sudo docker run -v "$PWD":/usr/src/app haaska
  31. 8) Copy zip file to your windows computer
  32. 9) Go to Amazon developers console -> Apps & services -> Logon with amazon
  33. 10) Create a new security profile. Note client id, client secret
  34. [CLIENT ID], [CLIENT SECRET]
  35. 11) Open a new tab -> go to amazon developers console again -> alexa –> alexa skills kit –> get started –> add a new skill
  36. 12) Select smart home API
  37. 13) Enter skill name (haaska – really important, since it reference the name from the content in the zip-file)
  38. 14) Select V2 (legacy), (V3 is the default)
  39. 15) Note skill application id at top left under the skill name
  40. [SKILL NAME]
  41. 16) Save –> next
  42. 17) In a new tab go to AWS.amazon.com –> sign in/create account –> asks for credit card but won’t get charged for normal use
  43. 18) Select N Virginia server
  44. 19) Select services tab –> compute –> lambda –> create a lambda function
  45. 20) In the filter enter ‘alexa’ –> pick the “alexa-smart-home-skill-adapter”
  46. enter skill name: has to be haaska
  47. choose existing role: lambda_basic_execution (if it exists – if not: create a new role – in the IAM on the page that pops up: lambda_basic_execution – create a new policy & then click “allow” in the bottom right)
  48. 21) Enter the application id from (16) above
  49. 22) Click enable trigger -> next
  50. The skill adapter comes prefilled with Node.js function. Just click on “create function” to save the function and change later to Python
  51. 23) In configuration section.
  52. Click upload and select the haaska.zip file created in (7) above
  53. Select python 3.6
  54. Enter as handler: haaska.event_handler
  55. Click on save
  56. 24) at the top right of the next page copy the ARN #
  57. [ARN#]
  58. 25) go back to the developers console tab - in the configuration section select “north America” button & copy the ARN here and add the same ARN# in default section as well
  59. 26) under account linking – authorization URL: https://www.amazon.com/ap/oa
  60. 27) enter client id & client secret from (10) above where appropriate
  61. Click on Add scope and type ‘profile’
  62. 28) select client authentication scheme – credentials in request body
  63. 29) copy the redirect URLs. Go back to the AWS security (logon with amazon) tab & paste them into the redirect URLs in the section web settings
  64. In Allowed originals: enter your external site url
  65. 30) enter the Access Token URL: https://api.amazon.com/auth/o2/token
  66. Privacy policy URL: enter your external HASS url
  67. 31) save –> next
  68. Enter information in Publishing Information tab
  69. Test instructions and short desk
  70. You need to have all checkboxes green on the left side, but do not need to be Submit for certification
  71. 32) ensure testing is enabled
  72. 33) go to the alexa app & click on skills –> your skills –> haaska –> enable skill -> you will need to enter your credentials
  73. 34) ensure that emulated_hue is disabled in configuration.yaml
  74. 35) hide any unwanted items from haaska
  75. You can do that with the customization parameter - haaska_hidden: true
  76. 36) forget all devices in the alexa app
  77. 37) discover all devices
Advertisement
Add Comment
Please, Sign In to add comment