Interactive Tutorials





Training Manual

 

Outline:

 

  1. Upgrading firmware to latest version
  2. Macromedia Flash vs HTML
  3. Creating simple one-way control pages using YIPI
  4. Using the Flash Component to make a control page
  5. Controlling a Device using the WACI’s serial port
  6. Understanding the Event Manager
  7. Using the Event Manager to get Feedback & Status
  8. How to display updated status using Flash and YIPI
  9. Using A/D, IR, IO, and Relay Ports – What is a DSP?
  10. WACI Distributed



 

 

 

 

 

 



http://www.auroramultimedia.com


Upgrading WACI Firmware

 

You need to access the setup pages of the WACI to load up firmware to the WACI.  Go to the IP address of your WACI in the browser with a trailing “/setup” at the end of the IP.  (ie. 10.10.10.10/setup)  Then you will be prompted for a username and password, which is default to “admin”.  Click on the diagnostics section, and from there you will see at the bottom, a link to the firmware page.

 

The Firmware page, available on both the WACI + and the WACI Jr., will walk you through a WACI firmware update:



There are two types of files you have use to upgrade the firmware of your WACI. The .ABT file (bootloader) and .AFW (firmware).  Depending upon the upgrade you will only be required to upload the firmware file.

First, you will be prompted for the firmware files.  Firmware upgrade files will have either the extension .AFW for operating system upgrades, or .ABT for bootstrap loader upgrades.

Once your upgrade file has been located on your computer, the web page will tell you the tftp command line you will need to execute to upload the file into your WACI.  It will look similar to this:

tftp -i [IP Address] PUT [Filename with Full Path]
example: tftp -i 10.10.10.10 PUT c:\WACI\WACIJR_2.2.abt

If ActiveX is enabled for your web browser, you may also request that the WACI create a batch file waciload.bat that will execute this command.  The batch file will be placed at the root of your local drive.

 

 

 

 

 

To actually upload the file, click the "Ready to Download Firmware" button.  The blue Status LED will turn OFF, and all the Serial LEDs for both ports will be on. You will now need to upload the OS or boot file using a tftp client.




To use the default Windows tftp client, open a Command Line (or DOS Shell) window and execute the tftp command shown on your web page.


 

While the file is uploading, the serial LEDs will blink one at a time.  Once the file is uploaded, the WACI will reset, and you will be able to access the WACI's web pages again.

Notes:

·You will not be able use the WACI for anything else while it is in the firmware upgrade mode.

·You may only update one firmware file at a time.  If you wish to update both the boot-strap loader and firmware, you will need to completely upload one first, then repeat the entire process for the other.

- The WACI uses port 69 for TFTP.  If you are trying to use a WACI from behind a firewall and you want to be able to upgrade it remotely, be sure to forward ports 80 AND 69.

 


Macromedia Flash vs HTML

 

This question has come up many times. Should you use Macromedia Flash or HTML to create control pages?

The short answer is if you just want to create a one-way control page without feedback (such as controls for a VCR or DVD player) HTML would work great. You can just pop the sample code provided on our forum into an image map and away you go sending out IR commands. In the meantime, YIPI our free interface creation tool will allow you to create one way control pages, and do simple on/off feedback.  You can download a BETA of YIPI at: http://www.auroramultimedia.com/yipi/

Now if your looking to do a video conferencing system which requires feedback to see if the Mute is on, or to know when the unit is dialing or connected, then it would be much easier to use Macromedia Flash.

We have provided a flash component on our website which hooks into the WACI for you.  All you have to do is copy and paste the component into your own project, set the IP address, create a few buttons, and your set.  We have also refined the polling functions so you can poll variables for status.  For just about all of the projects that come my way, I use flash to develop control pages because of my familiarity with it, the amount of support that can be obtained using the various flash forums/message boards, and for the amount of sample code that can be obtained from searching around the various flash websites.

 

YIPI
YIPI (Your Internet Protocol Interface) provides the end user with the ability to create and edit custom control system interfaces for the WACI.  Using a simple drag and drop interface, a user with no programming experience will be able to create functional control pages for any type of equipment.

INSTALLING

To install YIPI download the latest package from the www.auroramultimedia.com/yipi, and upload the files contained within the .zip package to your WACI’s /wwwpub/ folder into a sub-directory called 'yipi'. (so the YIPI.swf file should be located in /wwwpub/yipi/) Once uploaded load up the HTML page located at:
     http://  [WACI-IPAddress] /yipi/

After YIPI has been loaded into your browser, press the start button.  In the top right hand side of the screen there will be a textbox with an ip address specification.  In this box you will need to make sure that the current IP address of your WACI is listed and that the LED is green indicating that the connection to the WACI RPC server is active.
 

 

USAGE
To start using YIPI, click and drag one of the buttons on the left panel to the stage on the right side.  Once a button is on your stage, clicking it will bring up a blue selection box above the button.  When a button is selected you can use the dropdown menu in the bottom panel to select a function for the button to perform when it is clicked by the user.  To delete a button, simply drag the button to the bottom of yipi, where there will be a trashcan icon.

You will notice that each button can only have one function assigned to it.  There is a very simple way to allow a single button press to execute multiple functions. To do this you will need to access the WACI’s built in Event Manager.  Once in the event manager create a new variable event.  Put information into the event creation fields.  When the event manager refreshes select your newly created event and go down to the actions panel.  In the actions panel you can add as many action as you want.  You will also be able to delay actions to time out a sequence of commands you wish to send.  Once your actions have been created under your event go back into the YIPI interface and click the button to assign the functionality to.   From the function dropdown, select ‘TriggerEvent’. Another dropdown will load up with all of the events currently stored on your WACI.  Select the event that should run when that particular button is pressed.

 

 

Using Flash to create a Control Page 

 

As stated above to make things easier we have created a Flash Component for the WACI.  This component already has all of the required coding needed to make Flash talk with the WACI via the local network.  You can download the latest component as well as other Flash examples from:

http://www.auroramultimedia.com/web/waci/

 

 

 

For additional information, tutorials, and help with using Flash. I recommend the following sites:
http://www.kirupaforum.com/forums/forumdisplay.php?forumid=6
http://www.actionscript.org/forums/
http://www.macromedia.com/devnet/mx/flash/
http://www.fullasagoog.com/index.cfm?blogcat=FlashMX
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/
http://flashkit.com/tutorials/

 

 

 

Diagnostics -  Setup

 

In the setup section of the WACI + and Jr. you will be able to see the following information:

 

Firmware Version

MAC Address

Current Date / Time of the WACI

 

You will be able to configure the following:

 

Date / Time

Time Zone (Adjust for daylight savings and use 24-hour style)

Toggle between DHCP or Static IP Address

Host Name

SMTP Server Address

Telnet Server Port

System Password

IP Access Table

 

Diagnostics -  A/D, IR, IO, Relay Ports, Memory, and Log Files

 

IR:

IR has been around for a long time. Most consumer devices are controlled via IR.  Many of the DVD players out there are currently also IR controlled.  The downside to IR is that it’s one-way control.  You can not get any kind of status from your devices.  You can send the ‘power on’ command to a device, but there is no way for the IR port to know that the devices actually turned on.  The IR emitter could have fallen off, or there could be florescent lights in the room interfering with the IR signal.  If at all possible we recommend trying to find an RS-232 replacement for any IR devices in your system.

 

Using IR is quite simple.  First you need to learn the IR codes for the specific device you are trying to control.  You can do this using the WACI’s built-in IR learner, or by downloading the IR codes from the website. You can also store multiple IR files on the WACI.  Aurora keeps a database of IR codes on our webpage.  But there are several other places to find IR codes on the web… Here are a few:

 

