Ok, this is only for linux but my media server is running on my mac.
I'll look into the log files of the plex server i have running on my mac later today, and see if it says the same or not.
Avahi (Linux) copies the functionality of zeroconf (built in to the Mac os).
If the python script is being seen as a server, that means Avahi is working (though there might be some merit to the idea that it’s misconfigured).
Is there any public documentation about the protocol for being seen as a plex player? I’m not an at all sure whether it’s the port it’s on, what Avahi says, or whether it’s something they negotiate after discovery, and these are exactly the answers that are going to help us get forward 
Hi,
I checked my whole config's but i couldn't find anything wrong and can't get it running. But i won't give up, there must be something I missed. Thanks for the help you two already provided :)
**Edit:**
I've installed weezy with the bootloader and not the direct file from raspberrypi.org. I will try to install the other version later.
Okay, I reinstalled my whole raspberry pi with the newest Raspbian wheezy version and installed avahi and all the other stuff but the same result. I don’t know what to do know.
My raspberry pi works as server great (saved it in the ios app) but that’s not what I want 
I just tried with a server on my own mac. And when i look at the log files it shows this:
Oct 30, 2012 19:45:01 [0xb0207000] WARN - Ignoring bogus Bonjour host: 192.168.1.102:3000 (identifier: version: .<br />
Oct 30, 2012 19:45:10 [0xb0bbe000] WARN - Ignoring bogus Bonjour host: 192.168.1.102:3000 (identifier: version: .
it seems the mac version of the server doen't like the host... we need some sort of identifier. Does anyone have a idea how to do this?
– edit
irrelevant post, can’t find the delete button…
Do you think that my raspberry starts as server because my plex media server is running on my mac?
Can you zip and upload your whole plex meda server.log file? It might give some insight on why it's thinking that it's a server. The server on my mac completely ignores it.
Just to do some more testing, do you have the ability to setup a linux server (virtual) and install the plex server on it and see if it recognises the client. It might be a osx issue.
Sure, here is my log:
http://www.malte-heyenga.de/plex-media-server.log.zip
Yeah, I can setup a linux server. I also have a windows system and I also try to install the media server on it.
thanks for the log file, will take a look at it later on.
just a quick hint, you can find pre installed linux distro's for virtualbox here: http://virtualboxes.org/images/
might save you a ton of time ;)
Glad to see that what I cobbled together has inspired some more action.
RE port 80: I picked port 3000 arbitrarily. You could try running things on port 80 (though as a privileged port, you’ll need sudo to do that) and see if it’s just Plex not respecting the 3000 we’re advertising…
There’s no documentation about writing a client or the protocols used. Everything I wrote I basically reversed-engineered; it might be that I am missing something that is meant to be done when advertising a Plex client on the network. I suspect looking at that part of another open source client would prove fruitful.
and here i was thinking that it was a must to run on 3000. Am i correct that only the zeroconf service runs on port 3000 if I run the web.py app on port 80?
Whoop whoop! Now I find my Raspberry as Client. There seems to be a problem between raspberry and a mac media server. I installed the plex media server on my windows and now I find my raspberry. The current problem is, I can’t play a file. I try to fix it but for all, here is the error:
PlayMedia<br />
[u'http://192.168.1.80:32400/library/metadata/1', u'/library/metadata/1', u'+', u' ', u' ']<br />
---<br />
http://192.168.1.80:32400/library/metadata/1<br />
/library/metadata/1<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<MediaContainer size="1" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1347362310" identifier="com.plexapp.plugins.library"><br />
<Video ratingKey="1" key="/library/metadata/1" guid="com.plexapp.agents.imdb://tt0965383?lang=de" type="movie" title="Wildlife" summary="" year="2007" thumb="/library/metadata/1/thumb?t=1351630238" art="/library/metadata/1/art?t=1351630238" duration="30092" addedAt="1351630190" updatedAt="1351630238"><br />
<Media id="1" duration="30092" bitrate="6977" width="1280" height="720" aspectRatio="1.78" audioChannels="2" audioCodec="wmav2" videoCodec="vc1" videoResolution="720" container="asf" videoFrameRate="NTSC"><br />
<Part id="1" key="/library/parts/1/file.wmv" duration="30092" file="C:\Users\boss\Videos\Wildlife.wmv" size="26246026" container="asf"><br />
<Stream id="3" streamType="2" selected="1" codec="wmav2" index="0" channels="2" bitrate="192" language="English" languageCode="eng" bitrateMode="cbr" duration="30092" samplingRate="44100" /><br />
<Stream id="4" streamType="1" codec="vc1" index="1" bitrate="5942" language="English" languageCode="eng" duration="30092" frameRate="29.970" height="720" level="3" profile="advanced" width="1280" /><br />
</Part><br />
</Media><br />
<Genre id="3" tag="Comedy" /><br />
<Director id="1" tag="Tucker Gates" /><br />
<Country id="4" tag="USA" /><br />
<Role id="2" tag="Brooke D'Orsay" role="" /><br />
</Video><br />
</MediaContainer><br />
<br />
/library/parts/1/file.wmv<br />
fullpath http://192.168.1.80:32400/library/metadata/1<br />
mediapath http://192.168.1.80:32400/library/parts/1/file.wmv<br />
Traceback (most recent call last):<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process<br />
return self.handle()<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle<br />
return self._delegate(fn, self.fvars, args)<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate<br />
return handle_class(cls)<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class<br />
return tocall(*args)<br />
File "/home/pi/apps/pyplex/pyplex.py", line 74, in GET<br />
result = getattr(xbmcCmmd, command)(*commandargs)<br />
File "/home/pi/apps/pyplex/pyplex.py", line 96, in PlayMedia<br />
omx = OMXPlayer(mediapath)<br />
File "/home/pi/apps/pyplex/pyomxplayer.py", line 38, in __init__<br />
video_props = self._VIDEOPROP_REXP.match(self._process.readline()).groups()<br />
AttributeError: 'NoneType' object has no attribute 'groups'<br />
<br />
192.168.1.80:50144 - - [30/Oct/2012 20:52:09] "HTTP/1.1 GET /xbmcCmds/xbmcHttp" - 500 Internal Server Error
Thanks all for your perfect help! :)
can you try playing mkv files? I also get this error, but files are still played. It might be codec related, I don't know if the rs-pi supports wmv out of the box.
Ok, tried an avi and it worked but without sound.
With a bit of trial and error I have made the following code change to pyplex.py
<br />
def __init__(self, name, port, stype="_plexclient._tcp",<br />
domain="", host="", text=["machineIdentifier=pi","version=2.0"]):<br />
Not sure what the values should be for the identifier or version but with the change above the bogus error message goes away. My Raspberry Pi now shows up as a client in IOS with a Mac PMS. I have down one video playback test and get picture but no audio. I will look into that tomorrow, just happy to have the client show up in IOS for tonight :)
Hi All!
I can help on the sound issue at least. I'm using hdmi and with omxplayer you have to define '-o hdmi' to output sound over hdmi.
Also spot on guess with 3000 for the port. All my mac plex clients broadcast on tcp-3000 and udp-9777 (xbmc events).
I'm glad to see motion on this. When I first looked it was somewhat stagnant. I ended up trying to make a client with ruby (I've wanted to learn ruby anyway, so it proved fun). Unfortunately, I can't find a good ruby Avahi/dnssd/mdns library for ruby that I can get to run on my raspi.
The code is here if anyone wants to look through it for ideas: https://github.com/pjankovsky/plexpi-lite
The eventual idea was to have a non-lite version that would have a super simple interface. I'm willing to help with the python version since I've hit a wall in ruby.
Keeping this for possible debug later on, but this was an unrelated error. I ran into this previously (with the code from user “area”) but this doesn’t actually seem to be the issue anymore.
Additional note:
For some reason certain files spit out a bunch of junk (warnings and such) when you run omxplayer before it writes out the stats about the video. This causes those files to fail with the following error.
<br />
Traceback (most recent call last):<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process<br />
return self.handle()<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle<br />
return self._delegate(fn, self.fvars, args)<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate<br />
return handle_class(cls)<br />
File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class<br />
return tocall(*args)<br />
File "/home/pi/Apps/pyplex/pyplex.py", line 72, in GET<br />
result = getattr(xbmcCmmd, command)(*commandargs)<br />
File "/home/pi/Apps/pyplex/pyplex.py", line 98, in PlayMedia<br />
omx = OMXPlayer(mediapath, args="-o hdmi")<br />
File "/home/pi/Apps/pyplex/pyomxplayer.py", line 38, in __init__<br />
video_props = self._VIDEOPROP_REXP.match(self._process.readline()).groups()<br />
AttributeError: 'NoneType' object has no attribute 'groups'<br />
Lines 34 - 51 in omxplayer.py are not needed with the current implementation. So if you find yourself getting that error at lot, just comment them out.
**EDIT** : They are needed to update your plex server with how far along you have gotten in the video. Again, if you don't need that / don't want that, comment out lines 100-105 in pyplex.py
This may be just me spewing info out, but I actually did run into a case of the above where the video played fine, but the stats reading failed.
In this case, there is an additional line with aspect ratio information.
<br />
file : http://10.0.89.13:32400/library/parts/2305/file.mkv result 0 format matroska,webm audio streams 2 video streams 1 chapters 0 subtitles 1<br />
Aspect : num 1 den 1 aspect 1.333333 display aspect 1.777778<br />
Video codec omx-h264 width 640 height 480 profile 100 fps 23.976025<br />
Audio codec aac channels 2 samplerate 22050 bitspersample 16<br />
Subtitle count : 1 state off : index 1<br />
This causes a failure 500 message, but the video continues playing.