Echo Devices (Alexa) as Media Player - Testers Needed

Hello,

Installed and the integration finds all my devices. I can add them to my dashboards but get no media status showing from my FireTV cubes. I was able to make the volume change on my Echo Show 10 (heard the beep) but found the following error in my logs. Any suggestions?

Home Assistant 2023.2.3
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230202.0 - latest

Log Details (ERROR)

Logger: homeassistant.components.switch
Source: custom_components/alexa_media/switch.py:44
Integration: Switch (documentation, issues)
First occurred: 7:08:27 PM (1 occurrences)
Last logged: 7:08:27 PM

Error while setting up alexa_media platform for switch

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 293, in _async_setup_platform await asyncio.shield(task) File “/config/custom_components/alexa_media/switch.py”, line 44, in async_setup_platform account = config[CONF_EMAIL] if config else discovery_info[“config”][CONF_EMAIL] KeyError: ‘email’

Can anyone think of a way to create a sensor that is only true when Alexa is available? For instance, if the internet is out or the Alexa service is down or this Alexa integration needs to be reauthenticated, the sensor will be false otherwise true.

The reason I ask is because I utilize the Echo devices a lot to simply inform the listener. However I want my authomations to still work even if Alexa can’t be reached.

For example, when motion is near my front door or in my driveway, I have the echos say “Motion in Driveway” or “Motion near Front Door”, If I have an Alexa available sensor that is false, my automation will have the wall mounted tablets to say the messages instead.

Having the three wall mounted tablets to broadcast the message is not ideal (but better than nothing) because there are only three, and I have 6 echoes, therefore the tablets speakers don’t cover the entire house like the echos do.

I don’t want to broadcast to both my tablets and the echoes simultaneously because it doesn’t sound very good to hear both at the same time as they obviously won’t be synced.

So there you have it. How can I create a binary_sensor that contains Alexa availability so I can fall back to a local only solution if the cloud isn’t availble?

Remove and readd. Your configuration is corrupted as it’s missing an email key. Meaning AMP doesn’t know what email address you have.

Hi guys,
There’s a way to read the content of markdown card with alexa media?
Thank you

I think you’re missing a single quote on the last line after mp3.
It should be :
media_content_type: "{{ iif(select == 'Kitchen', 'audio/mp3', 'custom') }}"

1 Like

Seams like the integration has broken. It cant connect and reinstalling dosent work eiter. Cant log in at all now. Just me or anyone elese?

" Connection Error! Please try refreshing. If this persists, please report this error to here:

All connection attempts failed"

Anyone else seeing odd behaviour with timers/alarms since yesterday? I noticed this because I got an error logged saying the attributes for my kitchen echo next_timer entity (where I use a lot of timers) were over 16kb. I’ve done some testing and it seems that when I set a timer, it gets added to the “sorted_active” and “sorted_all” attributes on the “…next_timer” entity, but when the timer ends or is cancelled, it doesn’t get removed from “sorted_all”, and the “total_all” counter stays incremented. For example, I just set and then cancelled a timer 3 times, and they are all still there under “sorted_all” so the list is getting bigger and bigger, and “total_all” is now 3. If I edit the list under developer tools to remove the old timers then they don’t come back when I set another timer, so the residual data is not coming from Amazon.

EDIT - OK, this is weird, earlier when I edited the entity to remove the list, it wasn’t coming back when I set another timer. Now, it is…

Total_all and sorted_all are raw json from the API. Whenever you create a new alarm/timer, Alexa creates a new entry. Sometimes its recycled. Most of the time, it sits around for years.

HA now ignores any large attributes so it’s purely cosmetic. We’ll take a PR to exclude it though so it silences the error.

Thanks. I know the alarms stay around after use, because you can still see them in the app. But timers disappear from the app. I use multiple timers a lot when I’m cooking, and the list of timers in sorted_all on my kitchen echo was huge (18 entries in it I think, all from that day), triggering the 16kb warning several times. Never seen that before. Some more subtle changes at Amazon probably (along with the max retries error which started a while ago).

Hi All,

Is there a way to make it possible to create routines in HA and push them into the Alexa App?
I have lots of routines and wondering if you can do this. When you need to reinstall de app or there was a crash and you can easy push all routines again into the app…

Write scripts. They can be exposed to alexa.

1 Like

Also with something like this:

Alexa, clean kitchen
Action: turn on a input_boolean > HA automation will trigger

I can create scripts in HA and then expose them to Alexa.

How do I run them with Alexa?

Scripts are displayed in Scenes in alexa. So in the routine, you can trigger a scene.
I give my scripts names like “command_start_irrigatin”. The command prefix makes it easier to find these scripts in alexa

1 Like

This same what I did little different. I created input_booleans to activate and behind it there was an automation. This makes it much easier. Create s script. And that script is in a routine and everything is set.

I figured out now. Thank you!

but what I asked first place was: Can you do a action to Alexa App so this whole routine will create in 1 action. Without adding them in the App itself.

P.S. in Homekit its easier… Scripts also work as seen as switches. Can directly say: Clean hallway, or what I given as alias name.

Can you play videos on the echo show?

No, Amazon does not let you create or import routines from any external source… they don’t even allow you to create them from the browser app that they keep trying to kill off.

1 Like

thanks for the information. :slight_smile:

Would it be possible to make this in a Blueprint ?

I never created a blueprint. Have to look into it.

1 Like

No worries, but it would be very helpful for low-techies like me :slight_smile:

1 Like