Hack43.Use Your PSP to Control Your Home


Hack 43. Use Your PSP to Control Your Home

Are you one of the lucky few living in the world of tomorrow with an entire home network that actually networks control of your home? If so, wouldn't it be nice to control your home wirelessly with your PSP? Read on to find out how.

When the Wipeout Pure browser hack [Hack #41] came out, I saw someone controlling his Xbox Media Center from his PSP browser. It's great that you can control XBMC from your PSP, but what if your Xbox isn't on, and your TV isn't on, and your TV is not on the right input? You still have to get up or find the remote and adjust all of that.

I've come up with my own solution.

This hack first appeared on LiquidIce's PSP Hacks and quickly spread around to various web sites (go to http://psphacks.blogspot.com/2005/04/psp-home-control-10.html).


5.4.1. Setting up the DNS Hack

The first step was to be able to redirect the Wipeout Pure browser to any URL I wanted. To do that, I turned to MooPS (http://www.layouts.xbox-scene.com/main/filemanager/index.php?action=downloadfile&filename=SetupMooPS_1.0.1.rar&directory=Software&), which is a DNS/web server that you run on your Windows computer (see Figures 5-19 and 5-20). It automatically forwards requests for http://ingame.scea.com to the URL of your choice. For another way to set this up, see "Find Yourself a PSP Web Browser" [Hack #41].

If you have Version 2.0 of the firmware, you can simply navigate to the page you create rather than bothering with this redirect, which is only necessary due to the limitations of the Wipeout Pure browser.


Figure 5-19. MooPS


5.4.2. Controlling A/V Equipment

By using a controller device called the WACI NX (http://www.waciworld.com/), you could turn on the TV, turn on the Xbox, switch to the correct input on the TV, and send the Play command to XBMC, all in one button press on your PSP (see Figure 5-21).

So far, I have the ability to turn my lights on and off, and I have full control (play, stop, pause, and menu) of my DVD player, TiVo, and high-definition TV, all wirelessly from my PSP. I can also send commands to my pre-2.0 PC running Winamp to tell it to play, stop, and pause my music, or even browse my playlists.

To do most of the controlling, I used this tiny web-server control box called the WACI NX. It's great because it has an HTTP and FTP server and uses regular HTML to issue the commands, making it the perfect match for my pre-2.0 PSP, which does not support any fancy JavaScript or DHTML. The PSP talks to the WACI NX via WiFi through the network. In turn, the WACI emits the IR signal to the TV through one of my IR emitters, just as though I had pressed the button on the remote.

Figure 5-20. MooPS Server Settings


Figure 5-21. WACI NX


The WACI NX has a built-in IR Learner, so you can grab all of your remotes, learn all the button commands, and save them in the WACI to be played back and emitted later. You could even do macros so it sends out a sequence of button presses with a specified delay between each button press.

The pages it hosts are constructed using layers and <div> tags. I put an image map on the graphics and created some HTML pages with special links, which are crafted so that when the PSP highlights and clicks on a spot on the image map, it instructs the WACI NX server to send an IR signal to my A/V equipment or triggers its relays to cut power on the lights.

The actual links are name value pairs going to a script I made on the WACI NX.

 http://192.168.1.102/rpcpost. asp?method=IRSend&Param1=1&Param2=DVD&Param3=Play 

That script is written to execute the IR Send and then redirect back to the referring page. To change which command I run, I just change the URL string in my link.

I'm sure that if you rigged something up, you could do something similar with special software that runs on your PC. However, by using the WACI, I have a dedicated piece of hardware whose only function is to send commands to my stuff, no matter which interface I create to control it. Unlike Sony, which hides its protocols, the WACI NX has an open protocol that you can access from just about any web programming language. I can program using Flash, ASP, HTML, JavaScript, C#, C++, and Java. It's great for developers, and fairly simple to get started using the provided sample code. For more info on the WACI NX, you could check out WACI World (http://www.waciworld.com/).

5.4.3. Controlling Winamp

Another web server you could set up is a plug-in for Winamp called BrowseAmp (http://www.browseamp.com/). This program will set up a mini web server that uses the same kind of special URLs to send commands to the Winamp player running on your computer. I've put together a skin that looks good on the PSP screen. You can find it posted on my site (http://psphacks.blogspot.com).

I have a lot more ideas on how to improve this system. Right now, navigation is clunky because every button press causes the page to refresh. This is the same reason why PSP IRC (http://pspirc.com/) keeps refreshing the entire screen. I want to explore sending the commands to the WACI using an IFrame or XMLHTTPRequest object, but as far as I know, these basic HTML features are not implemented in the Wipeout Pure browser.

LiquidIce




PSP Hacks
PSP Hacks: Tips & Tools for Your Mobile Gaming and Entertainment Handheld
ISBN: 0596101430
EAN: 2147483647
Year: 2006
Pages: 108

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net