PDA

View Full Version : Lets add even more functionality to Girder



Ron
October 13th, 2002, 12:55 PM
I like the idea, it actually was suggested some time ago. But in a little different form.

He suggested to make a simple http server. I've done this in a separate project before so that isn't to hard to do. This also has the advantage of being able to run non-local and OS-independent.

The only problems is and will be until at least december, I have just not enough time.

-Ron

Ron
October 13th, 2002, 12:55 PM
I think you can make PHP create TCP/IP connections. Thus interacting with the
TCP/IP server.

Darmok
October 13th, 2002, 12:55 PM
Girder started out as a great product and has continued to evolve into the best control software available. It has almost everything I can think of wanting, but one feature I have been hoping for that has yet to evolve is an easy way of sending commands to girder from a web page. Using Active Desktop in windows and having a web page as a menu system for launching apps would be perfect for a HTPC menu. Then we'd have all the flexibility of HTML and Java to design menu's and the power of girder to launch and control our apps. It might be possible to use an activeX contol to send commands to Girder, but I don't know much about ActiveX contols and what is invlved in implementing the capablity into a program. Also it would be great to see CM11A X10 support built directly into Girder, for both sending and receiving X10 commands. I can just imagine using a motion sensor X10 device to trigger girder.

Mark F
October 13th, 2002, 12:55 PM
jzink - That link doesn't work. Do you still have this visible to the world? Thanks.

bhoule
October 13th, 2002, 12:55 PM
Here is a project I would like to use with Girder: http://etc.sourceforge.net/

Basically, you use a touchscreen computer that interacts with a web server using php. The coordinates of the touch are part of the URL, so for example a touch on the lower right corner of the touch screen fetches this URL: http://192.168.1.254/touchscreen/touch.php?x=63&y=0 (don't bother clicking on this URL, it won't actually work)

I want to know if we ever get a web server as a part of Girder if we could use it in a way such as this.

<font size=-1>[ This Message was edited by: bhoule on 2001-10-25 00:47 ]</font>

bhoule
October 13th, 2002, 12:55 PM
The best reason for having a web server in girder would be so that people can use any browser on any platform (windows, linux, 3com audrey, epod) and have a graphical way to control the computer. Instead of writing programs to run on these machines, one just builds web pages and puts them on the server.

In my particular case, the web server serves
four purposes:

1)Serving the executable for the client to download and run. This is important because the Citadel touchscreens use flash rom and otherwise we would have to flash the rom every time there was a change to the program.

2)Receiving php requests (the x and y coordinates) to know where the user clicked.

3)Generating an image (via php) to display on the client.

4)Sending TCP/IP commands (via php) to Girder.

If we got an http server in Girder, I wouldn't need to run apache and I'd be able to simplfy things by not having to forward the commands to girder. I'd imagine that the php script could generate the image to display on the client and could tell girder which command to process.

All of this is still in the planning phase for me because I've been holding off until I could get girder to do everything.

bhoule
October 13th, 2002, 12:55 PM
Jay, that looks perfect! If you were able to get that together, I would be so happy!

jzink
October 13th, 2002, 12:55 PM
I have done this very thing using the TCP/IP pluggin. I have a HTML page that I run on my active desktop that has some simple code in it that listens to my TiVo remote, and I designed the interface to work just like TiVo for ease of use, girlfriend factor, and such :wink: I have all the 'hard' stuff done, I'm just waiting on some free time to do the easy stuff, like mapping to dScaler and WinDVD.

I'll post it up on my site tonight and you can take a look. If you understand just a little about HTML and JScript you can set it up real easily.

Look for it sometime tomorrow AM at: http://www.zink.ws/girder

Hope that helps you along!
J

jzink
October 13th, 2002, 12:55 PM
Ack! Sorry bout that everyone. Directory browsing is apparently only on for the owner of the site! Well, guess thats what I get for not hosting my own...

Anyway, give this URL a try. I've updateded the interface to integrate MSNs Instant Messenger.

WARNING! The code is a real mess at this point. I never really planned on having sub-menus, and right now they're thouroughly hacked in. This really bastardized the code, but the girder IP stuff is still pretty clean.

Here's a tip on getting around the obnoxious security warning:
>Set up a share to the directory with the files in it.

>In IE, go to tools/internet options/[security]
>Choose 'Trusted Sites'
>Add your share (remember to uncheck 'Require Server Verification...')

This will allow the activeX control to access 'unsafe' content without a warning.

Anyway, heres the correct link:

