❱ Plex Assistant

@mayker are you still busy with this project? did you look at the issue i got with the aliasses from this post?

thnx!

Same thing with the latest update, after the command the video starts, then grey screen and the error log says: Error handling Plex 9:06:07 AM – Dialogflow (WARNING)

what is an example of a suitable training phrase for dialogflow for its configuration. The instruction part I’m trying to follow from the github page is this :

Now click "ADD TRAINING PHRASES"
Create a phrase and type in "command"

Is the training phrase the prefix for the wildcard so “tell plex to play command” might be a good phrase here or am I not following along

Addendum: Couldnt get it to work. Google responds with “here is the test version of plex, what is the command” I say play the walking dead and then there is a long pause and finally google responds with “sorry plex isnt responding, please try again soon”

I dont see any errors in the log
Beyond that I also cant even get it to work as a service. I’m getting the cast device not found error also. I have tried the entity id and the name given in the cast integration and neither works for me.

command: Play the walking Dead on the Bedroom Chromecast
command: Play the walking Dead on the media_player.bedroom_chromecast

Answers for the people who are like me and iffy in the networking coding department:

1)So I had to define both the default and aliases options in the plex_assistant config(didnt matter if they were correct or not it seems) to get this to find my chromecast device so at least now I can use the service call in HA

2)The Dialogflow URL for me contained the port which doesnt work with my reverse proxy set up. Upon removal of the port number, google assistant->dialogflow->plex->chromecast device works well. I can request anything from my library through google assistant and it plays on my chromecast device. Im having some weird behavior with defining which media player when using dialogflow. Calling the service play on bedroom chromecast works along with its defined alias but asking google to do it just calls it up on the default player but Thanks for this

Hey fabio did you give up on the flextv addon totally. I saw your handle their when I was researching voice control for plex?

After taking some time to go through the thread and doing a little testing I thought I would mention that I am having some problems with the play and stop commands that you implemented. I have similiar behaviour described further up the thread where plex stops playing the current video and plays what appears to be maybe the first video in my library.

I cloned the latest just yesterday from your github page.
This is what happens:

me:“ok google ask plex to stop playing”
googles response:“what is your command”(think this indicates it isn’t grasping my first statement)
me:“stop playing”
behaviour: stops playing current video and plays the first video (alphabetically?) in my collection

I guess other things I would report is that it works fine with my google nest hub. I have to make the statement all in one go to cast to any specific cast device, like “ok google, ask plex to play the latest rick and morty episode on kitchen display” works fine but doing like this (me)“ok google,talk to plex”…(dialogflow)“what is your command” (me)“play the latest rick and morty episode on kitchen display” this results in the latest episode of rick and morty playing on my living room tv which is the default device I defined in your plex_assistant config

Hey folks, I’m still crazy busy at the moment. Hopefully I’ll have some free time soon, but until then I’ll try to help answer some questions here.

IFTTT is currently the best option for using this component, dialogflow is a crazy beast and there are some major quirks that I may or may not be able to remedy.

The list of commands that can be used with this are at the end of the readme. Adding any extra words or phrases to the commands will confuse it. For example, to get it to stop playing you would say something to the effect of “ok google ask plex to stop” if you say anything beyond that it will get confused. These commands can and will be extended at some point and if you’d like to contribute to them look to the translation portion in the github readme.

FlexTV is currently in a non working state. The developer comments occasionally saying that he doesn’t really have time to work on the project, but will when he can, though it has been broken for quite some time now. His major issues are with Dialogflow, as are mine.

Grey screen background is a bug with plex, one of the libraries I’m using, or how I’ve implemented the play feature. I’ve added a few work arounds for this, but I may need to make them somewhat configurable as some devices treat it differently.

Yeah, i used to test flextv more then a year ago, it was working good though, but I abandoned ifttt, since it still doesn’t use my native language…
This add-on is better

i think some code change is needed, this base_url is deprecated…

examples codes like :
mp3 = hass.config.api.base_url + "/local/plex_assist_tts/error.mp3"

