My latest software: PSP Remote Controller Deamon
Thursday, November 23rd, 2006I had this problem of not being able to control my favourite (and you know to my surprise that application actually uses my BarMenu Components Delphi package for it’s menus and popup menus, so even more reason to be my favourite!) video player KMPlayer from the other room we have the TV for watching videos. That constant running between rooms was killing. I had then the idea using my PlayStation Portable as remote controller. It took a moment of thinking that I could harness the webbrowser into use through my WLAN. I couldn’t find any software already doing it, so I decided to create my own small program.
I did some more research to find what the PSP browser is capable of and ways how I could control KMPlayer. What I learned is that there’s no way to get AJAX working in PSP browser, but Flash could work. But for now I settled with invisible frame for GET url requests from the main frame links. That way the main UI would not refresh and links would be “executed” in the invisible frame. I needed small webserver for this purpose and it felt too much trouble to setup apache or something else bigger. So I went for creating own webserver with Delphi’s Indy components. After hour or so I had working webserver which could serve html, images and stylesheets from a docroot directory as any webserver would do. That was all I need to serve nice webbrowser UI for my PSP. Some tweaking was done for port configuration and adding a bit more security for the webserver so we don’t have backdoors.
Now next part was figuring out the interface to KMPlayer. Researching did pay off and I found out that (Win)LIRC protocol was rather simple and KMPlayer supports it out of the box. Creating own LIRC server was done in matter of minutes. Nothing more than simple TCP port listening for clients and sending oneliner text strings as command execution. That server was built into the same application as the webserver. That way I had direct link from the webserver to the LIRC server. I implemented virtual URLs for the webserver in form of /command/command_name_here. Any command executed that way would be directly sent to the clients in the LIRC server. Instantly I had as many remote controller “buttons” I needed.
That app was built as standard Windows Service, so it works completely in background and I created installer to easily install and uninstall it. I forgot to take some pictures of the UI in the PSP screen, but I do that later. The default UI in this version contains only Play/Pause and four seek buttons. But I’ll let you to customize it for your own needs. After all it’s just plain html you need to create and all the commands are automatically available for assignment in your LIRC compatible applications. Or why not create full screen Flash app to call these command urls?
So short, my life got much easier now. I just use my PSP from the other room to control KMPlayer!
No need to worry about walls what would be problem with standard IR controllers. Maybe some of you find this application useful as well. Let me know…
Download: PSP Remote Controller Daemon 1.0.0
Good source of PSP Webbrowser capabilities: http://www.brothercake.com/site/resources/reference/psp/
