Alexa Notify

Tags: #<Tag:0x00007f77fff10a58>

@gazzaman2k looking for some help. I’ve set up Lannouncer and tested it with the developer tool. I can see the message on the lannouncer app on the android box, but no sound comming out. I’ve connected via BT to alexa, but also tried with headphones in the headphone jack just to test. Nothing
I noticed that in the settings>audio volume the “volume for text to speach” is not highlighted. Should this be available?
thank you

im pretty sure it should be lit up, are you sure you have installed language speech packs?

@gazzaman2k thank you. you mean speech packs on the android box?
I continued trying and installed this https://www.home-assistant.io/components/notify.llamalab_automate/
it works when the box is connected directly to a speaker. the Lannouncer didnt work at all.

Hello.
I was able to successfully load the notify.rest component, but I do not know how to enter an action in the automation that will trigger this notification. Could You please show an example how to send notification when the switch change the state?
image

Assuming you used notify as the name in the configuration as above, the action in your automation would look something like this:

action:
    service: notify.notify
    data:
      message: Whatever you wanted to happen has happened.

If you used a different name in your rest notify configuration other than notify you would replace notify.notify with notify.your name

If you want a dynamic message, you would need to use data_template instead of data - refer to the documentation on templating here.

I wrote something like this in my notify.yaml:

- platform: rest
  message_param_name: notification
  resource: https://api.notifymyecho.com/v1/NotifyMe
  data:
    accessCode: amzn1.ask.account

and then the test automation:

- alias: test
  trigger:
    platform: state
    entity_id: switch.microwave
    to: 'on'
  action:
  - service: notify.notify
    data:
      message: "Microwave ON"
      title: "Custom subject"

but when the switch.microwave is in ON state the notification goes to my iPhone not to my Alexa :frowning: What is wrong?

I think your problem is that, if you don’t specify a name, the default name for the rest notify platform is notify.notify, which is probably conflicting with another platform you have setup.
Try specifying a name like this (which would make it notify.alexa):

- name: alexa
  platform: rest
  message_param_name: notification
  resource: https://api.notifymyecho.com/v1/NotifyMe
    data:
      accessCode: my_code

Then you would be able to change the automation to use that name, like this:

- alias: test
  trigger:
    platform: state
    entity_id: switch.microwave
    to: 'on'
  action:
    - service: notify.alexa
      data:
        message: "Microwave ON"
        title: "Custom subject"

Works great! Thank you :slight_smile:

do you need to have cloud subscription for alexa to do this?
how do get access?

You don’t need a cloud subscription, just an Amazon account (which you would already have for your Alexa device). To set this up you:

  • Enable the Notify Me Alexa skill by Thomptronics (there now appears to be another unrelated skill with the same name from a different developer so make sure you pick the right one)
  • Link the skill to your Amazon account (in the Alexa app or website)
  • You get an email with your access code and details of how to post notifications. This access code is what you need in the configuration.

I’ve been using the Alexa Media Player integration from HACS. It works great. Here is an example script I am using:

welcome_home:
  alias: Welcome Home
  sequence:
  - condition: state
    entity_id: device_tracker.life360_MyDevice
    state: 'home'
  - wait_template: "{{ is_state('binary_sensor.back_door', 'on') }}" 
    timeout: '00:05:00'
    continue_on_timeout: 'false'
  - service: notify.alexa_media
    data:
      target:
        - media_player.kitchen_dot
      data:
        type: announce
      message:  "Welcome Home Human"

Enjoy! :slight_smile:

Thanks! Works perfectly!

1 Like