Echo Devices (Alexa) as Media Player - Testers Needed

Either modify your configuration.yaml or delete and readd the integration.

Would need logs to debug. However, I’ve just found it easier to setup an OTP using an authenticator on my phone instead of relying on Amazon’s servers to send the email or sms correctly. Please note you would need to type sms or email in the prompt and it will identify where Amazon thinks it will send it.

I’m trying to figure out where to fine the debug log.

This has been working fine until about two days ago.

I tried sms and email, but if I enter Corey’s 25th iOS Device

I do get a second screen but after that it goes back to entering the captcha

I’ve actually never seen that option to send a push, so we probably need to update the code to handle it. You’d have to enable Advanced Debugging, and once you got the Verification Method page in HA, you’ll see two html files generated in the /config directory. If you send them to me, I can then add something to process the push options.

I was referring to adding an Authenticator app like Google Authenticator that will generate OTPs for you without relying on Amazon pushing anything to you.

1 Like

I’ve just bought a new LG webOS TV and I have it included as an “echo” device in my Alexa app. It is discovered in HA using the alexa media player component. but I haven’t been able to successfully send a TTS announcement to it like I do with my regular Echo devices.

Is that possible?

Can you do it in the official App?

That’s a really good question.

I’ve never tried to start playing anything thru the app or tried to trigger a TTS announcement on any of my devices thru the app.

I’ll have to see if I can figure out how to do it and get back to you…

EDIT:

wait…are you just asking if I can trigger a “simon says…” on the TV with the remote?

EDIT2:

if that’s what you are asking then the answer is yes. I just enabled the “simon says” skill and the TV repeated back what I said.

EDIT3:

I just tried it thru the notify.alexa_media service that woks on the other echo devices but nothing happens.

If I try to do the tts from the echo media player widget the TV announces that tts can only be called using the notify.alexa_media service and to see the alexa media wiki.

So it’s kind of working.

I don’t have debug enabled yet but there is nothing in the logs.

and EDIT4:

here are the debug logs from trying to run the notify service:

2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Message: testing the tts system, kwargs: {'target': ['media_player.lg_webos_tv_echo'], 'data': {'type': 'announce', 'method': 'all'}}
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Kitchen Dot: standby>, Kitchen Dot, G************HC5, media_player.kitchen_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Computer Room Dot: standby>, Computer Room Dot, G************2B9, media_player.computer_room_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Livingroom Dot: standby>, Livingroom Dot, G************5MV, media_player.livingroom_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Master Bedroom Dot: standby>, Master Bedroom Dot, G************242, media_player.master_bedroom_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Big Room Dot: standby>, Big Room Dot, G************F7L, media_player.big_room_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Garage Dot: standby>, Garage Dot, G************F4D, media_player.garage_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Basement Dot: standby>, Basement Dot, G************10D, media_player.basement_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity Everywhere: standby>, Everywhere, f****************************213, media_player.everywhere)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: media_player.lg_webos_tv_echo against (<Entity LG webOS TV Echo: standby>, LG webOS TV Echo, a****************************69a, media_player.lg_webos_tv_echo)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Converting: media_player.lg_webos_tv_echo to (entities): <Entity LG webOS TV Echo: standby>
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Kitchen Dot: standby>, Kitchen Dot, G************HC5, media_player.kitchen_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Computer Room Dot: standby>, Computer Room Dot, G************2B9, media_player.computer_room_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Livingroom Dot: standby>, Livingroom Dot, G************5MV, media_player.livingroom_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Master Bedroom Dot: standby>, Master Bedroom Dot, G************242, media_player.master_bedroom_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Big Room Dot: standby>, Big Room Dot, G************F7L, media_player.big_room_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Garage Dot: standby>, Garage Dot, G************F4D, media_player.garage_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Basement Dot: standby>, Basement Dot, G************10D, media_player.basement_dot)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity Everywhere: standby>, Everywhere, f****************************213, media_player.everywhere)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity LG webOS TV Echo: standby> against (<Entity LG webOS TV Echo: standby>, LG webOS TV Echo, a****************************69a, media_player.lg_webos_tv_echo)
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Converting: <Entity LG webOS TV Echo: standby> to (serialnumbers): a*******************9a
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] Announce targets: ['a****************************69a'] entities: [<Entity LG webOS TV Echo: standby>]
2020-02-06 22:49:09 DEBUG (MainThread) [custom_components.alexa_media.notify] j************7@g*******m: Announce by <Entity LG webOS TV Echo: standby> to targets: ['a****************************69a']: testing the tts system

No, can you schedule a routine that targets the TV.

Announce doesn’t always work with third-party Echo devices. Use type tts.

Actually I have a question and it probably isn’t possible, but it may be.

I have some echo buds - they show as a media_player device in HA and in the app - can we target stuff to them?

I noticed that if I use them to call Alexa, they show up in my sensor.last_alexa, but i cannot seem to get them to do anything through HA.

That was it.

Thanks!

Hi Everyone -

I’ve been having a problem with the verification screen. I’m given the options of SMS, email, etc. - No matter which option I pick, I don’t get a confirmation number sent to me.

I had a look through all the other posts, and tried at deleting the pickle file - and that didn’t seem to solve anything.

I’m in Canada, and have tried the .ca and .com domains

Any ideas on what I should try next? thanks

Quick question regarding the correct use of the media content id.

In the Alexa app, I created a routine with following values:
Name: “good morning”
When: “Alexa, good morning”

In my automations.yaml I have this code:

  action:
    - service: media_player.play_media
      data:
        entity_id: media_player.damians_echo
        media_content_id: Alexa.GoodMorning.Play
        media_content_type: routine
    - service: input_boolean.turn_on
      data:
        entity_id: input_boolean.motion_kitchen_triggered_today

Is “Alexa.GoodMorning.Play” the correct content id or should it be something different? I can trigger the routine via the automation editor UI and pressing execute and it doesn´t work via the trigger as well. Since I can manage Alexa via HASS, I assume it´s this id which causes the problem :slight_smile:

Either generate some debug logs so we can try to debug it, or you can try to sidestep the OTP by setting up an authenticator app on your phone. See this post which I just posted last week that explained that. If you generate logs, DM me so it doesn’t hit the forums.

No. If it’s a routine, it’s probably good morning if that’s the utterance. If it’s the Amazon reserved sequence, it may have to be done as a sequence instead of a routine.

    - service: media_player.play_media
      data:
        entity_id: media_player.damians_echo
        media_content_id: Alexa.GoodMorning.Play
        media_content_type: sequence

The underlying code matches the utterance field from this API (change domain as appropriate).

thanks @alandtse

As a routine “good morning” as the id worked.
Keeping the above id and using sequence worked as well but only the first part of the routine was played, not the entire routine/sequence.

So I can play music via dev tools, but the automation never triggers:

 data:
   media_content_id: Ocean Waves
   media_content_type: APPLE_MUSIC
   entity_id: media_player.bedroom_dot
   service: media_player.play_media

I’ve enabled debugging, but I don’t know where to look for any errors. I think I may have missed a step, I just have no idea what that might be. Help?

edited: format
Edit 2: Yikes, I think I found my mistake. I didn’t realize you have to create a script for command execution. As a beginner I thought it was a “set it and forget it” kinda thing. I didn’t fully understand the “sequencing “ part of this component. I still don’t.

Just installed this a TTS working great.

Is it possible to read current Alexa Volume Value, store it, make an announcement at a set value and then restore Alexa back to the stored volume value?

Regards Dave

Yes, I do that right now for one of my “important” announcements.

But if you do it my way you’ll need a way to save the volume as a variable. there are at least two custom components I know that can do that. I use one by @rogro82 that you can find on github

once you install that you should be able to modify this code to do what you want:

variable:
  tts_echo_device_one_volume:
  tts_echo_device_two_volume:

automation:
  - alias: "TTS volume save and restore"
    trigger:
      - platform: state
        entity_id: 
          - input_boolean.some_boolean
        to: 'on'
    action:
      - service: script.tts_save_dot_volume
      - service: media_player.volume_set
        data:
          entity_id:
            - media_player.echo_device_one
			- media_player.echo_device_two
          volume_level: 0.9
      - delay: '00:00:05'
      - service: notify.alexa_media
        data_template:
          target: 
            - media_player.echo_device_one
			- media_player.echo_device_two
          data:
            type: tts
          message: "This is an message"
      - service: script.tts_restore_dot_volume


script:

  tts_save_dot_volume:
    alias: Save Current Volume for Echo TTS
    sequence:
      - service: variable.set_variable
        data:
          variable: tts_echo_device_one_volume
          value_template: "{{ state_attr('media_player.echo_device_one, 'volume_level') }}"
      - service: variable.set_variable
        data:
          variable: tts_echo_device_two_volume
          value_template: "{{ state_attr('media_player.echo_device_two', 'volume_level') }}"

  tts_restore_dot_volume:
    alias: Restore Previous Volume for Echo TTS
    sequence:
      - service: media_player.volume_set
        data_template:
          entity_id: media_player.echo_device_one
          volume_level: >
            {% if states('variable.tts_echo_device_one_volume') != 'None' %}
              {{ states('variable.tts_cho_device_one_volume') }}
            {% else %}
              .5
            {% endif %}
      - service: media_player.volume_set
        data_template:
          entity_id: media_player.echo_device_two
          volume_level: >
            {% if states('variable.tts_echo_device_two_volume') != 'None' %}
              {{ states('variable.tts_echo_device_two_volume') }}
            {% else %}
              .5
            {% endif %}
1 Like

Not sure if the right post, but anyone else having issues with showing the Amazon Captha to register the alexa device? :frowning:

image

Hit confirm to reload the image.

1 Like

I get this also sometimes when I do a renew captcha. After 2 or 3 times just hit enter I get a image to fill it in correct.

Yeah, that worked :slight_smile: thanks