Echo Devices (Alexa) as Media Player - Testers Needed

alexa
Tags: #<Tag:0x00007fd08d55fa68>

#2322

Routines work from my side, just tested, from Service Tab in Hassio.

media_player.play_media
    {
      "entity_id": "media_player.my_alexa",
      "media_content_id": "tenda sala",
      "media_content_type": "routine"
    }

#2323

@lonebaggie tried it again and now my example from above works. It seems a little unreliable, don’t know why.


#2324

Wouldn’t the new announce feature of this component keep them synced, when I call the not_last_called devices in one service.

target:
  - mediaplayer.one
  - mediaplayer.two

Maybe again @petro has an idea how to speak to one alexa and put a tts to all other alexa’s


#2325

I know that this is not quite what you asked for … but since you are talking to your Alexa anyway then why not say
Alexa, tell everyone dinner is ready

built-in functionality in Alexa for about a year (although roll out beyond USA/Canada took some time I think)


#2326

Ignore me :slight_smile: . Re-ran tests all working in Hass.io . TTS ,Announce, run routines.

Any mistakes in config seem to generate the errors.

Sorry for adding more confusion to this topic. What the saying “measure twice , cut once” , in this case test twice


#2327

I’m trying to install for the first time with a fresh update to 0.89.2 and version 1.2.1. I have copied the files to config/custom_components/alexa and restarted.

When setting up alexa_media in configuration.yaml the config checker just says: Unable to find component alexa_media.

Any advice?


#2328

Because the folder is config/custom_components/alexa_media

Read carefully the Configuration in the Wiki page and FAQ, since the installation method changed on 1.0.0


#2329

Thanks, I will have a look on that. Don’t know if this is already available in german speaking countries.


#2330

So just a little confused with “alexapy”.
I already have a working component (v. 1.1) and wouldn’t mind doing the upgrade, but do I need to install alexapy? I see that some here need to and others stated that they’ve never installed it. Which way to I go?
I run Home-Assistant in a Docker container ( not hass.io) on Ubuntu. Thanks


#2331

Did it and it worked right away… Thanks for the quick response! Had it configured this way earlier with other errors, but that must have been something else. Can confirm that it works on 0.89.2 and 1.2.1 without manual install.


#2332

Love, love, love this component. I have an Fire Tablet set up in show mode, and this is able to send both TTS and on screen messages. I don’t think this is possible at the moment, but any chance for a persistent message on a Show? Would be pretty cool to be able to send a few “reminders” or other notifications to the screen.


#2333

Could you tell us more about that show mode? I heard f it the first time. I have an old fire tablet (2015). Is it possible to use it with showmode like an echo show on a wall?

EDIT: Nevermind, the old fire tablet doesn’t work. But good to know about that, I might need a new fire tablet :wink:
One more question. Will it stay in showmode with enlightend display until the battery is empty? Or will the display turn off?

################

Does someone know if this is already possible in german too?

I know that this is not quite what you asked for … but since you are talking to your Alexa anyway then why not say
Alexa, tell everyone dinner is ready

I wasn’t able to find the right phrase. “Alexa, sag allen essen ist fertig”, “Alexa, sag jedem essen ist fertig” did not work.


#2334

I have the show docking station for the echo, so it stays fully charged all the time. To be honest, I rarely use the table for much more than “show” like stuff. I bought it over the holidays when they were selling the dock and the tablet for less than the new show. I like it. it’s not quite the best of both worlds, but its close. The sound quality is definitely inferior to the actual show, but I dont use it for music anyway.


#2335

This basic info has been shared other place, but with the new notify setup I wanted to share this simple setup to allow you have alexa give you information on your sensors. For example, I ask her, where someone is, I get a tide report, etc. Once you get this component set up, the following can help

In your sensors.yaml
- platform: template
  sensors:
      last_alexa:
        entity_id:
          - media_player.kitchen
          - media_player.office
          - media_player.bedroom
          - media_player.livingroom
          - media_player.garage
          - media_player.guestroom
        value_template: >
          {{ states.media_player | selectattr('attributes.last_called','eq',True) | map(attribute='entity_id') | first }}

This is in my configuration.yaml, but if you have a lights.yaml, put this there
light:
  - platform: template
    lights:
      alexa_virtual:
        friendly_name: "Alexa Dummy Light"
        turn_on:
        turn_off:
        set_level:

in your automation.yaml		
- alias: "Alexa Report"
  trigger:
  - platform: state
    entity_id: light.alexa_virtual
    to: 'on'
  condition:
  action:
  - service: alexa_media.update_last_called
  - delay: 00:00:01
  - service: notify.alexa_media
    data_template:
      target: 
        -  '{{ states.sensor.last_alexa.state }}' 
      data:
        type: tts
      message: >-
        {% if (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 1  %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion.  For example Degreess
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 2 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion. For example  miles
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 3 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion For example minutes
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 4 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 5 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 6 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 7 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 9 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion
        {% elif (states.light.alexa_virtual.attributes.brightness | int / 255 * 100 ) | round  == 10 %}
          Words.  What you want to say {{ states('sensor.name_of_sensor') }} follow on informtion
        {% else %}
         {{ states('light.alexa_virtual.attributes.brightness') }}
        {% endif %}
  - service: light.turn_off
    entity_id: light.alexa_virtual

You need to then expose the “light.alexa_virtual” to your alexas. This is the same as exposing any HA device to your alexa’s and not directly related to this component.

Once the light is exposed and you can turn it on/off, etc with your voice start the next steps
Use the alexa app to create a routine
Click + to create a new routine
Click the + next to “when this happens”
Click on Voice and enter what you want to say. For example “Alexa, give me the surf report”
Then click on add action
I recommend you add a step for “Alexa Says” and enter a short phrase “Let me check for you” is good example
Then add another step
Smart Home --> Control Device --> Select your Alexa Dummy Light and then select brightness
Select a value from 1 to 100, the number will correlate to the automation above
Click Save, give it a few minutes, and try it out.

If you have errors implementing the above, check your formatting. I am using this right now, and have been for several months without issue. The only changes recently were to update it for the new alexa media player notify capability. Enjoy


#2336

you forgot to add something to the top of your sensor:

In your sensors.yaml

- platform: template
  sensors:
    last_alexa:
      entity_id:
        - media_player.kitchen
        - media_player.office
        .

#2337

Yes, I did. :slight_smile: good catch, thanks. I’ve updated the post


#2338

Many many thanks!!!
I half-installed the thing with the dummy bulb, but missed some info.
Very good tutorial !!!


#2339

Have a look at my parser script. Written in python. It use the same basic flow as your automation to trigger an Alexa response.

It will allow you to extract and manipulate any entity value and get alexa to say it by parsing a simple text line.

I really struggle (too lazy) to understand HA automation’s, if this can be reworked into your automation, be my guest


#2340

I guess you were right and the capability has not been released in German/Germany yet … so it is back to your original request to find a way to do it with this addon.


#2341

We’re pulling the locale in this case directly from Amazon, so I don’t think that’s the cause. We are planning to implement a locale fix for login, but I don’t think that is what sets that value.

That said, I’m not sure what the issue is. Your log to the API is sending exactly what should be sent. Can you confirm if you create a push using the Alexa App that it works?

This is a confirmed bug with a fix already staged. Probably push it by end of the week.

I need to correct the context. As an entity_id example, media_player.alexa is meant as a placeholder to someone’s actual entity_id.

My statement earlier was that for a service, media_player.alexa_tts is how you can do TTS, but that will be deprecated in 1.3.x.

We’re limited by what the App can do. Find it in the App, and then we can emulate it.

Do you mind adding this into the Wiki?