{"id":17,"date":"2013-01-22T10:35:14","date_gmt":"2013-01-22T10:35:14","guid":{"rendered":"http:\/\/blog.klug.me\/?p=17"},"modified":"2014-05-26T06:42:09","modified_gmt":"2014-05-26T06:42:09","slug":"pupnp-a-php-upnp-media-controller","status":"publish","type":"post","link":"https:\/\/blog.klug.me\/?p=17","title":{"rendered":"pUPnP &#8211; A PHP UPnP media controller"},"content":{"rendered":"<p>At the moment I&#8217;m working on an opensource UPnP client which allows to see media sources and renderer in two columns next to each other and makes it simply to specify which media should be streamed to which device.<\/p>\n<p>The idea was born because I&#8217;ve recognized that I&#8217;ve a few UPnP compatible devices at home and I wanted to be able to control them from my tablet PC.<\/p>\n<p><!--more--><\/p>\n<p>I know there are many UPnP clients for iOS and Android but none of them made me happy.\u00a0In most cases you have to choose source and renderer as first step before you can start to browse your media.<br \/>\nBut I wanted to switch the renderer without navigating to my desired location again.<\/p>\n<p>At the moment I&#8217;ve got following devices:<\/p>\n<ul>\n<li>1 Raspberry PI with <a href=\"http:\/\/www.raspbmc.com\/\" target=\"_blank\">RaspBMC<\/a> plugged to my TV in the (<em>living room<\/em>)<\/li>\n<li>1 Raspberry PI with <a href=\"http:\/\/www.raspbian.org\/\" target=\"_blank\">Raspbian<\/a> as mediarenderer using &#8222;gmediarender&#8220; (b<em>edroom<\/em>)<\/li>\n<li>1 <a href=\"http:\/\/de.hama.com\/00053196\/hama-wireless-lan-internet-radio-ir200\" target=\"_blank\">Hama IR200<\/a> Internet Radio (<em>kitchen<\/em>)<\/li>\n<li>1 <a href=\"http:\/\/pogoplug.com\/de\/devices\" target=\"_blank\">PogoPlug<\/a> as Media Source for XBMC<\/li>\n<\/ul>\n<p>I&#8217;ve manually installed an FTP-Server on my pogoplug to be able to connect XBMC to it &#8211; to lean how to do this you can check out <a title=\"Installing optware on your PogoPlug\" href=\"http:\/\/blog.klug.me\/2013\/01\/22\/installing-optware-on-your-pogoplug\/\">this guide<\/a>.<br \/>\nThe application is hosted at the Raspberry PI in my bedroom.<\/p>\n<p>The backend for pUPnP media controller is written in PHP5 and requires the PHP GD-Library to resize images and Curl to communicate with the devices.<\/p>\n<p>At least PHP5.3 is required regarding to the use of namespaces.<\/p>\n<p>The frontend is plain HTML, CSS and JavaScript.<br \/>\nExternal libraries are <a href=\"http:\/\/jquery.com\/\" target=\"_blank\">jQuery<\/a> for easier handling with JavaScript (Ajax) and <a href=\"http:\/\/lokeshdhakar.com\/projects\/lightbox2\/\" target=\"_blank\">Lightbox2<\/a> for image preview directly in the page.<br \/>\nAdditional I&#8217;ve used some JavaScript functions from\u00a0<a href=\"http:\/\/phpjs.org\/\">http:\/\/phpjs.org\/<\/a>.<\/p>\n<p>There&#8217;s no use for any database because the devices gets identified by the standardized UPnP multicast message.<\/p>\n<p>You can browse the current source code at <a href=\"https:\/\/github.com\/mkweb\/pupnp\/\" target=\"_blank\">Github<\/a>.<\/p>\n<p>Next time I&#8217;ll explain something about the technical arguments and preparations for this project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At the moment I&#8217;m working on an opensource UPnP client which allows to see media sources and renderer in two columns next to each other and makes it simply to specify which media should be streamed to which device. The idea was born because I&#8217;ve recognized that I&#8217;ve a few UPnP compatible devices at home [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-php","category-upnp"],"_links":{"self":[{"href":"https:\/\/blog.klug.me\/index.php?rest_route=\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.klug.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.klug.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.klug.me\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.klug.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17"}],"version-history":[{"count":13,"href":"https:\/\/blog.klug.me\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":106,"href":"https:\/\/blog.klug.me\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions\/106"}],"wp:attachment":[{"href":"https:\/\/blog.klug.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.klug.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.klug.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}