http://ir.premisesystems.com/search.aspx

http://www.remotecentral.com

 

 

 

 

A/D:

The A/D section of the WACI can be used for sensing voltage, or outputting 5volts.  One application we used this for was a VCR/DVD player video signal sensor. By using about 10 cents worth of parts we were able to monitor a VCR/DVD player to tell if it was on or off.  When the voltage is at a certain level we can tell that there is a video signal coming through, if their was video signal coming through than the power was on.

 

To do this, we create an A/D event and set the trigger value to the level reported by the A/D port when the DVD is playing.  Under the actions for that event we tell it to set a variable called ‘dvdPowerStatus’ to 1.

 

Then we do the same thing for the off state.  Create a second A/D event this time setting the trigger value to what the A/D port reads when the DVD player is turned off, and no video signal is present.  Under the actions for this event, set the dvdPowerStatus variable to 0.

 

Using this method and a little tweaking of the numbers you can use the A/D port on the WACI for sensing power status of just about any video player.

 

I/O’s:

One of the simplest examples of the I/O port in action is a contact closure on a door.  If you were to hook up a contact closure to the I/O on the WACI, you would be able to tell when the door was opened or closed based on if the I/O was high or low.  To take it a step further you can create an I/O event called ‘doorOpen’. Under the actions for that event you can tell the WACI to trigger a serial command to play a sound file on an IOS (just like we do here at the Aurora Multimedia offices).

Relays:
The relay is one of the simplest ports on the WACI.  At first glance it may be confusing due to all of the labels and ports, but it’s quite simple.  There are 4 relay ports. Each port can have 2 states: On or Off.  You will see that each port has 3 pins.  The C.P. is the center pin.  This is the main connection and it will always be active.  N.C. is normally closed.  That means that when you first boot up the WACI, the CP and NC ports will make contact. When a relay is triggered to turn on, the CP flips and makes contact with the N.O. or normally open pin.  So if you had a little LED that you wanted to turn on and off, you just need to connect one side to the center pin and the other side to the normally open pin, then when you trigger the relay on, the LED goes on, when the relay is off, there is no connection being made and the LED turns off.

System Memory Information Page:

This section will display the current available File Space on the WACI, the total file space is 10500 KB (10.2539 megabytes).  It will also display the available RAM of the WACI, total is 24196 KB (24.6289 megabytes).

 

Log Files Section:

From here you can view the operations of the WACI, what the device is processing at all times. It will Log the following processes:

 

Commands – Every command that is sent to the RPC server, and every command sent from the RPC server will be logged in this portion.  (Default Setting is disabled)

 

Event Manger – All Event Manager Triggers/Actions/Variables will be logged in this portion.  .  (Default Setting is disabled)

 

FTP Server – Any FTP session connected to the WACI will be logged in this portion.

 

Web Server – Any file access through a web browser will be logged on this portion.

 

As you can see the WACI is logging every process that it does, so debugging problems that may occur is made easier.

 

The Logs section also has an option to view all RPC Server Methods that the WACI will accept.

 

 

DSP (WACI NX):
The DSP port is something new we are introducing on the WACI NX.  This new port will take the place of the A/D and I/O ports.  A DSP port will allow you to do all of the same things you could do with an I/O or A/D except it is much more accurate in it’s readings. It also adds a new features, which is D/A.  Digital to Analog will allow you to give the WACI a number and have it output a specific voltage.  So if you need a 5.8 volt power line going to something on your system, the DSP will be able to set one of its ports to output 5.8 volts.


 

Controlling a Device via WACI serial port

 

Most devices have a RS-232 command list in the user manual which will tell you exactly what you need to send to the device to control its features.

 

Many times, a device will require you to send HEX codes in order to control it. Sending HEX codes with the WACI is easy, you just need to know how to format it. All HEX codes are 2 characters and you must send them to the WACI HTML encoded.  To send an HTML encoded value you must put a percent sign in front of the HEX code.  To send HEX 0D, the Hex code for carriage return, you would put %0D into the serial string box.

