❱ Plex Assistant

❱ Plex Assistant


Plex Assistant is a component to allow Google Assistant to cast Plex media to Google devices and Plex clients with a bit of help from IFTTT or DialogFlow. You could use this component with anything that can make a service call to HA as well (see the IFTTT and DialogFlow automations in the readme as a starting point).

Example: "Hey Google, tell Plex to play The Walking Dead on the Downstairs TV."

Visit the readme for more info, config, setup, and availible commands.

Note:

This is just a side project made to fill the absence of native Google Assistant support in Plex and the fact that the Phlex/FlexTV projects aren’t in working order at the moment.

This project is not a priority of mine as Plex could add Google Assistant support or FlexTV may become viable again at any time. That being said, I will try to add features and fix issues until that time. As always, I both welcome and greatly appreciate pull requests.

Thank you for understanding.

Support Development

8 Likes

This is really cool!
It really makes me want to get an Android TV a little more…
I just love my Apple TV too much…

I wish I hadn’t drank the Apple kool-aid back in the day… Sometimes…

1 Like

this is really cool, i really liked the Phlex project, but no one actually knows if its dead or not
Without IFTTT, how does it work? can you also voice control without IFTTT? with google native?

i am asking , cause IFTTT doesnt support all languages , like Dutch for example

IFTTT is required to get this working with the Google Assistant, but only for the trigger phrase. So when saying “Hey Google, tell Plex to play The Walking Dead on the Downstairs TV”, the phrase “tell Plex” is the IFTTT trigger to let it know to send HA the remaining command. That trigger phrase is completely customizable on IFTTT. For this to totally work in other languages though, someone would have to add the translations for it. I’ve set up a guide on how one could do that.

Using the service without IFTTT would be useful for automations, etc.

ok, i can have a look at the translations maybe
but when creating an applet in IFTTT, when choosing google assistant, in that dropdown, its only limited to like 5 languages
Dutch is not present, so will it work if you have a dutch translation ?

Unfortunately, I couldn’t tell you. It depends on if the language support they’re talking about is just for responses, trigger words, or for the entire transcription.

To give you an update on what I’ve found with translations so far:

There is a Swedish translation currently being worked on for this component and Swedish is another unsupported language in IFTTT for Google Assistant applets.

In the small amount of testing I can do, as I can only speak English, I have found that even though I have the IFTTT applet set to English everything seems to work well.

My testing is limited, but I’ve set Google Assistant on my phone to Swedish and entered text instead of using voice commands (as I’m sure it wouldn’t understand my attempts at Swedish). It seems that the command is passed just fine to the component and the components translations are working well.

thats good news, i think if the correct translation is done, that IFTTT can handle it

For anyone wanting to add this to Home Assitant’s conversation integration, here’s an example for your configuration.yaml:

conversation:
  intents:
    PlexAssistant:
     - Tell Plex to {command}
     - Have Plex {command}

intent_script:
  PlexAssistant:
    speech:
      text: Command sent to Plex.
    action:
      service: plex_assistant.command
      data_template:
        command: "{{command}}"

never tried that conversation, is that also you can push to google assistant as a domain? then we dont need IFTTT anymorE?

That won’t add google assistant support. It would just add support for the built in conversation assistant in HA.

IFTTT is the easiest way to get this working in a reasonable way with Google Assistant.

Another way you could do this would be to create a dialogflow action with google (esentially for developers to create google assistant integrations), but it has it’s drawbacks and it’s a pain to set up. Once you do, then you would have to start it by telling Google Assistant “hey google, talk to (name of your action)” then google will reply something about it connecting to a beta/alpha application and then it will ask you for your command.

ah, the “talk to” , no dont wanna go that road, that sux :slight_smile:

1 Like

Agreed, I spent a good bit of time trying to find a way to make the DialogFlow process easier for users. Ultimately, I found it just wasn’t worth the effort especially since it adds annoying steps to the command.

Ok, I think I have some time to play with this component…
This only works with Chromecast? Not with the Plex client itself?
And what about that cast bundle? The one that flextv is using? I used that one before for my older generation Samsung TV, so it was detected as somekind of cast device…

This uses pychromecast to detect google cast devices on your local network to cast to. It doesn’t use the plugin flextv was using.

It looks like the flextv.bundle plugin exposes an API that I could use, so I’ll look into it if pychromecast doesn’t find your samsung TV.

cool, would be great… i hope i can start do testing today or tomorrow :slight_smile:

ok, started the preparation, installed with HACS
added below to config, but upon restart i see this in log :
i also see not services.yaml file in that custom component folder, but instead a services.json file
not sure if its related

2020-03-03 15:08:39 WARNING (MainThread) [homeassistant.helpers.service] Unable to find services.yaml for the plex_assistant integration

plex_assistant:
  url: !secret plex
  token: !secret plex_token
  #default_cast: 'Downstairs TV'
  language: 'en'
  tts_errors: true

EDIT. strange, on github i see a services.yaml file, not sure why HACS created a services.json file
gonna try again

EDIT2 : again a json file created, so i manually renamed to yaml; error in log is gone now…

This is why https://github.com/maykar/plex_assistant/tree/0.0.3/custom_components/plex_assistant

oh , i need to use “master” instead then?
anyway, i am not at home , but tested it anyway trought services (no ifttt yet)
command: play finding dory on samsung tv
i have flex.tv cast bundle installed, i dont know name yet fy samsung tv, i am not home atm
but anyway
i see my google hub turned on, playing “the hunger games” :slight_smile:
hmm :slight_smile: