instruction manual i!-EquipmentMonitor i n t e g ra t i o n ! S o l u t i o n s
Software Limited Agreement LIMITED WARRANTY LIMITED WARRANTY. AMX Corporation warrants that the SOFTWARE will perform substantially in accordance with the accompanying written materials for a period of ninety (90) days from the date of receipt. Any implied warranties on the SOFTWARE and hardware are limited to ninety (90) days and one (1) year, respectively. Some states/countries do not allow limitations on duration of an implied warranty, so the above limitation may not apply to you. CUSTOMER REMEDIES.
Table of Contents Table of Contents Introduction ...............................................................................................................1 Supported Operating Systems .......................................................................................... 1 Minimum PC Requirements .............................................................................................. 1 Installing i!-EquipmentMonitor ............................................................................
Table of Contents ii i!-EquipmentMonitor
Introduction Introduction i!-EquipmentMonitor™ is an application that allows you to send and receive e-mail directly from a NetLinx™ Control System. i!-EquipmentMonitor is primarily used to send and receive NetLinx Control System e-mails, such as sending e-mail notifications for system problems or equipment trouble and receiving e-mails for Control System messaging. i!-EquipmentMonitor consists of the following files: i!-EquipmentMonitorIn.axi is an include file for receiving e-mails using POP3 protocol.
Introduction Installing i!-EquipmentMonitor 1. In Explorer, double-click i!-EquipmentMonitorSetup.exe from the directory window where you downloaded the i!-EquipmentMonitor install program. 2. After reading the License Agreement, select I Agree and Next to proceed. 3. The Welcome To i!-EquipmentMonitor Setup dialog appears, reminding you to close all Windows programs before going any further. Click Next to proceed. 4.
Running i!-EquipmentMonitor Running i!-EquipmentMonitor Very little work is required to add e-mail support to your existing NetLinx code. Receiving and sending e-mail are independent of each other; each one will be covered in it's own section. You do not need to add support for sending and receiving if only one of the features is needed. Sending Email To support sending email, first include the i!-EquipmentMonitorOut.axi (page 7) into your program: #INCLUDE 'i!-EquipmentMonitorOut.
Running i!-EquipmentMonitor Now, all you need to do is call the function that sends an email. If you want to send an email every time someone presses a button on a touch panel, your code would look like this: BUTTON_EVENT[dvTP,1] { PUSH: { SmtpQueMessage('fromAddress@mydomain.com', 'toAddress@mydomain.com ', 'My Emails subject’, 'this is the body of my email! Wow, this is Cool!', '') } } The call to SmtpQueMessage() causes your email to queue and transmit to the SMTP server.
Running i!-EquipmentMonitor Pop3SetServer ('mail.mydomain.com') Or Pop3SetServer ('192.168.12.175') Next, you need to setup the user and password for the email account you will be retrieving email from. Your email administrator should supply you with a user name and password for an email account that can receive email.
Running i!-EquipmentMonitor You can use the following code to loop through the downloaded emails whenever new email arrives: DATA_EVENT[dvPop3Socket] { OFFLINE: { STACK_VAR INTEGER nLoop Integer nLoop1 For (nLoop=1;nLoop<=nPop3QtyMail;nLoop++) { SEND_STRING 0,'i!Email Test-Print Message' SEND_STRING 0,' ' SEND_STRING 0,"'Message #',Itoa(nLoop)" SEND_STRING 0,"'Date:',sPop3EmailMessage[nLoop].cDate" SEND_STRING 0,"'From: "',sPop3EmailMessage[nLoop].cFromPersonal, '" <',sPop3EmailMessage[nLoop].
Running i!-EquipmentMonitor i!-EquipmentMonitorOut.axi Constants The following table lists i!-EquipmentMonitorOut.axi constants. i!-EquipmentMonitorOut.axi Constants dvSmtpSocket The IP device number for sending e-mails (default = 0:10:0}. SMTP_VERSION The version number of the include file. SMTP_PORT IP Port that the SMTP server is listening on (default = 25). SMTP_SERVER_TO Timeout in 1/10 for contacting the SMTP server (default = 1200).
Running i!-EquipmentMonitor Structures The following defines an i!-EquipmentMonitorOut.axi structure: Structure _sSMTPMessage { CHAR cDate[SMTP_LINE_MAX]; CHAR cSource[SMTP_USER_MAX]; CHAR cDest[SMTP_USER_MAX]; CHAR cSubject[SMTP_LINE_MAX]; CHAR cMessage[SMTP_MSG_MAX]; CHAR cFile[SMTP_LINE_MAX]; } Variable The following is an i!-EquipmentMonitorOut.axi variable: VOLATILE CHAR bSMTPDebug Set to 1 to enable debugging Functions The following are a list of i!-EquipmentMonitorOut.
Running i!-EquipmentMonitor i!-EquipmentMonitorOut.axi Functions (Cont.) SmtpSetTimeOffset(CHAR Offset[]) Call this to configure the local timezone SmtpSetTimeOffset has these arguments: Offset String containing the local timezone offset. This string is formatted as "+/HHMM" where "+/=" is "+" or "-" depending on your timezone relative to GMT, "HH" is the offset in hours relative to GMT and "MM" is the offset in minutes relative to GMT.
Running i!-EquipmentMonitor i!-EquipmentMonitorOut.axi Functions (Cont.) SmtpSetUser SmtpSetUser(CHAR LogInName[],CHAR LogInPass[]) Call this to configure the username and password for SMTP server authentication to send outbound emails. SmtpSetUser has these arguments: LogInNameString containing the username for the SMTP server. LogInPassString containing the password for them STMP server. SmtpSetUser doe not return any values.
Running i!-EquipmentMonitor i!-EquipmentMonitorIn.axi Constants The following table lists the i!-EquipmentMonitorIn.axi constants. i!-EquipmentMonitorIn.axi Constants dvPop3Socket The IP device number for sending e-mails (default = 0:11:0}. POP3_VERSION Version number of the include file. POP3_PORT IP Port that the POP3 server is listening on (default = 110). POP3_BUFFER_MAX Maximum size of buffer for IP socket (default = 2048).
Running i!-EquipmentMonitor Functions The following table lists i!EmailIn.axi functions. i!-EquipmentMonitorIn.axi Functions Pop3ClearAllEmail Syntax: Messages Pop3ClearAllEmailMessages() Deletes all e-mails Pop3ClearAllEmailMessages has no arguments. from the internally Example: stored email list. Pop3ClearAllEmailMessages() Remarks: Pop3ClearAllEmailMessages should be called when you want to delete all messages from the internally stored e-mail list.
Running i!-EquipmentMonitor i!-EquipmentMonitorIn.axi Functions (Cont.) Pop3SetRefresh Syntax: Pop3SetRefresh(Integer Refresh, CHAR Delete) Sets the refresh time the include file Pop3SetRefresh has these arguments: checks for new Refresh: Integer containing the refresh time in seconds. 0 disables automatic ee-mails and mail retrieval. whether they should be deleted form the Delete: 1 or 0. 1 will delete all e-mails from the server as they are retrieved; 0 will server. leave all e-mails on the server.
brussels • dallas • los angeles • mexico city • philadelphia • shanghai • singapore • tampa • toronto* • york 3000 research drive, richardson, TX 75082 USA • 469.624.8000 • 800.222.0193 • fax 469.624.7153 • technical support 800.932.6993 033-004-2549 6/05 ©2005 AMX Corporation. All rights reserved. AMX, the AMX logo, the building icon, the home icon, and the light bulb icon are all trademarks of AMX Corporation. AMX reserves the right to alter specifications without notice at any time.