Some instruction manuals send this differently than others.  You might see it formatted like this:
<04> <FE> <02> <00> <00> <00> <02><0D>
-or-
04H FEH 02H 00H 00H 00H 02H 0DH

-or-

\x04\xFE\x02\x00\x00\x00\x02\x0D

To send this same code to the WACI you would write it out like this:
%04%FE%02%00%00%00%02%0D

Some things to note are that there are no spaces, and the percent signs precede the HEX values.

 

For a chart which shows all ASCII characters and their HEX equivalents see: http://www.asciitable.com/

 

________________________________

 

If the commands you are sending are not affecting the device you are trying to control there are a few things you can try to get it working.

 

 First is to make sure that the serial cable is hooked up correctly. When you press a ‘serial send’ button on the control page you should see the TX LED on the WACI unit blink red. This is how you know data is being sent.

If you are still not getting a response from the device, you should try using a null modem adapter.  This will switch the send (TX) and receive (RX) pins in the cable. Wiring is one of the most common reasons for a control system failing. Consult the manual for your device to ensure you are using the correct pin-out. Usually you will want the WACI TX (pin 3) connected to the devices RX and WACI RX (pin 2) connected to the device’s TX

 

Check the baud rate of the device you are trying to control.  The WACI default baud rate is set to 9600 bps.


 Creating a Schedule for a device

 

The Event Manager built into the WACI makes scheduling very easy.  These instructions will help you set up a clock event to turn a device on/off at a certain time of the day.  To get to the Event Manager go to the IP address of your WACI in the browser with a trailing “/setup” at the end of the IP.  (ie. 10.10.10.10/setup)  Once you have logged in, you will see a tab for “Event Manager”.


1. Add a new Event

2. Give the Event a name
3. Set a Clock Event
4. Set Execute to Weekly
5. Check off the days that you would like to trigger the event
6. Set a time for when you would like the event to trigger
7. Write the Event

Now you need to create an action to cause something to happen when the event is triggered the days you selected in the Event

 

1. Add an action under the clock event you just created

2. Give the action a name

3. Set the action type to serial
4. Select a Port number from the 'Output To:' dropdown
box
5
. Put the serial string to turn the plasma on/off or switch channels/inputs into the      ' Output Value' box
6. Write the Action

The WACI will now send out the specified serial string to the plasma at the date/time you set.

 

 

Monitoring the Status of a Device

 

You just need to know how to trigger the device to output its status on the serial port.  Most devices require to be polled.  If you can find the serial command list for the manufacturer of the device you can create a timer event which will constantly poll the device.

 

Create a Timer event which triggers at the frequency which you want to update the status.  If you are polling for something such as lamp hours, it is not necessary to poll so often, whereas if you were polling for power or input status you may want to have the status updated more frequently.  Under your new event you should create several actions to send out query commands to the device.  For most serial devices it is recommended to put a delay of at least 100 ms between each query command.  Depending on the device, the speed of the COM port and the amount of data you are transferring should effect how much of a delay you give each command being sent.

 

To monitor the status of a device you have to know what commands the device is going to respond with when you send it a query command, or any other time the devices reports it's status.

 

With the help of the WACI's powerful event manager you will be able to monitor the serial port for incoming data.  Based on the data received you can choose to save or parse the data and save it in a variable or perform any of the other actions available to you based on which ports and expansion devices your WACI has attached to it.

 

We need to create a variable where we can store our information if the plasma is on or off.

 

1. Add Variable (at the bottom of the Event Manager)

2. Give the variable a name of “powerStatus

3. Set the type as a number
4. Set default value to “0

5. Write the Variable

 

Suppose you were monitoring a device for power status. When the devices transmits “!PWRON%0D” you know that the power is on.

 

1. Add a new Event

