Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announce notify feature doesn't work #114

Closed
h4nc opened this issue Mar 12, 2019 · 8 comments · Fixed by #120
Closed

Announce notify feature doesn't work #114

h4nc opened this issue Mar 12, 2019 · 8 comments · Fixed by #120

Comments

@h4nc
Copy link

h4nc commented Mar 12, 2019

The new notify tts feature doesn’t work for me.

I tried it in the dev tools and as a script. I also added notify to my config and notify.alexa_media shows up in the services.

My script looks like this:

test_tts:
  sequence:
    - service: notify.alexa_media
      data:
        target: media_player.myechodevice
        message: "Test"
        data:
          type: tts

It doesn’t work in both cases devtool or script. Of course I used this format in the dev tools:

{
"message":"test",
"data":{"type":"tts"},
"target":["group.alexa", "Guest Room", "media_player.kitchen", "serialNumber"]
}

I don’t get an errror.

This is what I get in the logs when I trigger the script above:

2019-03-12 18:40:34 INFO (SyncWorker_15) [custom_components.alexa_media.notify] Message: Test, kwargs: {'target': ['media_player.echo_dot_1'], 'data': OrderedDict([('type', 'tts')])}
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: media_player.echo_dot_1 against (Echo Dot 2, ***, media_player.echo_dot_2)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: media_player.echo_dot_1
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: media_player.echo_dot_1 against (Echo Dot 3, ***, media_player.echo_dot_3)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: media_player.echo_dot_1
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: media_player.echo_dot_1 against (Echo Dot 1, ***, media_player.echo_dot_1)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Converting: media_player.echo_dot_1 to (entities): <Entity Echo Dot 1: standby>
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: media_player.echo_dot_1 against (This Device, ***, media_player.this_device)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: media_player.echo_dot_1
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: <Entity Echo Dot 1: standby> against (Echo Dot 2, ***, media_player.echo_dot_2)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: <Entity Echo Dot 1: standby>
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: <Entity Echo Dot 1: standby> against (Echo Dot 3, ***, media_player.echo_dot_3)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: <Entity Echo Dot 1: standby>
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: <Entity Echo Dot 1: standby> against (Echo Dot 1, ***, media_player.echo_dot_1)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: <Entity Echo Dot 1: standby>
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Testing item: <Entity Echo Dot 1: standby> against (This Device, ***, media_player.this_device)
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] Filtering out: <Entity Echo Dot 1: standby>
2019-03-12 18:40:34 DEBUG (SyncWorker_15) [custom_components.alexa_media.notify] TTS entities: []
@h4nc
Copy link
Author

h4nc commented Mar 12, 2019

I solved it. I did this:

  • delete the alexa_media folder in custom_comp..
  • commented out notify and alexa_media in my config
  • restart ha
  • download newest version from github and copied the files to custom_comp folder
  • commented in notify and alexa_media in my config

I want to note that i uses custom updater to update from 1.1.0 too 1.2.0. So maybe the issue came from that update, so I will leave that open for @alandtse to see this.

I looked in the logs again and now TTS entities: [] is not empty any more. It is filled with the entity name of the last called device as expected.

@juan11perez
Copy link

this works

test_tts:
  sequence:
    - service: notify.alexa_media
      data:
        target: media_player.myechodevice
        message: "Test"
        data:
          type: tts

but this (announce) doesnt

test_tts:
  sequence:
    - service: notify.alexa_media
      data:
        target: media_player.myechodevice
        message: "Test"
        data:
          type: announce
          method: all

@h4nc
Copy link
Author

h4nc commented Mar 12, 2019

I don’t know why it doesn’t work for you but I can tell you that I have the second example running on my ha and it works.

@juan11perez
Copy link

tts works, but announce doesn't.
Your example is with tts

@alandtse
Copy link
Owner

@h4nc There was a small period of time where I had a bad copy of notify.py in the repo which would've resulted in the TTS entities: [] issue. I had assumed no one downloaded it since it was like only 20 minutes as I finalized the release. Your redownload probably got the correct version.

@juan11perez Please try replacing the notify.py. The way you can tell if you have the bad version is if this line is missing alexa by itself.

Good version:

                if item in (alexa, alexa.name, alexa.unique_id,
                            alexa.entity_id):

Bad version:

                if item in (alexa.name, alexa.unique_id, alexa.entity_id):

If it still doesn't work, I'll need some debugging info for custom_components.alexa_media.notify to understand why it's breaking for you.

@alandtse
Copy link
Owner

Note, I figured out the issue for Announce. Working on a fix.

@alandtse alandtse changed the title new notify feature doesn't work Announce notify feature doesn't work Mar 13, 2019
@h4nc
Copy link
Author

h4nc commented Mar 13, 2019

@juan11perez i meant your second example, announce works for me. Tested it.

@krissen
Copy link

krissen commented Aug 9, 2019

(Apologies if double-posting. I thought I just wrote this as a reply to [this or another] issue, but now I can't find it anywhere.)

Experiencing the same issues as reported by @juan11perez above.

That is, type: announce stopped working, but type: tts does work.

Works:

{ "message": "test", "data": { "type": "tts", "method": "all" }, "target": "Sonos One" }

Does not work:

{ "message": "test", "data": { "type": "announce", "method": "all" }, "target": "Sonos One" }

Communication is enabled on the Alexa device(s).

Was working on alexa_media 1.3.*. Stopped working when I upgraded to 1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants