Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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+)
- 1) copy haaska url from github:
- https://github.com/auchter/haaska.git
- 2) Open putty and from pi user:
- $ sudo apt-get update
- $ sudo git-clone https://github.com/auchter/haaska.git
- (if you using Docker process, run only the sudo git-clone command)
- 3) Change to the haaska/config directory
- $ cd haaska/config
- 4) Rename the config.json.sample file
- $ mv cofig.json.sample config.json
- Edit the file to include your IP address:port and api password (for secured setups use your dns domain and port 443)
- Edit parameter to "expose_by_default": false
- Edit parameter to "ssl_verify": "ca-certificates.crt"
- Save it
- 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
- $ cp /etc/ssl/certs/ca-certificates.crt .
- 6) Change back to haaska folder
- $ cd
- $ cd haaska
- If necessary edit the makefile to run the install with pip3 instead of pip
- $ sudo nano makefile
- Edit the line for “pip” & change to “pip3” (in mine it was line 12)
- If you do the process via Docker, remember to change in Dockerfile as well
- 7) Run the makefile
- $ sudo make
- 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
- sudo docker build -t haaska
- sudo docker run -v "$PWD":/usr/src/app haaska
- 8) Copy zip file to your windows computer
- 9) Go to Amazon developers console -> Apps & services -> Logon with amazon
- 10) Create a new security profile. Note client id, client secret
- [CLIENT ID], [CLIENT SECRET]
- 11) Open a new tab -> go to amazon developers console again -> alexa –> alexa skills kit –> get started –> add a new skill
- 12) Select smart home API
- 13) Enter skill name (haaska – really important, since it reference the name from the content in the zip-file)
- 14) Select V2 (legacy), (V3 is the default)
- 15) Note skill application id at top left under the skill name
- [SKILL NAME]
- 16) Save –> next
- 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
- 18) Select N Virginia server
- 19) Select services tab –> compute –> lambda –> create a lambda function
- 20) In the filter enter ‘alexa’ –> pick the “alexa-smart-home-skill-adapter”
- enter skill name: has to be haaska
- 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)
- 21) Enter the application id from (16) above
- 22) Click enable trigger -> next
- The skill adapter comes prefilled with Node.js function. Just click on “create function” to save the function and change later to Python
- 23) In configuration section.
- Click upload and select the haaska.zip file created in (7) above
- Select python 3.6
- Enter as handler: haaska.event_handler
- Click on save
- 24) at the top right of the next page copy the ARN #
- [ARN#]
- 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
- 26) under account linking – authorization URL: https://www.amazon.com/ap/oa
- 27) enter client id & client secret from (10) above where appropriate
- Click on Add scope and type ‘profile’
- 28) select client authentication scheme – credentials in request body
- 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
- In Allowed originals: enter your external site url
- 30) enter the Access Token URL: https://api.amazon.com/auth/o2/token
- Privacy policy URL: enter your external HASS url
- 31) save –> next
- Enter information in Publishing Information tab
- Test instructions and short desk
- You need to have all checkboxes green on the left side, but do not need to be Submit for certification
- 32) ensure testing is enabled
- 33) go to the alexa app & click on skills –> your skills –> haaska –> enable skill -> you will need to enter your credentials
- 34) ensure that emulated_hue is disabled in configuration.yaml
- 35) hide any unwanted items from haaska
- You can do that with the customization parameter - haaska_hidden: true
- 36) forget all devices in the alexa app
- 37) discover all devices
Advertisement
Add Comment
Please, Sign In to add comment