The Haaska Super Thread

Thank you. Probably I was just wrong assuming that scripts would be picked up without a specific display_categories assigned to them.

Probably, you have to make sure your Lambda function is set up in the correct region.

My Haaska is working pretty well (in that it works), but I’ve come unstuck trying to filter the shared entities. I set up Haaska pre the out of the box smart_home skill, if that makes any odds.

I only want to pass two items over to alexa, so she doesn’t get confused by items names, my config looks like this:

api:

alexa:
  smart_home:
  filter:
    include_entities:
      - group.office
      - switch.coffee_machine
  entity_config:
    group.office:
      name: Office
      description: Office lights, monitors and sound 
      display_categories: COMPUTER
    switch.coffee_machine:
      name: Coffee Machine
      display_categories: COFFEE_MAKER

but on discovery everything shows up. I’ve tried this with exclusions, in various orders, and discovery is still pulling all my entities.

Any suggestions of what I’m doing wrong?

Well, you have absolutely saved me after hours of searching and trying to figure out why it wasn’t working for me. Thank you!

I need some help with proactive reporting.

Here’s where I’m at…

My Haaska connection works well. I can see all of my sensors, switches, etc in Alexa. I have a few of my contact sensors set to trigger Alexa routines, but the routines aren’t being triggered.

I believe it has something to do with having HA send a change state rather than a status change. Maybe I’m barking up the wrong tree, but from all of my searching I’ve come across a few people mention “proactive reporting”. It looks like the Cloud setup has a simple checkbox to enable it.

How do I enable it in Haaska?

Thanks!

I’ll pass along some of my notes I took on this. Things may have changed slightly since the time I took these notes, and I haven’t re-verified it:

