Echo Devices (Alexa) as Media Player - Testers Needed

It’s what Amazon provides and is what we’re passing on for template use. Is it a problem to ignore it? We could expose an option to disable it if you don’t need templating. Alternatively, if you want to identify which fields you want and we get a consensus that’s enough we can slim it down.

Can you try 2.3.1 and report back? If it persists, one thing to verify is each Echo device has the proper timezone set. We are setting the timezone data per device for Alarms from this page (fix the region). Timers and reminders should automatically have the right time zone so also compare whether those are wrong.

For the three areas you’ve listed, going left to right.

  1. That is when the alarm sensor was last changed or set.
  2. That should be the actual time and date when the next will go off (e.g., 6:45 AM) the +2:00 indicates your timezone from UTC. If this is wrong or in the past, then there’s definitely a bug in the component. One issue in 2.3.0 is that we may not be updating properly if the websocket connection drops, so 2.3.1 should resolve that.
  3. This is when the next alarm should ring and should be consistent with 2. I’m not sure how HA calculates the sensor but one thing to verify is under your configuration HA has the correct time zone (Configuration → General).

EDIT: Just realized there’s a HA display bug if we return None when there aren’t any upcoming alarms. Would appreciate feedback on what the behavior should be.

Hi, regarding the description:
Basically its no issue to simply ignore.
When scrolling through the states these huge descriptions strucked me right way.
As I do not have a use case for these entities anyway, I cannot work out, what could be interesting for me. In the first view it might be enought to have the indicator if there are active timers and how many. For further info I would simply ask alexa :slight_smile:

@Pirol62: It is relevant to get more details, if you want to react on these sensors.

@alandtse: The timezone for HA is correctly set (Europe/Berlin for me).

