Author Topic: savant's ghetto webapp WDTV remote control  (Read 22120 times)

May 18, 2009, 09:42:20 PM
Read 22120 times

savant

  • Full Member

  • Offline
  • ***

  • 105


My WDTV is in a different room as my television. As such, using the regular remote is a giant pain in the ass. Thanks to elmar, I discovered irset (http://wdtv.droopy.sk/irset/), which allows us to control the OSD with the command line by injecting commands into the ir stream.

I hacked together this php page which vaguely simulates the look of the look of the WDTV remote. It was tailored to be usable on the iPhone, but is by no means a pretty looking remote. I'm posting it here in case it might help someone, or might motivate someone to make a much nicer version. All the same, it works fairly well and suits my needs.

Requirements:

ext3-boot firmware. I don't believe irset will work on wdlxtv, but I'd love to be wrong.
Joćo's webserver (http://wiki.wdtv.org/doku.php?id=wdtv_web_interface)
irset (http://wdtv.droopy.sk/irset/)

After booting with the webserver and the irset app on the usb drive, ftp in and copy the remote.php file to a directory within the web root. By default, the web server's htdocs patch is /apps/webserver/www/. It comes with Jaos' web application, so make a directory for the remote control page. Place the index.php in that folder, and then open it in your web browser.


Feel free to use this, and if you try it out will you let me know how it works for you? My ToDo list includes cleaning up the code and making it prettier for general use, and then possibly porting it to Ruby to utilize the iPhone's native interface.

May 18, 2009, 09:55:41 PM
Reply #1

redindian

  • Hero Member

  • Offline
  • *****

  • 643
    • True Font Family - Any font, any website, any browser
Nice. Thanks! Could also be helpful when I want to change the music while I'm behind my PC.

May 18, 2009, 11:02:27 PM
Reply #2

savant

  • Full Member

  • Offline
  • ***

  • 105
Thanks for the feedback!

Now that it works, I'm going to start on getting it to look nice. I'm going to use some proper css and tables and replace the ugly submit buttons with graphic buttons. If anyone has any nice button icon sets I'd love to use some. There's some cool ones on istockphotos, but they don't have a matching "home" button, just the typical vcr/dvd player type buttons.

May 22, 2009, 09:47:21 PM
Reply #3

savant

  • Full Member

  • Offline
  • ***

  • 105
Ok, so it looks a little better now. I have to admit, my webdev foo is quite weak. The icons were hard to find something that had enough of the buttons to even be worth using, but as you can see I duplicated some icons for "back" and "prev", and pplay only has a play arrow.

That said, it works pretty well as an iphone remote, you'd have to mess with it some more to make it look decent in a regular web browser.

To install, same requirements as before, and untar this file in your webroot.


May 22, 2009, 11:06:08 PM
Reply #4

bahoiz

  • Newbie

  • Offline
  • *

  • 26
thank you very much, it is really nice and functional.

May 23, 2009, 05:24:03 AM
Reply #5

dcrutgers

  • Jr. Member

  • Offline
  • **

  • 90

May 23, 2009, 04:41:38 PM
Reply #6

reaverxai

  • Newbie

  • Offline
  • *

  • 26
Works 100% on WDLXTV.

If you don't mind, me and my brother are going to make an ajax based version with a bit of a better interface for the iPhone. I'll post the results.

May 23, 2009, 06:34:39 PM
Reply #7

bobosquishy

  • Full Member

  • Offline
  • ***

  • 202
The more the merrier, I suppose.
I reserve the right to ignore you for any reason.

May 23, 2009, 08:14:31 PM
Reply #8

savant

  • Full Member

  • Offline
  • ***

  • 105
Works 100% on WDLXTV.

If you don't mind, me and my brother are going to make an ajax based version with a bit of a better interface for the iPhone. I'll post the results.

I don't mind at all! Like I said, this was just to fulfill a need I had in the mean time. Web development clearly isn't my forte, so I'm glad if anything I helped kick start a better web app remote.

Some things I'd like to see in future revisions of my remote or any other:

- HTTP UserAgent awareness - a remote will look one way for a full browser, be optimized one way for iphone safari, another for PocketIE, etc.

- A macro to refresh the shares

- IDEALLY I/someone would make a fully web-driven web interface ala XBMC, so you could browse the contents of the WD's shares from the web browser, click the file name, and have the backend generate a macro which would automatically surf the wd to that directory and auto-play it.

- It would be nice to roll all this functionality into Disco's web interface to make for a one-stop, cohesive web application experience, or at the very least a modular framework to pick features ala carte.

Thanks for the feedback, glad it was useful to someone.

May 23, 2009, 11:25:40 PM
Reply #9

redindian

  • Hero Member

  • Offline
  • *****

  • 643
    • True Font Family - Any font, any website, any browser
If you want to create an iPhone like interface you may want to check out these libraries:

Very easy and nice looking: http://code.google.com/p/iui/

Example: http://iui.googlecode.com/svn/tags/REL-current/samples/music.html#_home

Or this one, seems to be a newer one I don't know personally:

http://code.google.com/p/iphone-universal/


June 06, 2009, 11:08:05 AM
Reply #10

elmarweber

  • Hero Member

  • Offline
  • *****

  • 500
    • WDTV Tools
Nice app. A remote alternative is becoming more and more important to me because the Enter button is giving up on my WDTV remote. (WD really screwed up the Remote)

I saw it come up in another thread and because I use it myself I modifed the script to work with eiri, as an alternative to irset.
The modified archive is attached, installation see savant's notes.


I got bored yesterday and started looking into web page development specifically for the iphone. You have a JavaScript API where you can do stuff with the touch events, even gesture recognition (two fingers). A simple test (works only with iphone / ipod touch) is at http://elmarweber.org/test.html. It shows the finger coordinates and detects the current orientation of the device.

So, up/down left/right can be implemented as sliding the finger over the device. Maybe enter as a simply click, back as some gesture where you move your finger backwards on the bottom of the iphone. Forward/Backward when you slide both fingers over the device.

Here is also a list of several libraries / frameworks for iphone web app development: http://stackoverflow.com/questions/215390/available-iphone-web-application-javascript-ui-library-frameworks

ciao,
elm
« Last Edit: June 06, 2009, 11:20:04 AM by elmarweber »

June 07, 2009, 03:46:16 AM
Reply #11

eliafino

  • Full Member

  • Offline
  • ***

  • 101
Hi,
is possible adapt this php for eiri?

Change exec() , value="" and strtoupper() but no work for me...

June 07, 2009, 01:20:05 PM
Reply #12

awx

  • Newbie

  • Offline
  • *

  • 23
hi!
@eliafino:

the commands for eiri are slightly different

POWER, HOME, UP, LEFT, ENTER, RIGHT, DOWN, BACK, STOP, OPTION, REWIND, PLAY, PAUSE, FORWARD, PREVIOUS, NEXT, SEARCH, EJECT

you have to adjust the value attributes in the php file.
works perfect with eiri
greetz

June 07, 2009, 10:39:57 PM
Reply #13

eliafino

  • Full Member

  • Offline
  • ***

  • 101
Hi awk!!!

Yes, I change commands in uppercase for eiri, but not work...
... if I execute exec("/opt/bin/eiric POWER &") work, but exec("/opt/bin/eiric $button &") no reactions.

If for you work, can you post index.php?!? Please  ;)

Regards, Elia

June 08, 2009, 01:36:55 AM
Reply #14

elmarweber

  • Hero Member

  • Offline
  • *****

  • 500
    • WDTV Tools
Hi eliafino,

If for you work, can you post index.php?!? Please  ;)

Regards, Elia

please take a look at http://wdtvforum.com/main/index.php?topic=824.msg7365#msg7365 I posted an attachment that fixes everything for eiri.

ciao,
elm