Echo Devices (Alexa) as Media Player - Testers Needed

I followed these steps from @danielpervan and mine is now working again.

Deleting the token and reinstalling 2.8.0 seems to have fixed the problem for me.

My steps were specifically:

Delete /config/.storage/alexa_media.wayne.com.pickle
Reinstall Alexa Media Player
Reboot
Click on notification and fill out captcha

1 Like

Thanks for the help! That fixed it!

Took me awhile to find the pickle file. Had to ssh into the HASIO.

Removing token/pickle file, reinstall/reboot did not help in my case.

edit: Got it to work again, my steps were (YMMV):

  • uninstalled integration from HACS, token/pickle file were already removed
  • added to configuration.yaml:
alexa_media:
  accounts:
    - email: !secret amazon_user
      password: !secret amazon_password
      url: amazon.com
  • restart HA, then installed AMP 2.7.5 from HACS without configuring
  • restart HA, New devices discovered notification appeared, clicked the link
  • Alexa Media Player under Discovered, clicked configure to enter email/password, submit
  • Captcha appeared, entered and submit,
  • a window asking where to send OTP (One Time Password) appeared, chose from the device list
  • another Captcha appeared (to confirm sending OTP, maybe), entered and submit
  • a small window appeared and waiting for the OTP
  • got OTP from chosen device, entered in the window
  • AMP configured but no device found
  • restarted HA, all my devices showed up in AMP

Not sure if it has to be 2.7.5, that what I did to got it working again, not touching it for a while :slight_smile:
Hope this help someone.

none of it worked for me either, i also uninstalled alexa media player integration then rebooted it, then re-added still no luck.

finally i performed configuration->integration->alexa media player-> 3 dots menu->delete
then performed re-add integration.

my credentials failed a couple of times with network error, finally 3rd time worked, kaptcha finally popped up, alexa integration worked to a degree, some of my media player entities are not available, at least my alarm_control_panel for alexa guard is back.

restarting home assistant, breaks alexa media player again. I had to delete alexa media player again then add it back to work.

a few other integrations seemed to be affected today, my skybell integration which also uses amazon web services was having errors while alexa media player integration was broken. Don’t know if there is a network issue with aws or 1 error in home assistants causes other errors.

i still see alexapy.errors.alexapyconnectionerror in my log thought this is not a complete success.

I first had to fix a slight dns problem, reboot the raspberry pi, then I decided to upgrade HA to 0.110 in case there was a dependency to alexa.py python library (if it is in HA) not sure. then I followed @JTPublic steps with the exception i tried AMP 2.8.0. Most things work, only entity that is not working is alarm_control_panel.alexa_guard_a556b or the service to
arm/disarm ->alarm_control_panel.alarm_arm_home is not working.

I even tried developments tools->services alarm_control_panel.alarm_arm_home
with service data {"entity_id":"alarm_control_panel.alarm_arm_home"} nothing happens, no immediate log errors from calling the service.

My alexa_guard_xxxxx is working as it should.
I don’t think you can use alarm_control_panel.alarm_arm_home, to set it to home, try alarm_disarm instead.
alarm_arm_away sets it to Away.

Thanks for 2.8.0 info, may try that later.

yeah, my test was wrong but I have automation scripts that run the service calls
alarm_control_panel.alarm_arm_night, alarm_control_panel.alarm_disarm, alarm_control_panel.alarm_arm_away. I executed arm night last night, the echo dots did not have the light circling (guard mode) even this morning. I also tried from the alexa app alexa guard arm way, the HA alarm_control_panel.alexa_guard_a556b did not change its state to match the alexa app state.

This morning I tried the HA gui control panel for alexa “arm away”, it works now it didn’t yesterday. it just started working, I didn’t even reboot HA this morning.

The only thing i can think of is when I ran alarm_control_panel.alarm_arm_home yesterday for testing, it put alexa guard in a weird state, it cleared up from it this morning maybe when I tried “arm away” from HA alexa guard control panel.

edit: alexa guard in AMP 2.8.0 is still a little flaky, intermittently my automation can’t arm it.
i’ll anxiously wait for a fix in 2.8.1

working for me using this as well thanks

Got it working as well …1) Use HACS to remove it, 2) delete pickle file, 3)Reboot HA, 4) Use HACS to add it back, 4) Reboot HA 3) Now am able to get a Captcha from the config button. :slight_smile:

Without some logs showing the issue, there won’t be a fix unfortunately. The only thing I can think of based off your description is that it’s disconnecting the websocket connection which then makes the Alarm updating delayed since it’s on a polling instead. Again, I’m guessing since I don’t have data.

I had some time now, tried enabling extra logging using the following in my configuration.yaml and restarted HA

