Sorry, but you are asking a complicated question. You want to run a program from
a web browser in response to a button push.

 

It's clearly doable, since the WRT does it, but I think it uses custom scripts.
REBOL or Apache would depend on which web server is running on your router.

 

The easiest way, is to (on your desktop machine, in forefox or whatever browser)
open http://192.168.1.77:3001 <http://192.168.1.77:3001/>  to see the 1wire
system.

Find the DS2405 in the list, open it, and press and change the PIO check box.

If pressing the "change" button switches the light, copy that "URL" from the
"location bar" and the same for the off URL.

 

Make a local page:

<html>

<head>

<title>Sometimes the light never goes on</title>

</head>

<body>

<center><h1>Presto</h1>

<a href=http://192.168.1.77:3001/on-url>Light ON</a>&nbsp;&nbsp;&nbsp; <a
href=http://192.168.1.77:3001/off-url>Light OFF</a>

,/center>

</body>

</html>

 

Run this file (call it light.html) from your browser (you can open local files
in your browser).

 

Paul Alfille

 

Basically, since you are a hardware engineer, you should understand. OWFS is
like a set of hardware ICs. The connection and final circuit design is up to
you. I know it's frustrating, but it is a new field for you. Persevere.

 

---------- Forwarded message ----------
From: <[EMAIL PROTECTED]>
Date: Sun, Mar 9, 2008 at 3:29 PM
Subject: Simple perl program
To: Paul Alfille <[EMAIL PROTECTED]>


Dear owfs-developers!

As recommended by you, Paul, I googled "cgi shell tutorial" and I found some
things. I get sites with "CGI" with "Rebol" or "Apache" and I wrote a program
like

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";

and put this into the folder "/var" into the NSLU2. Then, I gave it an execute
right and started it from the command shell. I get
"
Content-type: text/html

Hello, World.
"

O.k.Then, I entered the following URL in my web browser
"http://192.168.1.77/var/hello_world.pl";, but of course it did not work. Do I
have to add a port or do I have to save it onto the hard-disc of my computer and
call it remote from the NSLU????

ANYWAY, I'M WILLING TO LEARN AND UNDERSTAND THE SYSTEM, BUT I HAVE ABSOLUTE NO
IDEA ABOUT ANY BASICS OF THIS "CGI" AND I HAVE NO IDEA IF I HAVE TO USE THE
"REBOL" OR THE "APACHE" CODE OR WHATEVER IT IS OR WHATEVER ELSE AND I HAVE
ABSOLUTELY NO IDEA WHERE TO START THE PROGRAM AND WHERE TO SEARCH IN THE
INTERNET FOR IT. AND SINCE THERE IS OBVIOUSLY NO OTHER USER IN THIS WORLD WHO
CAN TELL ME A LITTLE MORE CONCRETE THINGS ABOUT HOW THIS WORKS, THERE ARE TOO
MANY POSSIBLE COMBINATIONS WHERE IS THE ERROR AND WHERE I SHOULD START TRYING.
SO FOR ME, I FIND IT A LITTLE BIT NOT O.K. OF YOU ALL IF EVERYONE SAYS "IT'S
EASY", BUT I GET NO REAL HELP! I WRITE THIS, RISKING THAT I WILL NEVER RECEIVE
ANY ANSWER FROM YOU ALL AGAIN, OR YOU WILL DELETE MY MAIL AT ALL, BUT I CAN LIVE
WITH IT.
I'M RATHER GOOD IN ANALOG CIRCUIT DESIGN AND IT'S THE SAME THING IF ANYONE OF
YOU (LET'S SUPPOSE) WANTS DRIVE A LAMP FROM A LED. THIS HAPPEND IN THE PAST. I
COULD HAVE SAID TO THIS PERSON "IT'S EASY: SIMPLY USE A TRANSISTOR" AND HE
'NEVER' WOULD HAVE BEEN ABLE TO GET A WORKING CIRCUIT, CAUSE THERE ARE MILLIONS
OF TRANSISTORS AVAILABLE AND THERE ARE A HUGE AMOUNT OF COMBINATIONS TO MAKE IT
WRONG. INSTEAD I HAVE DRAWN FOR HIM A LITTLE CIRCUIT WHICH COST ME 15min OF MY
VALUABLE TIME AND HE BUILT IT AND IT WAS WORKING AND HE WAS HAPPY. WITH THIS
BASICS, HE WAS ABLE TO ENLARGE HIS SYSTEM BY HIS OWN.
AS I SAID, I ALSO WANT TO UNDERSTAND THE SYSTEM AND I AM WILLING TO LEARN AND I
DO NOT NEED ANYBODY WHO WRITES THE COMPLETE CODE FOR MY "WATERING PLANT SYSTEM",
BUT A VERY LITTLE CODE EXAMPLE WHICH IS WORKING AND WHERE ANYONE TELLS ME: "PUT
EXACTLY THIS FILE IN THIS FOLDER THERE AND START IT WITH..." WOULD HAVE BEEN
NICE.

Bye,
Bernd2700

 


The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to