Echo Devices (Alexa) as Media Player - Testers Needed

Hopefully I’m just missing something here. Is there a working link for the alexa.py file? I’m getting 404 errors for any of the links to this from the above posts.

Thanks in advance

https://github.com/keatontaylor/alexa_media_player

1 Like

ah, thanks for that, I thought I also needed a file called alexa.py

Have gotten the above set up and seeing my dots in hassio so thats a good start. Now I just have to test the TTS.

Working as a media player once I got the captca in but for some reason I don’t get any output using TTS

Some more reading to do I think. :slight_smile:

OK, very impressed with this, got the TTS working, hopefully I can get this working via node red also. Only starting out but would like to be able to give notifications of doors/windows open when leaving house or water leaks etc.
Thanks for all the work put in on this component

Each account will have a last_called device. There is no guarantee that all devices are in the same location so we treat each account separate. We may be able to expose a time stamp so people can script the comparison manually across accounts.

Instructions here.

This may help even though it’s not node red. You can search the last 100 or so posts and you should see someone with examples. Perhaps someone will add those examples to the wiki.

1 Like

edit: disregard the below. I didn’t realize that there exists specific notify targets for each device! This means I don’t have to mess around with notify groups at all!

original message:
Hi, yes I’ve read the notify instructions, but my question is specifically WRT using the alert component. The alert component looks something like this:

alert:
  front_door:
    name: Front door is open
    done_message: Front door is closed
    entity_id: binary_sensor.front_door
    state: 'on'
    repeat: 3
    can_acknowledge: True
    skip_first: True
    notifiers:
      - chrome
      - kitchen_alexa_notifier

I tried creating a “kitchen_alexa_notifier” group:

notify:
  - platform: alexa_media
    name: alexa_media
  - platform: group
    name: kitchen_alexa_notifier
    services:
      - service: alexa_media
        data:
          target: alexa_media_kitchen_dot

However, it doesn’t appear to be working.

Is the notify group/target necessary for the alert component?

Change the service alexa_media to notify.alexa_media

This looks great @Corey_Maxim, did you get it working in the end? I’d like to use it with my automations too.

Are you referring to the welcome home announcements?

If so yes, all is well now!

I would be happy to share with you if that’s what your looking for

1.2.5 is out.

Mainly bug fixes and adding files HA v0.92.0 is now demanding of custom_components. For those using custom_updater, we removed the dev release option since it caused confusion and was a pain to maintain.

There may be a bug that is surfacing with v0.92.x and python 3.6 related to our use of async in the configurator. We are investigating.

