Higher up this post
Oh, no wonder I missed it. That was 5 months and over 1300 posts ago!
But I guess it’s a moot point if you couldn’t get it work. Mine’s working so why mess with something that ain’t broke.
True!
Hello the service stop working suddenly I change my amazon password in amazon web and then in my configuration.yaml I got this when I reebot home assistant. Any help please?
Error while setting up platform alexa
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/media_player/alexa.py”, line 142, in setup_platform
config.get(CONF_DEBUG))
File “/config/custom_components/media_player/alexa.py”, line 608, in init
self.login_with_cookie()
File “/config/custom_components/media_player/alexa.py”, line 631, in login_with_cookie
self.login(cookies=cookies)
File “/config/custom_components/media_player/alexa.py”, line 766, in login
self._data = self.get_inputs(soup)
File “/config/custom_components/media_player/alexa.py”, line 644, in get_inputs
for field in form.find_all(‘input’):
AttributeError: ‘NoneType’ object has no attribute ‘find_all’
anny possibilities to fix this? (running on a pi zero w)
Updating alexa media_player took longer than the scheduled update interval 0:00:10
09:02 helpers/entity_platform.py (WARNING)
Perfect, just what I was looking for.
I’ve been trawling the docs and forum for something like this, but honestly can’t remember to have seen it before now. Thanks!
Could you please post your automation? I’m having an issue getting the silence to play. My Echo’s just tell me that TTS is only supported via the media_player.alexa_tts service.
Thanks!
Having a weekend holiday, so I can’t get to my config now. But you’re probably using the wrong service to get the silence. This message plays when you try to use the Google TTS.
Probably worth to mention that this only works with Amazon music or another service that has a ‘silence track’ available. Using TTS will not bring the “paused” state back, I guess.
For Amazon music it should be something like:
- service: media_player.play_media
data_template:
entity_id: media_player.downstairs
media_content_id: 5 second silence
media_content_type: AMAZON_MUSIC
Thanks for that! I really appreciate it. I also noticed that that the Echo’s also have an Idle state (I think it’s the same as paused) in which you can’t change the volume as well. Instead of creating an automation to wake them up from standby
I just added the service to the beginning of my TTS scripts because I ran into an issue where if two went into standby at the same time one would tell me that streaming was happening on another device and it wouldn’t come out of standby. Since none of my TTS generally goes off at the same time this method seems to work better for my case.
b3 please paste your automation code here. I tried what Remco was suggesting but it was not working for me , only one alexa worked.
I have simple water leak sensor and would like to enable “Warning” msg when triggered on all 5 of my alexas around the house. And the warning should be at volume 1.0
Perhaps multiple alexas are not supported.
It would be great if somebody drop working examples into WIKI.
I had to put this in front of all my TTS scripts.
- service: media_player.play_media
data:
entity_id: media_player.living_room_echo
media_content_id: Silence 5 Seconds
media_content_type: AMAZON_MUSIC
- delay: '00:00:03'
- service: media_player.volume_set
data:
entity_id: media_player.living_room_echo
volume_level: 0.5
Like first Service on every single automation alias or somewhere in config.yaml?
Here running HA V.082.0 in Docker running on Ubuntu 18.10 64 bit.
It has been doing well.
Tried another Alexa TTS script called ha-alexa-tts
Works fine except it is a bit of a PITA to copy cookies.
Initially installed via the initial instructions at first post.
I would see the authentication prompt but it never worked.
Today installed options.json
{
"username": "[email protected]",
"password": "mysupersecretamazonpassword",
"url": "https://alexa.amazon.com"
}
Docker install
and adjusted configuration.yaml
downloaded and installed most current alexa.py
restarted HA and see this in the logs
2018-12-15 01:07:16 WARNING (MainThread) [homeassistant.loader] You are using a custom component for media_player.alexa which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-12-15 01:07:16 ERROR (MainThread) [homeassistant.config] Invalid config for [media_player.alexa]: required key not provided @ data['email']. Got None
required key not provided @ data['password']. Got None
required key not provided @ data['url']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/media_player.alexa/
using /opt/alexa-api/data/options.json
points to me fat fingering the installation.
Please help.
All my tts is done in scripts. My automation calls a particular script when triggered. I had to add that to the beginning of all my TTS scripts.
In the DrZzs youtube channel there was questions about what types of services calls are implemented for this Alexa component. I wanted to outline them here for documentation:
MEDIA CONTROL SERVICES
Available services: volume_set
, media_play
, media_pause
, media_next_track
, alexa_tts
, media_previous_track
Service data attribute | Optional | Description |
---|---|---|
entity_id |
yes | Target a specific media player. |
Service media_player.volume_set
Service data attribute | Optional | Description |
---|---|---|
entity_id |
yes | Target a specific media player. |
volume_level |
no | Float for volume level. Range 0…1 |
Service media_player.play_media
Service data attribute | Optional | Description |
---|---|---|
entity_id |
yes | Target a specific media player. |
media_content_id |
no | The song title, artist, playlist, or other text that you would speak to Alexa after specifying the content provider. Example: “Discover Weekly” |
media_content_type |
no | A content provider from the following list: AMAZON_MUSIC, SPOTIFY, PANDORA, TUNEIN, I_HEART_RADIO |
Service media_player.select_source
Service data attribute | Optional | Description |
---|---|---|
entity_id |
yes | Target a specific media player. |
source |
no | Name of the source to switch to. Bluetooth speaker name. |
Service media_player.alexa_tts
Service data attribute | Optional | Description |
---|---|---|
entity_id |
yes | Target a specific media player. Supports home assistant groups. |
message |
no | The message you wish the Alexa to speak. |
Wow!!! 1436 post…can this be condensed, to hard to review all this
extreme condensed version:
read post 1 and post 1436
somewhat condensed version:
read every 10th post
very condensed version:
read every 100th post
in general:
- read post 1
- try it out
- if you got problems or dont understand something read from post 2 untill you find the solution that suites you.
is there anyway to create a music directory locally to recall sounds to be played as media over amazon echo. i have attached my yaml automation that i've been trying but not sure were im going wrong/ if its even possible.
- alias: 'Test notify'
hide_entity: true
trigger:
- platform: state
entity_id: binary_sensor.bathroom_door
to: 'on'
action:
- service: media_player.volume
data:
entity_id: media_player.echo
volume: 1.5
- service: media_player.media_play
data:
entity_id: media_player.echo
media_content_id: http://192.168.1.92:8123/Local/Sounds/Door.mp3
media_content_type: 'audio'
no, local media isnt possible. only through other skills like plex or something like that.
Thank you i will need to do some research into plex then as wont notification sounds