Plex Thing not being recognized - but log says it is connecting

So the plex items work on my sitemap now, for the most part.

For example the title shows up correctly.

However, actions do not work. For example play/pause.

In the log I receive this error:

2018-03-19 01:08:46.951 [DEBUG] [.binding.plex.internal.PlexConnector] - Cannot send command, host is unknown for machine ID XYZ

However that machine ID is obviously working for receiving the title?

Any idea whats going on here?

Can I see you plex.cfg and your item files, please?

Yeah no problem, here’s the plex.items content:

Switch PlexTVPower              "Power"         <video>         {plex="[playerID]#power"}
String PlexTVStatus             "Status [%s]"   <video>         {plex="[playerID]#state"}
String PlexTVTitle              "Title [%s]"    <video>         {plex="[playerID]#title"}
String PlexTVType               "Type [%s]"             <video>         {plex="[playerID]#type"}
String PlexTVCover              "Cover"                 <video>         {plex="[playerID]#playback/cover"}

Dimmer PlexTVProgress   "Progress [%.1f%%]"    <video>    {plex="[playerID]#playback/progress"}
DateTime PlexTVEndTime  "End time [%1$tR]"     <video>    {plex="[playerID]#playback/endTime"}

Dimmer PlexTVVolume             "Volume"                <video>         {plex="[playerID]#playback/volume"}
Switch PlexTVPause              "Pause"                 <video>         {plex="[playerID]#playback/pause"}
Switch PlexTVPlay               "Play"                  <video>         {plex="[playerID]#playback/play"}
Switch PlexTVPlayPause  "PlayPause"             <video>         {plex="[playerID]#playback/playpause"}
Switch PlexTVStop               "Stop"                  <video>         {plex="[playerID]#playback/stop"

And here’s the plex.cfg:

# IP address or hostname of the Plex server
host=abc.xyz

# Optional, port that the Plex server is running on. Default = 32400
port=32400

# Refresh interval in ms. Default = 5000.
#refresh=5000

# If you're using Plex Home you need to supply the username and password of your
# Plex account here. If you don't want to enter your credentials you can also
# directly set your account token below instead.
#username=Plex username

 # Plex password
#password=Plex password

# Plex account token, use instead of username/password when using Plex Home.
token=123token456

What is the host name on the Plex server?

The hostname is the URL of the plex server (i.e. “myplexserver.com”)

Machine ID XYZ
Is that the actual log?

lol no

I kind of need real info there to be able to debug

No offense, but I’m a bit suspicious providing anymore real info since you theoretically may still have my old password and any other info I had accidentally pasted in.

The full line looks like this:


2018-03-19 01:08:46.951 [DEBUG] [.binding.plex.internal.PlexConnector] - Cannot send command, host is unknown for machine ID jtfkx1xaaabbbbcccccyrer2v

Ok, I don’t use the binding but I am trying to help
After reading the binding docs
You got the Machine ID. Is that the same as the [playerID] in the items?

Appreciate the help!

The binding refers to it as Machine ID in the logs, but according to plex it is known as the clientIdentifier. Let me check the items, 1 sec. It should be…

EDIT: Yup, the items are identified as such:

Switch PlexTVPower              "Power"         <video>         {plex="jtfkx1xyaaaaazyrer2v#power"}

It’s basically 1:1 out of the docs…

It looks like there is nothing wrong with your set-up
Someone ran into this problem before.
And it looks like it was resolved:

Good luck

Thanks for the help and link! I’ll give it a try.

The only other thing I can suggest is to restart from scracth:

  • Remove the binding
  • Reboot
  • Install the binding
  • Obtain a new machine ID

If it doesn’t work, have a look on github if there is an issue raised for this problem and if not raise one.

Okay, good to know theres nothing wrong with the config at least.

I’ll experiment when I get home from work later today with other clientIDs and what not (android phone, web client, etc.)

If may help,
I noticed that the plex command is not working on some players (i.e. my Samsung Tv app) while is working for example on the browser.

I suppose not all features are available on all players and that does not depend from the Plex machine but from the players itself (app/browser/etc. etc)

yeah that makes sense. The player I was trying to get to work above though was a browser client, so I figured that must have at least worked…

It does READ info (i.e. Title, Artist, etc.) just cannot send any commands (pause, play, volume, etc.).

Very strange…

This is exacltly what happen on my samsung tv app but If I remeber well it worked on the browser … tonight I will test again at home and let you know the result.

So I’m doing some testing and neither my web client "clientIdentifier"s nor either of my android plex clients work.

Always “host is unknown for machine ID xyz”.

So strange because on all clients I was able to READ whats playing, the volume, etc. but not PUT any data.

I tried adding my plex.direct server URL to my host file as mentioned in the linked thread, to no avail. Maybe I did it wrong, is this the correct way to add a custom host to /etc/hosts? :

185.123.456.210 plex.direct

Or do I need to add the full 185-123-456-210.aa9aaasdfhgdfg33333388ad8061.plex.direct address?

EDIT: Also I run my own DNS Server here at home via my RaspPi - pihole - I thought maybe that was messing up the dns query for the above server url, so I reverted to Google’s DNS (8.8.8.8), but that didn’t work either :confused:

UPDATE:

Out of my pi-hole DNS logs:

Mar 21 21:23:01 dnsmasq[23806]: 883 127.0.0.1/34136 query[A] 185-123-456-210.aa9aaf2aa4fe454faa65ada588ad8061.plex.direct from 127.0.0.1
Mar 21 21:23:01 dnsmasq[23806]: 883 127.0.0.1/34136 forwarded 185-123-456-210.aa9aafddddddddddddfaa65ada588ad8061.plex.direct to 208.67.220.220
Mar 21 21:23:01 dnsmasq[23806]: 884 127.0.0.1/34136 query[AAAA] 185-123-456-210.aa9aafddddddddddddfaa65ada588ad8061.plex.direct from 127.0.0.1
Mar 21 21:23:01 dnsmasq[23806]: 884 127.0.0.1/34136 forwarded 185-123-456-210.aa9aafddddddddddddfaa65ada588ad8061.plex.direct to 208.67.220.220
Mar 21 21:23:01 dnsmasq[23806]: 883 127.0.0.1/34136 reply 185-123-456-210.aa9aafddddddddddddfaa65ada588ad8061.plex.direct is 185.123.456.210
Mar 21 21:23:01 dnsmasq[23806]: 884 127.0.0.1/34136 reply 185-123-456-210.aa9aafddddddddddddfaa65ada588ad8061.plex.direct is NODATA-IPv6

So in short, it doesn’t know where to forward that address itself, it looks to OpenDNS (208.67.220.220) which I have setup as my “fall-back” DNS provider on there. Both on IP4 ([A]) as well as IPV6 ([AAAA]).

It doesnt get an answer for V6, but for V4 it gets the correct IP. So it shouldddd be able to find my host!

Grrr…