Sending Alexa Events aka Proactive Change Reports
aka Proactive mode (Starting in HA 0.85)
References:
[https://developer.amazon.com/docs/device-apis/alexa-interface.html#changereport]
[https://github.com/home-assistant/home-assistant/pull/18114]
[https://developer.amazon.com/docs/smarthome/send-events-to-the-alexa-event-gateway.html]

- ChangeReport events are sent to notify Alexa of state changes.  
  At Discovery time, a device reports one of its properties as "proactivelyReported".
  Whenever that property value changes, (regardless of why the property changed), you then send Alexa a ChangeReport event.
  Example:if the "Kitchen Light" endpoint turns on, you would notify Alexa 
    by sending a ChangeReport event that indicates the "powerState" property of the 
    Alexa.PowerController interface has changed its value to "ON".
- If you want HA (via Haaska) to send Alexa Change Report events,
  you need to:
  + go to the Alexa developer console and for haaska select the "Build" tab,
    On the left you'll see "PERMISSIONS".  Enable the Send Alexa Event Slider Button.
    It will pop up a gray'd out a Client Id:/Client Secret which you will copy into config.yaml.
  + If you enable this after you've already got the Haaska Skill running, 
    you'll next need to go to the Alexa App, and unlink the Haaska Skill and relink it (disable/enable).
  + HA configuration.yaml add endpoint:
    alexa:
      smart_home:
        endpoint: https://api.amazonalexa.com/v3/events #For the U.S.
        client_id: !secret alexa_client_id         #From gray'd out Client Id in Alexa Dev Console Build->Permissions
        client_secret: !secret alexa_client_secret #From gray'd out Client Secret
  + If you add devices such as binary sensor afterwards, you may find Alexa recognizes
    its state change but Routines won't trigger.  If this happens, relink the haaska skill in Amazon Alexa App.
2 Likes

Interesting. I made the changes you shared.

I have one binary sensor that triggers both the routines I have it set for.

I have a second binary sensor that triggers one of the two routines it’s set for.

And I have a third binary sensor that triggers neither of the routines I have it set for.

Hint: I’m using these binary sensors to trigger Alexa routines that turns on/off amazon branded plugs.

Is there something I’m missing in this?

alexa:
  smart_home:
    endpoint: https://api.amazonalexa.com/v3/events
    client_id: !secret alexa_client_id
    client_secret: !secret alexa_client_secret
  
binary_sensor:
  - platform: template
    sensors:
      livingroomfloorlamp:
        device_class: opening
        value_template: "{{ is_state('input_boolean.living_room_floor_lamp_switch_helper', 'on') }}"
      mylamp:
        device_class: opening
        value_template: "{{ is_state('input_boolean.my_lamp_switch_helper', 'on') }}"
      livingroomlamp:
        device_class: opening
        value_template: "{{ is_state('input_boolean.living_room_lamp', 'on') }}"

Nevermind. I’m a dummy. I forgot to restart HA and reconnect the Haaska skill when I changed one of the binary sensors. All is working correctly now.

Thank you so much for your help @wmaker!

Anyone never encounter an error while linking the hasska skill to your amazon account? My lambda test is successful, however, while linking this error is played, both via PC and mobile.

Error
“We were unable to link haaska at this time. - For instructions and assistance with configuring your skill for account linking with OAuth, please see [this guide]”(https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/linking-an-alexa-user-with-a-user-in-your-system).

Guys as I can see many users have problem discovering devices. Somebody posted about ability to debug what Alexa is getting from haaska. Can you help me with that? I have same issue as others. Lambda test works perfectly listing all devices but Alexa discovery founds nothing. Any tips would be very appreciated.

Add me to the list of people who cant discover devices on my alexa app… I just setup haaska tonight and I’m seeing lots of people saying this most the solved ones were people in Ireland and had to select n.virginia… I however am in the US in phoenix AZ and i setup in n virginia and I get a succesful test in lambda with devices discovered and then if I try and discover devices with my alexa app I get nothing… I tried setting up in different regions most wont even let me select the smarthome trigger the only other region that let me setup the smarthome trigger was Oregon but then I got an error on that one when I tried to change the arn number in my aws to match the oregon skill…

I solved my problem after finding a thread about nabu casa every failing to discover devices of a denon receiver is on your install. I deleted denon from hass and boom all my other devices suddenly discover. I’m not sure how to get my denon back in without interfering with Alexa discovery.

1 Like

Hi everyone,

a month ago I followed the official instructions for haaska as well as a video-tutorial from DrZzs:

https://github.com/mike-grant/haaska/wiki
https://www.youtube.com/watch?v=dmeIEEKmv58&ab_channel=DrZzs

Everything went smooth and all worked flawlessly. I was able to import all my lights and TV in Alexa App and I was able to control all of them via voice commands.

I also created scripts in home assistant which basically allowed me to launch Netflix, YouTube, Plex, Amazon Prime Video etc. etc. on my TV.

Via Alexa App I then discovered and imported those scripts as scenes and I was able to trigger them by saying “Alexa, select Plex/YouTube etc.” and everything worked fine.

Today, I am facing an issue where all the scripts (scenes in Alexa app) are no longer working. If I say “Alexa, select YouTube” she responds that it does not find the correct skill to do so.

I can turn on and off all miy lights and also I can turn on and off my TV and control channels and volume of my tv via voice command without issue.

But all my scenes are not working with voice commands.

I know the scripts/scenes work in home assistant because if I trigger them manually they work.

I checked the configuration on both my configuration.yaml file, amazon AWS console, amazon Developer console, rechecked everything from the beginning (double checked skill ID, client ID, secret ID, everything mentioned in the wiki is there and is correct).

I can’t understand why all of a sudden my scenes stopped working.

Anyone is having this issue? What steps need to be done to troubleshoot and solve this problem?

Thank-you

Hi all,

to everyone experiencing HA scripts (scenes in Alexa App) imported via haaska skill that suddenly stop working or that aren’t getting triggered by any voice command, here’s the workaround that I applied:

  1. Open Alexa App
  2. Tap More (bottom right corner)
  3. Tap Routines
  4. Tap + (top right corner)
  5. Specify a name for that routine
  6. When this happens --> Voice --> Alexa, select Netflix (for example)
  7. Add action --> Smart Home --> Control Scene --> select your script (Netflix, in this case)

After that, everytime you say “Alexa, select Netflix” you’ll trigger the routine you just created and it will start the script (scene) associated and it will work. (in this case, it will launch Netflix on my LG TV)

I still don’t know why before I was able to trigger the script directly without the need to create a routine for it, but I am glad that this is working now.

Holy cow… I have been trying to figure out why those freaking devices kept showing up. I hit the “Remove All” button and made tons of config changes trying to get them to stop showing up and I could not figure it out. And boom - this was the fix. OMG… About 2 days spent on this… That was fun… LOL! Thanks!

Blockquote

Thanks @bscuderi! I was having this exact same problem. The Lambda test was passing and I could see all my entities, but Alexa discovery failed to find anything. I excluded all my Denon devices from Alexa in my configuration.yaml (below), restarted Home Assistant, and BAM! It started working after the 2nd discovery attempt.

alexa:
  smart_home:
    filter:
       exclude_entities:
         - media_player.denon_avr
         - media_player.denon_avr_2
         - media_player.denon_avr_s940h
         - switch.denon_dsw_1h
         - media_player.living_room
         - media_player.living_room_zone2
         - media_player.bedroom
         - media_player.living_room_2
         - media_player.master_bedroom
         - media_player.master_bedroom_2
         - media_player.master_bedroom_heos
         - media_player.theater
         - media_player.theater_2
         - media_player.theater_3
         - media_player.theater_heos
         - media_player.theater_zone2
1 Like

Hi Everyone,

I am hoping someone can help who has a similiar setup. I seem to be failing the last test no matter what i have tried so far…

I am running Home Assistant as a Docker container on a Synology NAS. I have a external fixed IP, i have a cert from lets encrypt which is inside Synology , where i use Nginx to reverse proxy from my custom domain without the port numbers etc. Everything has been and continues to work fine with HA. I have other services which require SSL etc that work fine such as Smart Things. So i believe my setup is OK.

I believe the issue is either in Nginx but i might be off the mark. I have started process from start to finish and seem to be only be stuck on this last part. The response i get when i do the test on haaska in AWS

{
  "errorMessage": "HTTPConnectionPool(host='localhost', port=8123): Max retries exceeded with url: /api/alexa/smart_home (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa22f00af60>: Failed to establish a new connection: [Errno 111] Connection refused',))",
  "errorType": "ConnectionError",
  "stackTrace": [
    [
      "/var/task/haaska.py",
      111,
      "event_handler",
      "return ha.post('alexa/smart_home', event, wait=True)"
    ],
    [
      "/var/task/haaska.py",
      65,
      "post",
      "timeout=(None, read_timeout))"
    ],
    [
      "/var/task/requests/sessions.py",
      581,
      "post",
      "return self.request('POST', url, data=data, json=json, **kwargs)"
    ],
    [
      "/var/task/requests/sessions.py",
      533,
      "request",
      "resp = self.send(prep, **send_kwargs)"
    ],
    [
      "/var/task/requests/sessions.py",
      646,
      "send",
      "r = adapter.send(request, **kwargs)"
    ],
    [
      "/var/task/requests/adapters.py",
      516,
      "send",
      "raise ConnectionError(e, request=request)"
    ]
  ]
}

Does anyone with a similiar setup have any clues. I am sure i have missed something basic but not being confident with Nginx is steering me that way (rightly or wrongly).

Thanks in advance

Judging by your output did you make sure to deploy your code before running the test ? If you take a look in the designer window at the top right there’s a deploy button. After you modify the .json file you need to deploy so your test function executes against the latest code and not the original .json file that you imported when importing the .zip package.

@guilly you are a life saver!!! Not sure whether to laugh or cry.
Its working

1 Like

I ran into the same issue last night :slight_smile: