The Haaska Super Thread

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