Echo Devices (Alexa) as Media Player - Testers Needed

I have reinstalled alexa_media manually…copying all the raw files. I have reentered configuration.yaml entries (shown in my previous post).

If I hashmark out alexa_media entries in configuration.yaml, I boot normally and can access my rpi using a web browser. When I remove the hashmarks, I then check the configuration and it just loops! This is the same configuration.yaml file I used before I upgraded to .96 and 1.4.1…

If I manually reboot, hass never starts…I can’t get to it via internet and some automations where I use a z-wave switch to activate something don’t work…so it’s not just an internet interface issue. adding the Logging didn’t help…since hassio didn’t start the log files were never created.

I essentially have a pretty vanilla rpi installation. I am running two other custom_components (icloud3 and HACS) and and alexa_media is in the same folder.

Clearly, I need to get to a point where the configuration checker doesn’t just loop.

I am out of ideas.

Ah yes I know about this, I just thought there might be away to disable them all together so they don’t load up in HA at all… you know trying to conserve the Pi3 resources :joy:, maybe in the config I can just specify what switches I want to enable

First thanks for all the great work on this component - makes home assistant work just the way we want with alexa.

I have recently started moving to node red for automation, and for the life of me I cannot call notify shout from node red to get alexa to make announcements. Im 110% certain its my total lack of skill with JSON.

In Home assistant I have these sort of announcements as part of automatons - work very well. (forgive cut n paste errors)

  action:
  - service: notify.shout
    data:
      target:
      - media_player.livingroom
      - media_player.kitchen
      title: Announcement
      data:
        type: announce
        method: all
      message: Dehumidifier needs emptied.

IN node red:

{
    "data": {
        "message": "Test",
        "title": "Test",
        "Method": "all",
        "tyoe": "announce"
    }
}

Just get these “Call-service API error. Error Message: extra keys not allowed @ data[‘entity_id’]”

Would appreciate any help, ive googled myself silly before admitting defeat and asking here :slight_smile:

Many Thanks

Mark

I don’t use Node-Red but I think I see two possible issues:

The “type”: is misspelled (you have “tyoe”: )

and “Method”: shouldn’t be capitalized.

Thanks, I corrected the typos, still get same error. I have had many json attempts - tried all sorts, even blank. Same error thrown from home assistant back to node red. I note that the mentioned error states ‘entity_id’ which is not in my json but i assume from the dialogue box. perhaps there’s some issue with node red ?

Mark

This is my simple ‘Yes’ announcement that works if it helps:

Thanks, using your example got your method and mine to work - called with no erorrs. However alexa isnt saying yes or test… but huge step forward after days at this.

Will continue fiddling :slight_smile:

Mark

1 Like

Yay got it working, faffed about, then took some inspiration from the docs…

{
    "message": "<amazon:effect name='whispered'>I am whispering this.</amazon:effect>",
    "data": {
        "type": "announce",
        "method": "speak"
    },
    "target": [
        "media_player.livingroom",
        "media_player.kitchen"
    ]
}

The above works great for me - the whispering is fun… didnt know alexa could do that.

Thanks everyone for your help.

Stupid json is such a deal breaker for non tech folks. Thankfully community here is great.

Mark

4 Likes

Solution…formatting got me again. I found a missing line end in configuration.yaml which caused the configuration checker to loop.

Problem was not with alexa_media…

Has anyone elses Alexa TTS service dissapeared since upgrading HASS.IO to version 0.97 ?

Yes, Mine quit working with the latest upgrade to 0.97 Even after updating the custom component. Haven;t had time to dig into further though.

Well if you find an answer @toofewacres please let me know, very frustrating

I updated to .96 and alexa_media 1.4.1 and if I play music on my dot, it shows up in the overview, so I know the link is working. But my simple script which used to work, no longer works.

test_script:
  alias: test_alexa_tts
  sequence:
    - service: media_player.volume_set
      entity_id: media_player.my_echo_dot
      data:
        volume_level: '.3'
    - service: media_player.play_media
      data:
        {"entity_id": "media_player.my_echo_dot",
        "media_content_id": "play jazz",
        "media_content_type": "AMAZON_MUSIC"
        }

Is something in the new code broken or was there a change I missed.

Log entries:

> 2019-08-10 10:44:37 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
> Traceback (most recent call last):
>   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 243, in async_update_ha_state
>     "No entity id specified for entity {}".format(self.name)
> homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity my Alexa Apps repeat switch
> ```
1 Like

There was a breaking bug in 0.97 because of a change in the HA API. You need to be running 1.4.0 or greater to fix that bug.

If you’re on HASS, there’s a known issue for custom components where it fails to load alexapy for a couple of restarts. You can also try loading it manually.

“no longer works” isn’t helpful to decide the problem.

Do you mean:

  • Music doesn’t play jazz?
  • Volume doesn’t change to 0.3?
    • Are you sure you were already some other volume? How do you know? If you are already playing, can you hear the volume change?
  • test_script doesn’t run?

One thing always worth doing is testing each of the services independently. Then you can at least isolate the problem.

Yes, there are some known bugs at startup including the one you posted. In fact it’s posted in the thread above:

Played a little with other Amazon effects, and voice change and emphasis do not work.:frowning_face:

Volume change does work…the code to play jazz did work (maybe it shouldn’t have?). I guess it’s time to figure out how to write that section correctly :slight_smile:

Easy to test volume change…change volume to 1 vocally, play something vocally, trigger script…you can hear the change in volume. I hadn’t though to test just that function.

This should do it (I think…):

- service: media_player.play_media
  data:
    entity_id: media_player.my_echo_dot
    media_content_id: "play jazz"
    media_content_type: "AMAZON_MUSIC"
1 Like

This is what I have done. My hassbian system is running on a PI 4. On HA version 0.96.5 I have moved all of my alexia-media in my automations off of media_player.alexa_tts and onto notify.alexa_media and they all work. Next I completed HA update to 0.97.1 and over wrote line 15 of media_player.py to PLATFORM_SCHEMA and the system reboots with no config errors. After the upgrade my automatons no longer report the messages to my echos. I also deleted the .pickle files and logged into Alexa again and nothing changes still no audio on the Echos. Any help would be appreciated. I am about ready to stop updating.

{ "message": "<lang xml:lang='fr-FR'> If my cat was from France, maybe he would speak like this.</lang>  <lang xml:lang='ja-JP'> Japan. Hello I am cat. I am from Japan. Everybody say I <emphasis level='strong'> Fantastic </emphasis> cat. </lang>  <lang xml:lang='it-IT'> Hello I am now Italian cat. <emphasis level='strong'> Fantastic </emphasis> cat </lang>",
    "data": {
        "type": "announce",
        "method": "speak"
    },
    "target": ["media_player.echo_laboratory"]
}

2 Likes

finity . :slight_smile: works perfectly!

2 Likes