ExampleHomeAlarmSystem
De DigiWiki.
(Page créée avec « The code is licensed under LGPL: that is, you can use it for any purpose, but you should acknowledge the author in the sources. Comments: ruben@rubenkleiman.com This code t… ») |
|||
| Ligne 36 : | Ligne 36 : | ||
Follow these steps in order: | Follow these steps in order: | ||
| - | 1 | + | 1 Copy the contents of the following LSL script to an object located in your property: |
http://home.earthlink.net/~kleiman/examples/home_alarm04_script.txt | http://home.earthlink.net/~kleiman/examples/home_alarm04_script.txt | ||
| - | 2 | + | 2 Enable the script by touching the object (follow object's instructions); disable it by touching it again. |
The alarm object in SL should acknowledge that it started (chat message). | The alarm object in SL should acknowledge that it started (chat message). | ||
| - | 3 | + | 3 When the alarm starts, you will get a chat message with the alarm's monitoring channel key. Copy and |
paste it so that you can use it in step 6, below. | paste it so that you can use it in step 6, below. | ||
| - | 4 | + | 4 Copy the contents of the html code in http://home.earthlink.net/~kleiman/examples/home_alarm04_html.txt |
into a text file in your computer, save it with an .html extension, | into a text file in your computer, save it with an .html extension, | ||
and open it in Internet Explorer. Save it in Notepad (Windows), | and open it in Internet Explorer. Save it in Notepad (Windows), | ||
but not in a word processing program like Word. | but not in a word processing program like Word. | ||
| - | 5 | + | 5 Open the HTML page. |
| - | + | 5a If the Internet Explorer banner at the top of the page asks you whether | |
to allow an ActiveX control to run, click on the banner message and select | to allow an ActiveX control to run, click on the banner message and select | ||
"Allow Blocked Content..." I use a standard ActiveX component that lets your | "Allow Blocked Content..." I use a standard ActiveX component that lets your | ||
browser communicate with the Second Life server (and thus to your script). | browser communicate with the Second Life server (and thus to your script). | ||
| - | + | 5b Ensure that cookies are enabled in your browser or else accept cookies from the page. | |
I use a cookie to save your configuration information. | I use a cookie to save your configuration information. | ||
| - | 6 | + | 6 Enter the alarm system key (see step 3, above) into the "Channel Key" |
field in the "Alarm Configuration Settings" sections of the page. | field in the "Alarm Configuration Settings" sections of the page. | ||
The setting will take effect once you out of the field. | The setting will take effect once you out of the field. | ||
(Right now, the only way to go back to the default settings is | (Right now, the only way to go back to the default settings is | ||
to remove the alarm system's cookie.) | to remove the alarm system's cookie.) | ||
| - | 7 | + | 7 On the web browser, click on the "Start" button to start monitoring from your browser location. |
Your should immediately see status information and you will get results in a few | Your should immediately see status information and you will get results in a few | ||
seconds. Wait 20 seconds. In version 0.4, the browser will poll the home alarm system every 20 seconds | seconds. Wait 20 seconds. In version 0.4, the browser will poll the home alarm system every 20 seconds | ||
| Ligne 64 : | Ligne 64 : | ||
(being nice to the poor little overworked SL servers out there). | (being nice to the poor little overworked SL servers out there). | ||
Some debugging information from your SL alarm object may from time to time show up as chat. | Some debugging information from your SL alarm object may from time to time show up as chat. | ||
| - | 8 | + | 8 Until the 1.0 release, I urge you not to change the configuration settings |
other than the alarm's monitoring channel key, as necessary. | other than the alarm's monitoring channel key, as necessary. | ||
If you change any settings, some may not work as expected or your alarm | If you change any settings, some may not work as expected or your alarm | ||


