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.
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
Please, someone save my sanity
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.
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
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?
Info on the companion sensor is here.
If you’re on the latest version it’s already installed, you just need to add - platform: plex_assistant
to your sensor config in configuration.yaml and restart. It will show up as sensor.plex_assistant
.
sensor:
- platform: plex_assistant
added presume it can co-exist with other sensors above it? Also, where will it give me the MACHINE ID … in the logs?
It can co-exist with other sensors, yes. To check states of sensors in HA go to your sidebar and then Developer Tools > States
and find sensor.plex_assistant
. After you get the info you need from it I suggest removing the sensor to cut down on API calls. The sensor updates every minute, be sure to have the plex app open on the device so that it is found.
Thanks again @mayker
Connected Devices:
Cast Devices: None
Plex Clients: None
friendly_name: Plex Assistant Devices
Plex was open on the Apple TV. Not what I was expecting. Spent hours on this, now Im totally lost
Any errors in your logs? Are you able to connect to plex by visiting the following URL in your browser and replacing MYTOKEN with your token?
http://192.168.0.205:32400/clients?X-Plex-Token=MYTOKEN
I get some XML back hitting the local plex server with some machine identifiers. Incidentally I tried the ID to cast to for the Apple TV, no joy.
Nothing in the logs pal. Are there any debug logger entries I can add for the component?
No debug info that’s going to help your particular situation unfortunately. Can you reduce your config to just the bare necessities for the moment and do some testing.
plex_assistant:
url: 'http://192.168.0.205:32400'
token: 'REDACTED'
tts_errors: true
Check if that fixes the sensor for you and also try out some of those machine IDs you just found using HA’s services tool. It can be found in the same place as states, just hit services. Search for plex assistant and you’ll be able to make calls there. Something simple like:
command: play NAME-OF-A-SHOW on the MACHINE-ID
No joy @mayker using the skeleton config you suggested. The sensor still doesnt detect any clients or cast devices.
Do you have any other ideas? Do you think it would be worth uninstalling and manually cleaning up the config and re-doing this? Like I said this was working without any problems for weeks.
Without any errors in the logs other than “Cast Device not found”, I don’t have much to go on unfortunately.
Do you think totally removing everything and installing the component again would make a difference @mayker … or would I be wasting my time ?