allthough i changed manually to

mp3 = hass.config.api.internal_url + "/local/plex_assist_tts/error.mp3"

but doesnt work :slight_smile:

Oh Phlex is well and truly dead, I was one of his beta testers and he just went AWOL on us all!!

yeah, but he had some bad luck also
and also no one was sponsering him

still waiting for official plex support though

He was getting a fair bit of sponsorship and assistance from the beta testers I assure you lol! He also wasnt the only guy working on it.

Oh, that I didn’t know, I thought he didn’t get a thing, and dropped it… That’s a pitty indeed

Aye to be fair I was kinda hoping the PLEX guys has picked him up, as he was made a ninja pretty quickly after initial release, and even added into the DEV SLACK so was kinda hoping he would be moving to them and doing it under their umbrella, but seems not.

Indeed…

Do you know if plex itself is doing this ? Seems Plex is a reserved name for dialogflow…

They could be i guess, i mean there are already some “google assistant features” i recall being able to voice search using my shield remote and it would open the app to the media, but it never really worked as intended

Last couple of releases added some helpful features. Latest release is 0.1.7

  • Added a companion sensor to show device names. This will also display machine IDs for plex clients that can now be used in aliases.

  • Added the cast_delay option to help with errors resulting in grey screens or “Sorry something went wrong” on Google cast devices.

I’m really hoping somebody can help me with this, its driving me mad. :hot_face:

Problem: Seems all my cast devices aren’t working. The following error is the same no matter what cast alias I use

Log Details (WARNING)
Logger: custom_components.plex_assistant
Source: custom_components/plex_assistant/__init__.py:139 
Integration: Plex Assistant (documentation) 
First occurred: 20:50:49 (1 occurrences) 
Last logged: 20:50:49

Cast device not found: "Plex (Plex For Apple Tv - Office)"

This was working sweetly and I haven’t changed anything with this configuration but obviously added other components.

My configuration:
HA Version 0.111.2
Running in docker (with host option)

The plex sensors are working fine. HA detects new players and also it detects whatever is played on Plex and can be controlled via HA.

My IFTTT integration hasn’t changed either and its obviously hitting the HA server and responds on my google home hub, but nothing plays :confused:

Please, someone save my sanity :rofl:

Whenever you’re having an issue you should always share the component’s config. What version of the component are you using? Have you tried the companion sensor to check that the device is named correctly? What does it report?

The device you are using looks to be a Plex Client. When using the companion sensor it will also give you a machine ID that you can use in your alias configuration. Plex (Plex For Apple TV - Office) doesn’t seem like it would be the actual client name.

1 Like

Awesome! just updated and now I don’t get error:
intent script plex: error executing script. unexpected error for call_service at pos 1: httpconnectionpool(host=‘127.0.0.1’, port=32400): max retries exceeded with url: /player/playback/playmedia?
tried 5 minutes before I updated to the latest files and got the above error
But after update it just works :slight_smile:

1 Like

Thanks for the reply @mayker sorry new to the forum.

I updated to the latest version of the component via HACS yesterday but it wasn’t working before then. This is my config.

plex_assistant:
  url: 'http://192.168.0.205:32400'
  token: 'REDACTED'
  default_cast: Plex (Plex for Apple TV - Office)
  language: 'en'
  tts_errors: true
  aliases:
    Office: 'Plex for Apple TV - Office'
    Laptop: 'Plex (Plex Web - Safari)'
    TV: 'Plex for Samsung — TV QE49Q7FAM'

automation:
  - alias: Plex Assistant Automation
    trigger:
    - event_data:
        action: call_service
      event_type: ifttt_webhook_received
      platform: event
    condition:
      condition: template
      value_template: "{{ trigger.event.data.service == 'plex_assistant.command' }}"
    action:
    - data_template:
        command: "{{ trigger.event.data.command }}"
      service_template: '{{ trigger.event.data.service }}'

Is the companion sensor something that can be added via configuration.yaml or do I need to install another component?