2. Give the Event a name
3. Set a Serial Event
4. Set Port number where the data is originating from
6. Set !PWRON%0D” as the trigger value
7. Write the Event

 

We have now created an Event that will monitor the specified port for incoming data that looks like !PWRON%0D”. 

 

At this point we have an Event that is monitoring “!PWRON%0D” and we created a variable to store the information in.  Now we need to create an action under the Serial Event we created earlier.

 

1. Add an action under the serial event

2. Give the action a name

3. Set the action type to variable
4. Output to:powerStatus
5. Output Value: “1
6. Write the Action

We have successfully created an Event that will set the variable “powerStatus” to 1 when the power of the plasma is on.Now do the same thing for the “PWROFF%0D” serial string and make it save the powerStatus variable to 0

 

Once you are completed you will have a dynamic variable which will represent the current power status of the device as either a 1 or 0.

 

You can pull that variable's value into your flash application and tell it to set an LED to green or red depending on the status of the variable.  YIPI does this automatically for you by creating a polling variable and creating it as a Variable LED.

 

Alternatively besides on and off status you can use this for any kind of information the device reports back such as input status, lamp hours, volume levels and whatever else you can get the device to report.

 

Taking it a step further:  Watch the serial port for specific data, parse it and send an email when it has changed

 

Lets suppose you want to monitor a plasma for it's status and send out an email when the status has changed.

Here is how you would set this up:

1. Add a new Event

2. Give the Event a name
3. Set a Serial Event
4. Set Port number where the data is originating from

5. Uncheck the box which says ‘execute concurrently’
6. Trigger value = “%02*%03” (%02 and %03 are HEX values)
7. Write the Event


* = A wild card that will replace anything in between %02 and %03
     (ie.<02>01PON<03>)

1. Add Variable

2. Give the variable a name of “plasmaStatus

3. Set the type as a string
4. Set default value blank

5. Write the Variable

1. Add an action under the serial event we just created

2. Give the action a name

3. Set the action type to variable

4. Check expression
5. Output to:plasmaStatus
6. Output Value: "\g" - "%02" - "%03"  with the quotes
7. Write the Action

Here’s what’s happening, \g is the data which triggered the event.  In our case it would be something like: <02>01PON<03>

After it has the \g in the buffer we subtract HEX 02 and HEX 03 from the string. We are now left with 01PON which we will store in a variable for emailing later.


Let’s create an action that will send an email out to you when the status changes of the plasma.

1. Create an email action within the same event we just created earlier
2. Fill in the send to and cc fields
3. Check the ‘expression checkbox’
4. Output value is the following (keeping the quotes intact):
        “the status of the plasma has changed to: “+plasmaStatus

5. Write the action

You have successfully created an event that will store the status of the plasma in a variable, and when the status changes of the plasma, it will email you whatever the status may be.


WACI Distributed

This program was created to monitor multiple WACI’s throughout a facility from a central location.  Basically each WACI is working independently of all of the other WACI’s.  If one room goes down whether it is because of a power failure or network issue, all of the other rooms remain running.

The Distributed application is a standalone program that runs on any computer with a flash player.  What it does is query a set of variables from each WACI in it’s ipList.  When it gets these variables, it now knows the current status of each object and can display it in the data grid as an on/off LED, or simply as text.

There is not much to WACI distributed besides the method is uses to send out it’s commands.  Since each WACI is essentially its own independent system, all distributed is doing is sending out a signal to each WACI saying ‘run the power on sequence’ or ‘set the input to input 1’.  That particular WACI already knows which devices are connected to it, and it will issue the commands that the device needs to get to the desired configuration of the devices (inputs, volume levels, etc..).

We have been using this method of calling ‘macros’ to run across several WACIs at once. This can be used to turn on all Television sets in a facility, switch to a particular input, and tune the cable box to a specific channel.

 


WACIWorld.com 2008 - Aurora Multimedia Corp