1.) Ok it explains, why 1 says something independend. So this value is not really relevant. Fine with this, no bug
2.) shows me the correct time as UTC+2 is correct while we still have sommertime (MESZ). Also no bug
3.) seems to be buggy in 2 cases. It sometimes shows a time in the past as in the picture (means 2 hours ago) and sometimes it shows the correct amount of hours like right now for me (16h at 14:00 and an alarm for 6:45 next day. If there is no alarm (None) there is a minor bug as you noted by yourself, displaying invalid date.

But the sensor itself is doing what I need him to do, so I am fine. Good work :slight_smile:
Lukas

Can anyone help? I’ve been trying to correct the issue I am having with captcha for several days… I’ve reinstalled,… nothing I do pops an image with a code to enter. The attached picture shows to enter the captcha code but as you can see, I don’t have one to enter…Screenshot%20from%202019-10-11%2015-37-43

Nevermind - I finally figured it out.

And what was the problem? In case someone else has the same problem.

1 Like

Per the instructions, you just click confirm and it’ll get a new captcha.

I love this component. Have you ever considered supporting my media (https://www.mymediaalexa.com/)? It is a $5 a year service that allows you to stream your local itunes media to alexa. Songs played this way do not show up in the homeassistant component. It does provide a local webpage which could be scraped to know what song is playing. I play most of my media this way now.

1 Like

I’m setting up a Xiaomi Magic Cube to start different media playing on one of my Echo Dots - some Spotify playlists, I Heart Radio stations, and Sirius XM stations. The Spotify automations work great.
When I start I Heart Radio or Sirius XM, the station starts playing, but the player remains in standby mode and I have no controls until I use voice with Alexa to pause and then play. Then the artwork shows and the controls start working

Am I missing something, or is this just the way it works? Is there something I need to add to my automations? An example is below.

I run Hassio on an Ubuntu host; I’m on HA 0.99.3 and the latest version of Alexa Media Player (2.3.2) via HACS.

alias: Cube 6001
trigger:
  platform: event
  event_type: deconz_event
  event_data:
    id: mi_magic_cube
    event: 6001
action:
- service: media_player.volume_set
  data:
    entity_id:
      - media_player.family_room_dot
    volume_level: 0.3
- service: media_player.play_media
  data:
    entity_id: media_player.family_room_dot
    media_content_id: "The Blend"
    media_content_type: "SIRIUSXM”

Thanks for any help!

if everyone (possible only in Germany) has per now (HACS v2.3.2) problems with control the Echo devices (Echo 2.Gen, Echo Show 1.Gen, Echo Spot 1. Gen, Echo Show 5) over the AlexaMedia Player an status update problems, then take a look at the following issu and the quickfix from @Dielee. for me this works an all Play/Pause Stateupdate Problems are fixt for TuneIN an Amazon Music

No. Does it report properly in the Alexa mobile or web App? If it requires scraping a separate service, we probably wouldn’t bother as there’s enough complexity scraping from Alexa. Since you’re paying them, you have some power to ask them to make it work in the native Alexa app.

Also realistically, I’m not using the service so wouldn’t plan to pay to have access to try to implement or support it if it breaks. If someone wants to put in a pull request and maintain that feature I’m not opposed to including it.

It depends. If you’re connected through websockets (you can tell because the logs will mention polling has been disabled), there’s a bug right now where Amazon apparently isn’t pushing state changes through websockets everywhere (apparently Germany has lost it and maybe the UK). We’re trying to implement fallback functionality to address this use case, but it’s a balancing act to avoid slamming Amazon’s servers and getting your account throttled and being accurate. There’s a fix staged that may help; @northpower25 mentioned an earlier fix that is less sophisticated and will be replaced in the next version.

If you don’t have websockets, then the fallback polling mechanism will only start polling a media_player if HA knows you’ve started interacting with it and it’s detected it’s playing. That happens only if you use the component to interact with it. If you used another app, we wouldn’t know so can’t start polling.

I am using websockets. I am in the US. I can control the volume but have no play/pause ability (and no album art) when using I Heart Radio and Sirius XM. I’ll wait for the staged fix to see if that helps.

Edited to add: Thank you for your help, and for all your work on this great integration!

Oh check if the Alexa app is displaying info for those integrations. That’s the litmus test for what we can provide.

If I look at my Activity in the Alexa app I see those stations in there. Is that what you mean? I hear them playing. I just can’t control the play/pause with the Alexa media player in HA. I have to verbally tell my Echo Dot to pause, and then the media player in HA comes out of standby mode and works.

I noticed that in routines now you can invoke a skill to start. The one I’m interested in is the my Chevy skill. With this skill I could start my car, lock or unlock my doors. But this still requires a command and pin. Because this is not really using tts but using “Simon says” is it still not possible to use that functionality? Ie; state a pin?

Does anyone have a working example of a TTS script with random phrases please? I can’t seem to get the formatting correct.

On the hour, says “it’s XXX and everything goes fine” followed by a random phrase

- alias: 'Tutto va bene'
  trigger:
    platform: time_pattern
    minutes: 0
    seconds: 3
  condition:
    condition: time
    after: '10:30:00'
    before: '23:02:00'
  action:
    - service: notify.alexa_media
      data_template:
        data:
          type: announce
        target:
          - media_player.echo_salotto
        message: >
          "<lang xml:lang='it-IT'> <voice name='Giorgio'>   
          Sono le {{now().strftime("%H")}}, e tutto va bene, ",
          {{ [
              "   almeno fino a prova contraria..",
              "   almeno qui dentro, e di fuori ci frega il giusto..."
              "   per quanto risulta agli atti..",
              "   e speriamo continui..",
              "   secondo uso e costume..",
              "   ma ci avreste mai creduto?",
              "   ovviamente..",
              "   salvo errori ed omissioni..",
              "   e così sia..",
              "   per ora..",
              "   ma attenzione..",
              "   ma con molta attenzione..",
              "   e con ottime previsioni..",
              "   ma proprio bene..",
              "   come sono obbligato per contratto a dire..",
              "   e tra un'altra ora andrà ancora meglio..",
              "   e ti pare poco..",
              "   e buonanotte al secchio!!",
              "   ...con la supercàzzola come fosse antàni..",
              "   allineati perfettamente alle previsioni istat..",
              "   almeno credo...",
              "   ...èeene..., ...èeeene..., ...èeeeene....",
              "  ",
              "  "
           ] | random }},
              "</voice> </lang>"

:laughing:

2 Likes

No, it shows up in “Home” but not “Now Playing”. I’ll ask if them if possible to implement.

Hi all,

I am just wondering if it is possible to invoke the echo to say multiple things?

I am basically trying to get my echo when I walk into the kitchen for the first time to say “good morning” with a customised message (this works a treat and only on first activation as planned) and then I would like it to read my calendar for the day followed by the weather. The problem is I cannot see a way of the echo knowing when one sequence is finished to call the next?

I am using node red if that helps

mb

Is there a trick to getting routines to work? I am trying to follow the automation example, but it doesn’t seem to be working. If I change media_content_type to AMAZON_MUSIC the echo responds, so I know that it is communicating properly, but I can’t get the routine to work. Here is my config

  recently_played:
    alias: "Recently Played"
    sequence:
      - service: media_player.play_media
        data:
          entity_id: media_player.tim_s_echo_dot
          media_content_id: recently_played
          media_content_type: routine