http://www.zink.ws/girder/htpcinterface.zip

Enjoy!

<EDIT> you will need to install the latest Windows Scripting Host (5.6) found here: http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/001/732/msdncompositedoc.xml&frame=true

<font size=-1>[ This Message was edited by: jzink on 2001-10-30 16:34 ]</font>

JayGuerette
October 13th, 2002, 12:55 PM
Note: 192.168.1.254 is a non-routable IP, so we'll NEVER be able to see it unless he makes it available at a public IP.

JayGuerette
October 13th, 2002, 12:55 PM
Also...

I have evaluated expanding the TCP/IP server to handle HTTP requests; it's not a big deal.... the question is:

What do you expect the HTTP server to do?

JayGuerette
October 13th, 2002, 12:55 PM
Okay, so we have:

1. HTTP file handling, sending the file requested.
2. CGI implementation, so user can have perl, php, eic, etc for dynamic content
3. Built-in Girder interfaces: "/?command=triggerstring"

And maybe some authentication stuff thrown in?

JayGuerette
October 13th, 2002, 12:55 PM
On paper, the idea looks great, but in practice it raises a huge concern over security. The idea of writing an httpd specifically for girder opens up the possibility that a bug in it allows a malformed http request to send arbitary girder commands, and that doesn't give me a warm fuzzy feeling.


Anybody who opens such a thing to the public internet deserves... well what can I say? I agree that there are security concerns, but the possibility of a system compromise seems incredibly remote. Paswwords and ACLs should suffice.



In addition, writing an httpd from scratch is going to be a lot of work - before adding in support for php and perl.


Not at all, it's incredibly easy. Adding support for external command processors is a minor CGI implementation.



I would love to see this functionality implemented, but I'd suggest letting apache do the hard work of serving generic html/perl/php, and writing a php and perl module to allow better integration to a small girder 'daemon' with a well-defined interface.


Which is fine for those of us who have a unix box; but ignores the rest of the world. I could almost argue that if you are savvy enough to put PHP on your box, then you could certain install Xitami or some other windows httpd.



I would suggest keeping the interface fairly simple - get or set girder registers (including command states), get a list of defined commands, and call a defined command.
I think that this approach will take less effort, will be very flexible, and maintain a reasonable level of security (only commands that are predefined in girder can be called).


Less effort? Only slightly. The only thing different from the TCP/IP server would be the CGI bit, which is fairly easy to secure.

I understand the concern, but you must also understand that dumb http servers that only do a few things are substantially harder to break than something like IIS. I feel confident in our ability to deliver a solid server.

I also think that with all the Internet goodies available today: instant messaging, file sharing, web/ftp servers, etc... the average user is vastly more likely to be back-doored by these things than some incredibly obscure daemon, open to port 80, that almost no one could possibly guess what could be listening on the other end, never mind figure out how to exploit it.

genixia
October 13th, 2002, 12:55 PM
Ok, I have to chime in here..

On paper, the idea looks great, but in practice it raises a huge concern over security. The idea of writing an httpd specifically for girder opens up the possibility that a bug in it allows a malformed http request to send arbitary girder commands, and that doesn't give me a warm fuzzy feeling.

In addition, writing an httpd from scratch is going to be a lot of work - before adding in support for php and perl.

I would love to see this functionality implemented, but I'd suggest letting apache do the hard work of serving generic html/perl/php, and writing a php and perl module to allow better integration to a small girder 'daemon' with a well-defined interface.
I would suggest keeping the interface fairly simple - get or set girder registers (including command states), get a list of defined commands, and call a defined command.

I think that this approach will take less effort, will be very flexible, and maintain a reasonable level of security (only commands that are predefined in girder can be called).

I know that the average girder user is a rocket scientist and probably firewalls their home networks, but we should at least make the effort to make it harder for the not-so-average girder user to get their box 0wn3d by l33t hax0r5.

Dada
October 13th, 2002, 12:55 PM
hi there,

though i'm not a crack in PHP, Web Server or whatever programming, i would like to use an active desktop to set up a menu for controlling the features of my HTPC. The best thing would be to have the naviagtion button like left/right to find your way through the buttons. Therefor u need to give a button different commands depending on which level you are in the menu. I thougt about usind the TAB and STRG-TAB - Buttons to navigate. I guess this would work, but i don't think there is something like a "keyboard-over"feature in HTML (just like mouse-over). So you can't integrate nice graphics when a selection is active.

Hope my concern is not too hard to understand :smile: Do you have solutions ?

Greetz,
Dada