Fixes:

  • Add files required for HA 0.92.x (resolves #164)
  • Fix bug where all bluetooth devices listed as sources (resolves #166 )
  • Fix bug where nested nodes in Hue scenes would not run (resolves #156 )

Full changelog.

As always, please use the the Wiki and FAQ if you need instructions or have questions. Also, please help in documenting features in the wiki since this thread is basically unsearchable now. We also use GitHub for bug reports/feature requests .

EDIT: We were missing some files for custom_updater so you may have to manually update if you tried to do a custom_updater update in between the original post and this edit.

3 Likes

How are you getting this to work for alerts? I’ve tried the “alexa_media_device_name” in “notifiers” but don’t you need to set the data type to TTS? I’ve tried the following and it doesn’t want to work:

alert:
  test:
    name: "*Alert:* TEST!"
    entity_id: input_boolean.guest_mode
    state: 'on'
    can_acknowledge: True
    skip_first: False
    repeat: 5
    data:
      type:
        - tts
    notifiers:
      - alexa_media_device

EDIT: Nevermind, figured it out. It has to be like this:

data:
  type: tts

Yes please @Corey_Maxim - thanks!

Just to let you know I’ve just updated to 1.2.5 and also updated my HA to 0.92.2, and I’m now no longer getting the services.yaml error on startup, everything looks to be working as intended. :slight_smile:

1 Like

@keatontaylor just a hint, could you update the installation instruction on top, the links to the github repo are not valid anymore. :wink:

It’s not possible to update the first post. That’s an issue with the forum settings. It may make sense to just start a new thread and let this one die.

Either that or get a forum admin to edit for you.

automation.yaml

 - id: family_greeting
      alias: Family Greeting
      trigger:
        platform: state
        entity_id:
          - binary_sensor.cameron_home
          - binary_sensor.corey_home
          - binary_sensor.courtney_home
          - binary_sensor.mom_home
          - binary_sensor.morgan_home
          - binary_sensor.wendy_home
          - binary_sensor.jasmine_home
          - binary_sensor.brandon_home

        from: 'off'
        to: 'on'
        for: '00:01:45'
      condition:
        condition: time
        after: '10:00:00'
        before: '02:00:01'
      action:
        - delay: "00:00:10"
        - wait_template: "{{ is_state('script.say_greeting', 'off') }}"
        - wait_template: "{{ is_state('binary_sensor.diningroom_door', 'on') }}"
        - delay: "00:00:10"
        - service: script.say_greeting
          data_template:
            entity_id: "media_player.livingroom"
            person: >
              {{ trigger.to_state.name }}
              {%- for s in states.binary_sensor
                    |rejectattr('entity_id','eq',trigger.entity_id)
                    |selectattr('state','eq','on')
                    if '_home' in s.entity_id and
                       (now() - s.last_changed).total_seconds() < 2 -%}
                {{ (' and ' if loop.last else ', ') ~ s.name }}
              {%- endfor %}
            message: >
              {{ ["Hey there PERSON Welcome Home, Did you hear about the restaurant on the moon? Great food, no atmosphere.",
                  "Sometimes you feel like a nut, Sometimes you don't, Sometimes you feel like PERSON, l o l  Welcome Back",
                  "Hello PERSON, How many apples grow on a tree, All of them",
                  "Welcome home PERSON, Want to hear a joke about paper, , , , ,  Nevermind it's tearable",
                  "Welcome home PERSON, I just watched a program about beavers, It was the best, dam program I have ever seen",
                  "Welcome home PERSON,  Why did the coffee file a police report, It got mugged",
                  "Welcome home PERSON, How does a penguin build its house, Igloos it together",
                  "Welcome home PERSON, I once, asked my Dad, did you get a haircut, No, he replied, I got them all cut",
                  "Welcome home PERSON, What do you call a Mexican who has lost his car? Carlos",
                  "Welcome home PERSON, Why did the scarecrow win an award? Because he was outstanding in his field",
                  "Welcome home PERSON, Why don't skeletons ever go trick or treating, Because they have no body to go with",
                  "Welcome home PERSON, What do you call an elephant that does not matter? An irrelephant ",
                  "Welcome home PERSON, Want to hear a joke about construction, I am still working on it",
                  "Welcome home PERSON, What do you call cheese that is not yours, Nacho Cheese",
                  "Welcome home PERSON, do you know Why the bicycle could not stand up by itself, It was two tired",
                  "Welcome home PERSON, What did the grape do when he got stepped on, He let out a little wine",
                  "Welcome home PERSON, I would not buy anything with velcro. It is a total rip-off",
                  "Welcome home PERSON, The shovel was a ground-breaking invention",
                  "Welcome home PERSON, This graveyard looks overcrowded, People must be dying to get in there",
                  "Welcome home PERSON, Two goldfish are in a tank, One says to the other, do you know how to drive this thing?",
                  "Welcome home PERSON, What do you call, a man with a rubber toe, Roberto",
                  "Welcome home PERSON, What do you call a fat psychic, A four-chin teller",
                  "Welcome home PERSON, I would avoid the sushi if I was you, It is a little fishy",
                  "Welcome home PERSON, To the man in the wheelchair, that stole my camouflage jacket,... You can hide but you can not run",
                  "Welcome home PERSON, The rotation of earth, really makes my day ",
                  "Welcome home PERSON, I thought about, going on an, all-almond diet, But that is just nuts",
                  "Welcome home PERSON, What is brown and sticky, A stick, he he",
                  "Welcome home PERSON, I have never gone, to a gun range before, I decided to give it a shot!",
                  "Welcome home PERSON, Why do you never, see elephants hiding in trees, Because, they are so good at it",
                  "Welcome home PERSON, Did you hear about the kidnapping at school, It is fine, he woke up",
                  "Welcome home PERSON, A furniture store keeps calling me, All I wanted was, one, night, stand",
                  "Welcome home PERSON, I used to work, in a shoe recycling shop, It was sole destroying",
                  "Welcome home PERSON, Did I tell you the time, I fell in love during a backflip, I was heels, over head",
                  "Welcome home PERSON, I do not play soccer because, I enjoy the sport, I just do it for kicks",
                  "Welcome home PERSON, People do not like having to bend over to get their drinks, We really need to raise the bar",
                  "Welcome home PERSON, You are so ugly, you scared the crap out of the toilet",
                  "Welcome home PERSON, Your family tree, must be a cactus because, everybody on it is a prick",
                  "Welcome home PERSON, No, I am not insulting you, I am describing you",
                  "Welcome home PERSON, If I had, a face like yours, I would sue, my parents",
                  "Welcome home PERSON, Your birth certificate, is an apology letter from, the condom factory",
                  "Welcome home PERSON, The only way, you will ever get laid, is if you, crawl up a chickens arse, and wait",
                  "Welcome home PERSON, You are so fake, Barbie is jealous",
                  "Welcome home PERSON, I am jealous of people, that do not know you!",
                  "Welcome home PERSON, You are so ugly, when your mom dropped you off at school, she got a fine, for littering",
                  "Welcome home PERSON, If I wanted to, kill myself, I would climb your ego, and jump to your I Q",
                  "Welcome home PERSON, You must have been born on a highway, because that is where most accidents happen",
                  "Welcome home PERSON, Brains are not everything, In your case, they are nothing",
                  "Welcome home PERSON, Roses are red violets are blue, God made me pretty, what happened to you",
                  "Welcome home PERSON, Behind every fat woman, there is a beautiful woman, No seriously, your in the way",
                  "Welcome home PERSON, Calling you an idiot, would be an insult, to all the stupid people",
                  "Welcome home PERSON, Please shut your mouth, when you are talking to me",
                  "Welcome home PERSON, I would slap you, but that would be, animal abuse",
                  "Welcome home PERSON, They say opposites attract, I hope you meet someone who is, good-looking, intelligent, and cultured",
                  "Welcome home PERSON, The last time, I saw something like you, I flushed it",
                  "Welcome home PERSON, If ugly, were a crime, you would get, a life sentence",
                  "Welcome home PERSON, Shock me, say something, intelligent",
                  "Welcome home PERSON, If your gonna be two faced, honey at least, make one of them pretty",
                  "Welcome home PERSON, I do not know, what your problem is, but I would bet, it is hard to pronounce",
                  "Welcome home PERSON, so you claim, You get ten times more girls than me, well lets do the math, ten times, zero is, still zero",
                  "Welcome home PERSON, You are the reason, the gene pool needs, a lifeguard",
                  "Welcome home PERSON, Of course, I talk like an idiot, how else would you, understand me?",
                  "Welcome home PERSON, All day I thought of you.., I was at the zoo ",
                  "Welcome home PERSON, I would like to see things, from your point of view, but I can not seem to get, my head that far up, my own arse",
                  "Welcome home PERSON, Stupidity, is not a crime, so you are free to go",
                  "Welcome home PERSON, You so dumb, you think Cheerios, are doughnut seeds",
                  "Welcome home PERSON, Is your body, from McDonalds?, , , , , , , , Cause, I am loving it ",
                  "Welcome home PERSON, You are so dumb, that you got hit, by a parked car",
                  "Welcome home PERSON, Are you always, this stupid or, is today a special occasion?",
                  "Damn, how, you, doin PERSON, question, Are you Israeli?, , , ,  Cause you Israeli hot",
                  "PERSON is finally here, hey PERSON , Are you from, dunkin donuts, , , ,   because I like you, a latte",
                  "Are you my appendix PERSON, Because I do not understand, how you work, but this feeling in my stomach, makes me want to take you out, Oh welcome home PERSON",
                  "Do you like sales, PERSON, Because, if you are looking for a good one, clothing is, 100% off at my place.",
                  "hey PERSON, Are you from, Japan,  cause im trying, to get in, Japanties ",
                  "Are you craving Pizza, PERSON,  Because I would love, to get a, pizza you, welcome home",
                  "Is your dad, a terrorist, PERSON, Because you are, the bomb",
                  "PERSON, Are you, Australian? ,,,,Because you meet all of my, koala,fications",
                  "PERSON, If I had a garden, I would put your tulips, and my, tulips together",
                  " welcome home PERSON, Did you hear, of the new disease, called beautiful, I think you are,  infected",
                  " PERSON, If you were a vegetable, you would be a, cute-cumber, welcome home",
                  " Hello PERSON, You should change your name to, Coca Cola, because, you are so-da-licious",
                  " hey finally PERSON is here, I wanted to ask you, if I cook you dinner, would you cook me breakfast, PERSON, I have to say your so HOT",
                  "Hey PERSON,  my name is, Microsoft"  "Can I crash, at your place, tonight"
                 ] | random }} 

script.yaml

say_greeting:
  sequence:
  - service: media_player.volume_set
    data:
      entity_id: media_player.livingroom
      volume_level: 1
  - service: notify.alexa_media
    data_template:
      data:
        type: tts
      target: "{{ entity_id }}"
      message: "{{ message.replace('PERSON',person) }}"
4 Likes

Hey, cool work. Thanks for sharing. Corey_Maxim

2 Likes

Dear,
sorry to ask question, but the thread is too big to go through
i would like guidance for playing music on alexa echo dot from
i would like to play music which is stored

  1. on my raspberry pi on which hass.io on docker is installed
  2. from my samba server which is on another pi.
    please guide
    thanks