Echo Devices (Alexa) as Media Player - Testers Needed

I have an Echo Auto arriving tomorrow. Anyone have this component working with Echo Auto? Anyone know any reason why it wouldn’t work?

https://www.amazon.com/gp/product/B0753K4CWG/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

I haven’t tested it, but the outer data should be a data_template. See remco_home on the wiki.

  - service: notify.alexa_media
    data_template:
      data:
        type: announce
      target: media_player.kuche
      message: 
        'Guten Morgen! Die Alarmanlage ist {% if is_states("alarm_control_panel.lupusec_alarm","disarmed") -%} deaktiviert {%- else -%} aktiviert {%- endif %}.
        Die Wettervorhersage für heute ist {{ states("sensor.dark_sky_summary") }} bei einer Höchsttemperatur von {{ states("sensor.dark_sky_daytime_high_temperature_0d) | round(0) }} Grad.'

It should be fixed moving forward. Let us know of course if any of you are still seeing that issue.

I think it should work although I haven’t tested it. If it doesn’t, file an issue and we may need your devices json to see how to parse it.

1 Like

Hi alandtse,

I tried the data_template suggestion but with that change automations.yxaml won’t even pass the Config check. I get this error when I do the config check:
Invalid config for [automation]: invalid template (TemplateSyntaxError: unexpected char ‘"’ at 266) for dictionary value @ data[‘action’][0][‘data_template’][‘message’]. Got None. (See /config/configuration.yaml, line 92). Please check the docs at https://home-assistant.io/components/automation/

And I have no clue where or why a " would be an unexpected char

there is a quote there that shouldnt be there

From time to time Alexa notifications stop working.
I in the home assistant logs appears this error:

2019-05-24 19:17:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/notify/init.py”, line 114, in async_setup_platform
if hasattr(notify_service, ‘targets’):
File “/config/custom_components/alexa_media/notify.py”, line 102, in targets
[‘devices’][‘media_player’].items()):
KeyError: ‘devices’

It can disappear after a restart of my docker container or stay…

Of Course Alexa notifications don’t work in this state.

How can I solve this issue?

Thank You

It was so simple and I didn’t see it cause I was focused on the if statement and thought that was the cause. Thanks so much ReneTode!

1 Like

Hi Guys

I am really having trouble setting this up. I have spent hours reading and makes changes as required by the mass amount of posts
It appears the issue for me is the Captcha. This is not coming up after reboot
I have this as a notification in HA
“The following components and platforms could not be setup
alexa-media
alexa_media.notify”

I also have a very large file in showing “Detailed Log Errors” Large File
So, if I am not seeing the Captcha come up after reboot, what is stopping the captcha from loading???
I am using Safari if that makes a difference
I am loaded all files as detailed to the Custom_Component folder - alexa_media
Thanks in advance for your help
Bruce

The component should be alexa_media, so use an underscore and no dashes. Also make sure you’re following the instructions precisely.

Hi all, it is possible to use template to set volume of media player in notify service? Thanks to the work of some skilled users I added a notification center in which is possible to set different saving volume values for different period of day and with a script the notify is sent to tts and also to telegram or others. In the code I wrote volume_level: >- {state.sensor.period_of_day_volume.state}, where the sensor store the volume of morning, afternoon etc, but in automatiins this doesn’t work, the tts volume is the one of the master volume setting, it doesn’t change with sensor value, so I ask if it’s possible to have a template in alexa media notify service or if someone managed to do this

1 Like

Thanks for coming back to me to hopefully get this working. I am pretty sure I have followed the instructions accurately. Here is my Config yaml entry

alexa_media:
  accounts:
    - email: [email protected]
      password: passlword
      url: https://amazon.com

The alexa-media is what is says in the Notification window in Top Right Corner, so I do not know why is shows as alexa-media and not alexa_media
See images below

22%20AM

Oops
Not sure how to add images of screen snapshots SORRY

Hope this helps guys
cheers

You truncated your config on the first line which is the critical line which should read alexa_media: without any preceding spaces. The next line for accounts should be a two space indent.

Also the reason why we can’t see the images is because you’re currently in quote mode. The triple ``` after the url needs to be on it’s one line. Please edit your post to fix that.

Lastly, make sure you download the files using raw mode or download the archive with a zip file. You can’t use the “save as” function in the browser.

I also live in Aus, and have tried this config, and it does not work for me. I use amazon.com instead.

Thanks again

  1. Post edited above to show images.
  2. Have corrected intents and now show this in updated Post above
  3. I did download the Zip file to get the files

Thanks @kanga_who
Changed to amazon.com, whoever still no joy sadly

Remove https from the URL.

Success finally. Got the captcha come up in the notifications YAY!!!
Thanks heaps @alandtse
Legend and sorry for all my mistakes
Your support and help is amazing. Great work and great community

I have hassio 0.93.2 on a docker and today when i reboot my hassio o got this error:

`019-06-02 18:29:45 ERROR (Thread-2) [websocket] error from callback <bound method WebsocketEchoClient.on_open of <WebsocketEchoClient(Thread-2, started daemon 140493311404816)>>: [Errno 32] Broken pipe

2019-06-02 18:29:45 ERROR (Thread-2) [alexapy.alexawebsocket] WebSocket Error [SSL: BAD_LENGTH] bad length (_ssl.c:2341)`

somebody can help me,
thanks

Any ETA for 1.3? Looking forward to Guard control :ok_hand:

Im getting the same error. not sure whats wrong.

[alexapy.alexawebsocket] WebSocket Error [SSL: BAD_LENGTH] bad length (_ssl.c:2341)

Same error here, i am on “amazon.de