logger:
  default: info

  logs:
    custom_components.media_player.alexa: debug

Tested my automation script, alexa guard did not get armed, but no errors in log. after extensive testing i’ve concluded the service alarm_control_panel.alarm_arm_night no longer works, or it has changed and I have to pass additional data. Calling it seems not to do anything without throwing any errors.

i switched my service calls in my scripts from alarm_control_panel.alarm_arm_night to alarm_control_panel.alarm_arm_away everything works now like before dependable.

my scripts not only turn on alexa guard, but also arm DSC alarm panel I keep the 2 in sync.

In DSC alarm arm night or arm stay has different meaning then arm away, I was trying to keep the 2 system states conceptually the same.

I honestly didn’t even know that was a service call mode and we actually don’t support that in the component. We have only supported SUPPORT_ALARM_ARM_AWAY. So I’m not sure why you weren’t getting errors every time you tried to set it before. But yes, only alarm_control_panel.alarm_arm_away will work.

Any idea, why my alerts or times are no longer created? I added this component using HACS in meanwhile. I added 5 echo devices with an include there. But none of them is creating these additional sensors for alarms and timers (newest HA and component).

I’m having trouble getting the alexa media player configured through the UI Integrations page.
(Everything was working great in yaml)
I’m running Home Assistant Core 0.109.6 and Alexa Media Player v2.8.0 )

I attempted to install Alexa Media Player from the Integrations page by clicking ‘configure’ like any other integration and the config menu appears.

I fill out my email/password and entered the devices I wished to include/exclude as
device 1,device 2,device 3
and hit submit. The config menu flashes very briefly and then …nothing. The menu just sits there.

Enabling the advanced logging option results in the following log entry:

2020-05-23 08:15:49 DEBUG (MainThread) [custom_components.alexa_media.config_flow] show_form user None None OrderedDict([('email', <class 'str'>), ('password', <class 'str'>), ('url', <class 'str'>), ('debug', <class 'bool'>), ('include_devices', <class 'str'>), ('exclude_devices', <class 'str'>), ('scan_interval', <class 'int'>)])
2020-05-23 08:16:25 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Using existing login
2020-05-23 08:16:25 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Testing login status: {}
2020-05-23 08:16:25 DEBUG (MainThread) [custom_components.alexa_media.config_flow] show_form user None None OrderedDict([('email', <class 'str'>), ('password', <class 'str'>), ('url', <class 'str'>), ('debug', <class 'bool'>), ('include_devices', <class 'str'>), ('exclude_devices', <class 'str'>), ('scan_interval', <class 'int'>)])

but it never went to the 2FA prompt or anything … it just sat there.
It created an alexa_media<email>get.html in my config folder but nothing else.

There is no feedback to tell me there is an error or my syntax is incorrect. I am entering the devices as documented in the wiki. I even tried again leaving these blank with the same result.

Am I doing something wrong? Missing something? I’ve been a long time user of this component and it worked great in yaml up until yesterday when it showed up in my discovered devices…

Because you didn’t include alarms and timers.

Please check out the open issue. There’s a proposed fix that needs to be tested. What likely happened is a combination of your cookies expiring (delete the /config/.storage/ .pickle file) and Amazon’s sign in page changing.

@alandtse - Thanks, Alan! - I definitely appreciate the quick response!

I had a bug in my script, i was unaware it was calling alarm_control_panel.alarm_arm_away 1st, then it called alarm_control_panel.alarm_arm_night 2nd . The bug was dormant no issue with arming upto 2.7.9. in 2.8.0 i’m guessing the 2nd call interrupted the 1st call.

Forgive me if I missed this (or maybe doesn’t apply here), but after upgrading to 0.110.x, I’m getting the following log messages:

MediaPlayerDevice is deprecated, modify AlexaClient to extend MediaPlayerEntity
AlarmControlPanel is deprecated, modify AlexaAlarmControlPanel to extend AlarmControlPanelEntity

and

SwitchDevice is deprecated, modify AlexaMediaSwitch to extend SwitchEntity
SwitchDevice is deprecated, modify DNDSwitch to extend SwitchEntity
SwitchDevice is deprecated, modify ShuffleSwitch to extend SwitchEntity
SwitchDevice is deprecated, modify RepeatSwitch to extend SwitchEntity

I’m using Alexa Media Player ver 2.8.0

Yes, this is a known issue. Should be resolved in 2.8.1.

Hmm, there is nothing told how to “include” all needed “add-on” sensors and things via include, can we use a “*” or something like that?
It is said, that you have to name the devices as they are named within alexa. And inside alexa,
I have no sensors and things like that.
And it is said in documentation, that for all found devices timers and alerts are beeing generated.
Can you give some examples how to include these additional components?