Xytronix Research & Design WebSwitch XRDI-WS3 User Manual

Webswitch
Table of Contents

Advertisement

Switch™

Users Manual

Covers:
XRDI-WS3
XRDI-WS3P
a division of....
Xytronix Research & Design, Inc.
North Logan, Utah, USA
Revision: 1.1
© 2012 Xytronix Research and Design, Inc.

Advertisement

Table of Contents
loading

Summary of Contents for Xytronix Research & Design WebSwitch XRDI-WS3

  • Page 1: Users Manual

    Switch™ Users Manual Covers: XRDI-WS3 XRDI-WS3P a division of..Xytronix Research & Design, Inc. North Logan, Utah, USA Revision: 1.1 © 2012 Xytronix Research and Design, Inc.
  • Page 2: Table Of Contents

    Revision 1.1 WebSwitch™ Users Manual Contents Trademark and Copyright Information Warranty FCC Statement Installation Guidelines (Read Before Installing) Section 1: Introduction 1.1 Features 1.2 Applications 1.3 WebSwitch™ Models Available 1.3.1 Optional Accessories 1.4 Connectors & Indicators 1.5 Accessing WebSwitch™ Section 2: Installation and Setup 2.1 Mounting 2.2 Connection 2.2.1 Power Supply Connection...
  • Page 3 Revision 1.1 WebSwitch™ Users Manual Section 3: Operation 3.1 Browser Operation 3.2 XML Operation 3.2.1 Controlling the unit through state.xml 3.2.2 GET Requests 3.2.3 Monitoring Events through eventX.xml 3.2.4 XML Diagnostics 3.3 Configuring Events Through Get Requests 3.4 Modbus Operation 3.4.1 Read Coils (Modbus Function Code 01 (0x01)) 3.4.2 Read Discrete Inputs (Modbus Function Code 02 (0x02)) 3.4.3 Read Holding Registers (Modbus Function Code 03 (0x03))
  • Page 4: Trademark And Copyright Information

    Revision 1.1 WebSwitch™ Users Manual Trademark and Copyright Information This document is Copyright ©2012 by Xytronix Research & Design, Inc. All rights reserved. WebSwitch™, WebRelay™, ControlByWeb™, and Xytronix Research & Design™ are trademarks of Xytronix Research & Design™, Inc. 2012. All parts of this product and design including but not limited to firmware, hardware design, schematics, PCB layout, concept, graphics, users manual, etc., are property of Xytronix Research &...
  • Page 5: Warranty

    Revision 1.1 WebSwitch™ Users Manual Warranty This Xytronix Research & Design, Inc. product has a warranty against defects in material and workmanship for a period of one year from the date of shipment. During the warranty period, Xytronix Research & Design, Inc. will, at its option, either repair or replace products that prove to be defective. This warranty is extended to the original purchaser of the equipment only.
  • Page 6: Fcc Statement

    Revision 1.1 WebSwitch™ Users Manual FCC Statement This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: ━ This device may not cause harmful interference. ━ This device must accept any interference received, including interference that may cause undesired operation.
  • Page 7: Installation Guidelines (Read Before Installing)

    Revision 1.1 WebSwitch™ Users Manual Installation Guidelines (Read Before Installing) ━ Do not open WebSwitch™ enclosure. This could damage the unit or cause personal harm and will void the warranty. ━ This unit must be installed by qualified personnel. ━ This unit must not be installed directly outdoors. ━...
  • Page 8: Section 1: Introduction

    Revision 1.1 WebSwitch™ Users Manual Section 1: Introduction WebSwitch™ is a self contained, remote power controller with two electrical outlets and a built-in web server. Each outlet can be individually controlled and/or monitored over any IP network including private networks, IP-based industrial control networks, and the Internet. Users can operate WebSwitch™...
  • Page 9: Applications

    Revision 1.1 WebSwitch™ Users Manual WebSwitch Plus™ (model XRDI-WS3P) also includes the following features: ✔ Temperature and/or humidity sensors can be connected for environmental monitoring. (One temperature sensor is included, use up to three sensors.) ✔ Dry-contact sensors or switches can be connected for local control of outlets or for monitoring external devices such as access doors (two discrete inputs).
  • Page 10: Webswitchâ„¢ Models Available

    WebSwitch™ Users Manual 1.3 WebSwitch™ Models Available WebSwitch™ is currently available in two models. The main differences between each model are listed below. XRDI-WS3 Standard WebSwitch™ with two individually controlled outlets, built-in web server, and automatic reboot functions. XRDI-WS3P WebSwitch Plus™ includes all features of standard model plus...
  • Page 11: Connectors & Indicators

    Revision 1.1 WebSwitch™ Users Manual 1.4 Connectors & Indicators Figure 1.4a- Connectors and Indicators WebSwitch™ has two AC power outlets (IEC 320 C13 female connectors), one AC power input (IEC 320 C14 male connector) and one Ethernet connector. WebSwitch Plus™ also includes a 5-position removable terminal connector to provide connection to discrete inputs and temperature and/or humidity sensors.
  • Page 12: Accessing Webswitch

    Revision 1.1 WebSwitch™ Users Manual 1.5 Accessing WebSwitch™ Standard Access Using a Web Browser WebSwitch™ has a built-in web server and provides simple web pages that can be accessed directly using a standard web browser. This allows users to access the unit with NO SPECIAL SOFTWARE installed on their computer.
  • Page 13: Section 2: Installation And Setup

    Revision 1.1 WebSwitch™ Users Manual Section 2: Installation and Setup Installation consists of mounting WebSwitch™, connecting to an IP Network, providing power, and configuring via a web browser. For WebSwitch Plus™ models, inputs and sensors can be wired to the device using the 5-position terminal connector.
  • Page 14: Connection

    Revision 1.1 WebSwitch™ Users Manual Figure 2.2a - Connections 2.2 Connection 2.2.1 Power Supply Connection Connect the IEC 320 C14 Male Connector Power Input of WebSwitch™ to a power source (120-240V AC). 2.2.2 Outlet Connection Connect one or both of the outlets on WebSwitch™ using the IEC 320 C13 Female Connectors to the device(s) to be controlled.
  • Page 15: Network Connection

    Revision 1.1 WebSwitch™ Users Manual 2.2.3 Network Connection Connect the Ethernet port to a 10 Base T or 10/100 Base T Ethernet connection. This typically connects to an Ethernet hub, switch, or router. For configuration, WebSwitch™ may be connected directly to the Ethernet port on a computer using a “crossover”...
  • Page 16: Terminal Connector

    Revision 1.1 WebSwitch™ Users Manual 2.2.4 Terminal Connector (XRDI-WS3P only) The WebSwitch Plus™ model includes a removable 5-position terminal connector which is used for connecting temperature sensors, humidity sensors, or discrete inputs. The terminals are described in the table below. IMPORTANT: MAKE SURE WIRES ARE PROPERLY ATTACHED TO THE TERMINALS AND THAT THE TERMINALS ARE TIGHT! 5-pin connector pinout for XRDI-WS3P Only...
  • Page 17 Revision 1.1 WebSwitch™ Users Manual 2.2.4.1 Input Connection (Model XRDI-WS3P only) Two discrete inputs are provided which can be connected to dry contact sensors or switches. Sensors can be used for monitoring alarm conditions such as access or thresholds. Alternatively, if local control of the outlets is needed, switches can be connected to the inputs and the unit can be configured such that they control the outlets.
  • Page 18 Revision 1.1 WebSwitch™ Users Manual 2.2.5 Temperature/Humidity Sensor Connection(Model XRDI-WS3P only) Temperature and/or humidity sensors can be used for monitoring environmental conditions. The sensors all share the same terminals (+5V, Ground, Data) and up to three sensors can be connected. The sensors are able to share the same terminals without interference because they communicate with WebSwitch Plus™...
  • Page 19 Revision 1.1 WebSwitch™ Users Manual A linear (daisy chain) topology will minimize signal reflections, providing a more reliable connection and longer cable lengths than a star topology. Appropriate strain relief should be used at WebSwitch™ and other connections may be subjected to vibration, movement, or repeated handling.
  • Page 20: Establishing Communications For Setup

    Revision 1.1 WebSwitch™ Users Manual 2.3 Establishing Communications for Setup WebSwitch™ is set up using a web browser. The first task is to establish communications between a computer and WebSwitch™ so that the browser-based configuration can begin. To do this, the computer and the WebSwitch™...
  • Page 21: Option 2: Assign A Temporary Ip Address To Configuration Computer

    Revision 1.1 WebSwitch™ Users Manual Type: arp -s {new IP address} {serial number of WebSwitch™ } Note: IP address format is xxx.xxx.xxx.xxx Serial number format is ss:ss:ss:ss:ss:ss For example, to set WebSwitch™ (with serial number 00-0C-C8-01-00-01 ) to 10.10.10.40 the following command would be used: arp -s 10.10.10.40 00:0c:c8:01:00:01 Next, type:...
  • Page 22 Revision 1.1 WebSwitch™ Users Manual Step 1: Open the control panel by clicking on the start menu and then clicking on Control Panel (Figure 2.3a). Note: The control panel shown (Figure 2.3b) is in “Classic View.” If the control panel is in “Category View,”...
  • Page 23 Revision 1.1 WebSwitch™ Users Manual Step 2: Double click on the icon labeled Network Connections. The window shown below will pop-up. Note: To access the Network Connections folder in Windows Vista, select the Windows Icon (Start Menu) and enter ncpa.cpl into the search bar and press Enter. Figure 2.3c- Network Connection Figure 2.3d- Vista Start Menu Xytronix Research &...
  • Page 24 Revision 1.1 WebSwitch™ Users Manual Step 3: Right click on the icon labeled Local Area Connection. In the menu that follows, select the option at the bottom of the menu labeled Properties. The Local Area Connection Properties window will appear. Scroll down to and highlight "Internet Protocol (TCP/IP),"...
  • Page 25: Open Configuration Web Page

    Revision 1.1 WebSwitch™ Users Manual Step 5: Select the radio button labeled "Use the following IP address" and type in the IP address 192.168.1.50. Type in a subnet mask of 255.255.255.0. No need to change the default gateway field. Click OK to accept the new settings. Note: If “Use the following IP address”...
  • Page 26: Webswitchâ„¢ Setup

    Revision 1.1 WebSwitch™ Users Manual 2.4 WebSwitch™ Setup Pages WebSwitch™ is configured using a web browser. To access the setup pages, enter the following URL in the address bar of a web browser: http://ipaddress/setup.html For example, using the default IP address, enter: http://192.168.1.2/setup.html After the page is requested, a password prompt will appear.
  • Page 27 Revision 1.1 WebSwitch™ Users Manual Firmware Revision This is the current product revision of the unit's firmware. Serial Number This is the serial number of this unit. The serial number is also the MAC address of the unit. Xytronix Research & Design, Inc.
  • Page 28: Network Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.2 Network Tab The network parameters are set on this page. Note that if multiple ControlByWeb™ products are used on the same network, install one at a time and set the IP address of each unit before connecting the next unit to the network.
  • Page 29 Revision 1.1 WebSwitch™ Users Manual Use DHCP (model XRDI-WS3P only) This option allows DHCP to be enabled or disabled. If this option is set to Yes, WebSwitch™ will wait for an IP address from a DHCP server each time it is powered. The default setting is No (this is recommended for most installations).
  • Page 30 Revision 1.1 WebSwitch™ Users Manual Alternate DNS Server This field is used to specify the IP address of a Secondary DNS server. This is used when the WebSwitch™ requires DNS services and the preferred DNS server is not available. The default setting for this field is 192.168.1.1.
  • Page 31 Revision 1.1 WebSwitch™ Users Manual Return Email WebSwitch™ will not receive email messages, but when WebSwitch™ sends email messages, it must include a return email address. This field is used to specify the return email address. Note that although WebSwitch™ will send email messages with any email address specified in this field, some email filters (spam filters) will not allow messages through that include an invalid email address.
  • Page 32: Advanced Network Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.3 Advanced Network Tab Note: These settings are not used for most installations. Figure 2.4c- Advanced Network Tab Modbus: Modbus Enabled WebSwitch™ can support Modbus/TCP. Modbus is a messaging structure protocol used in industrial manufacturing control and automation. It is an open protocol and offers interoperability with software and devices from other manufacturers.
  • Page 33 ID number, customer number, password, etc. The format is entirely dependent upon the server requirements. This field can be up to 80 characters long. Default text is provided only as an example placeholder. The default text is [<serialAddress>]:ControlByWeb,XRDI-WS3(P). Connection Interval This field specifies the periodic interval in which WebSwitch™...
  • Page 34 Revision 1.1 WebSwitch™ Users Manual SNMP Simple Network Management Protocol (SNMP) is used to manage and administer network devices. WebSwitch™ supports SNMP V1.0 and can be configured here. Using SNMP, the input and power outlet states of WebSwitch™ can be read as well as some basic information about the device. See Appendix F: SNMP Requests for information about how to request information from WebSwitch™...
  • Page 35 Revision 1.1 WebSwitch™ Users Manual To limit access to only devices on the local network and one device on the internet (address 10.143.100.32): IP Filter Range 1: 192.168.1.0 192.168.1.255 IP Filter Range 2: 10.143.100.32 10.143.100.32 Note: The address specified for the Remote Services server (if applicable) is automatically allowed through the firewall no matter how this is set.
  • Page 36: Password Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.4 Password Tab WebSwitch™ requires a password to log into the setup pages. The password can be changed on this page. Additionally, the installer can enable the requirement for a control page password. Figure 2.4d- Password Tab Setup Password The setup password, which is required to access the setup pages, can be modified by entering a new password here.
  • Page 37 Revision 1.1 WebSwitch™ Users Manual password will not be displayed as it is entered. Note that WebSwitch™ requires a password, but does not require a user name to access the Control Page. However, some browsers require that a user name be entered. In this instance enter none as the user name. The default control password is webswitch.
  • Page 38: Date/Time Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.5 Date/Time Web (Model XRDI-WS3P only) WebSwitch Plus™ uses the time for scheduled events, such as turning the outlets on or off at scheduled times and for logging (a time stamp is included with each logged event). The time is stored and displayed in 24-hour time format.
  • Page 39 Revision 1.1 WebSwitch™ Users Manual The following parameters are available when the Set Time is set to Manually: Date This field is used to enter the current date. The date is entered by first selecting the correct month and year by using the left and right arrows at the top of the calender. The single arrows (< and >) change the month and the double arrows (<<...
  • Page 40 Revision 1.1 WebSwitch™ Users Manual Sync With Server This option allows the user to specify how often the WebSwitch Plus™ time will be synchronized with the time server. When the submit button on this page is pressed, the WebSwitch Plus™ will immediately synchronize with the time server.
  • Page 41 Revision 1.1 WebSwitch™ Users Manual Daylight Savings Start This is the date that daylight savings will start. Note that on this date, at 12:02 AM (00:02) the current time will be shifted forward by one hour (time will jump from 12:02 AM [00:02] to 1:02 AM [01:02]).
  • Page 42: Logging Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.6 Logging Tab (Model XRDI-WS3P only) WebSwitch Plus™ can be configured to record data such as changes in outlet and input state, sensor data, and events. Both periodic and event-based logging are supported. The logged data is stored in internal non-volatile memory and can be retrieved by entering the command http://{WebSwitch IP address}/log.txt.
  • Page 43 Revision 1.1 WebSwitch™ Users Manual Logging Enabled When this option is set to Yes, WebSwitch Plus™ will record data as configured on this page. Note: this option controls data logging but not system logging. System logging is always enabled. The default setting for this option is No. Start Time If a logging interval is specified (periodic logging rather than event logging), logging will occur relative to this start time.
  • Page 44 Revision 1.1 WebSwitch™ Users Manual Filter Logged Requests When logging is enabled for XML Requests, Modbus Requests, or SNMP Requests, the user can filter out Reads (such as reading the outlet or input state via an XML request) or Writes (such as changing the outlet state via an XML command).
  • Page 45: Outlets Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.7 Outlets Tab This page provides configuration options for the two outlets. Figure 2.4h- Outlets Tab- Normal Mode (Automatic Reboot set to OFF) Xytronix Research & Design, Inc.
  • Page 46 Revision 1.1 WebSwitch™ Users Manual Outlet This drop down menu is used to select the outlet for which the options below will apply. -Outlet 1 or Outlet 2: Selects the built-in outlets. Automatic Reboot When this option is set to On, WebSwitch™ will operate in Automatic Reboot mode. In Automatic Reboot mode, WebSwitch™...
  • Page 47 Revision 1.1 WebSwitch™ Users Manual Email Option (Model XRDI-WS3P only) Simple email messages can be sent when outlets are turned on or off. This parameter is used to specify what conditions, if any, will cause email messages to be sent. Note that email notification will work only if the email settings are correctly set up in the Network setup page.
  • Page 48 Revision 1.1 WebSwitch™ Users Manual Input Control Option (Model XRDI-WS3P only) The inputs can be configured to control the outlet. The options in this drop down menu are used to specify if and how the input affects the outlet, and are described below. Note that in all cases, input changes will only affect the outlet at the time the input is changed.
  • Page 49 Revision 1.1 WebSwitch™ Users Manual The following parameters are available only when Automatic Reboot is ' On ': Figure 2.4i - Outlets Tab (Automatic Reboot On) Xytronix Research & Design, Inc.
  • Page 50 Revision 1.1 WebSwitch™ Users Manual Ping IP Address This is the IP address of the device that WebSwitch™ will ping. This is typically the IP address of the device that will be rebooted upon failure (such as a server, router, computer, etc.). It could, however, be the address of a device on the opposite side of a communications link when WebSwitch™...
  • Page 51: Inputs Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.8 Inputs Tab (Model XRDI-WS3P only) This page provides configuration options for the two control inputs built into WebSwitch Plus™. Note: In this manual, the input is considered to be ON when the input is tied to ground. Figure 2.4j- Inputs Tab Input This drop down menu is used to select the control input to which the options below will apply.
  • Page 52 Revision 1.1 WebSwitch™ Users Manual Off Status Text The text in this field specifies the text that will be displayed in the control page and in email messages when the input is OFF (input is open). Up to 15 characters may be entered in this field. The default text is OFF.
  • Page 53: Sensors Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.9 Sensors Tab (Model XRDI-WS3P only) This tab is used to configure temperature/humidity sensors and associated alarms. WebSwitch Plus™ will automatically detect whether a temperature or humidity sensor is connected. Figure 2.4k- Sensors Tab Sensor Up to three sensors can be connected to WebSwitch Plus™.
  • Page 54 Revision 1.1 WebSwitch™ Users Manual sensor comes from the factory with a unique, non-changeable address. When the sensors tab is selected (or the Refresh List button is pressed), WebSwitch Plus™ scans the bus for sensors. The addresses of the sensors that are found on the bus are listed in the drop-down list. For each sensor number (Sensor 1...
  • Page 55 Revision 1.1 WebSwitch™ Users Manual Email Option Simple email messages can be sent in response to alarm conditions. This parameter is used to specify what alarm conditions, if any, will cause email messages to be sent. Note that email notification will work only if email is correctly setup in the Network setup page. -No Email Messages: No email messages will be sent due to alarm conditions.
  • Page 56: Events Scheduler Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.10 Events Scheduler Tab (Model XRDI-WS3P only) Events can be programmed to turn the outlets on and off at specific times. Up to 50 events can be created. Each event can occur one time or multiple times. Figure 2.4m- Events Scheduler Tab A list of all scheduled events and information about each event is displayed in a table.
  • Page 57 Revision 1.1 WebSwitch™ Users Manual Configuration of events is accomplished by clicking on the appropriate event, which causes the following setup screen to be displayed: Figure 2.4n- Event Setup Current Date/Time This field displays the current date and time as specified in the Date/Time tab. Description Text entered here is used to name and describe each event.
  • Page 58 Revision 1.1 WebSwitch™ Users Manual Period When events are configured to occur more than one time (any entry other than 1 in the Count below), the period field specifies the time between events. For long events (pulse outlet), this is the time interval between the time the event begins and the next time the event begins.
  • Page 59 Revision 1.1 WebSwitch™ Users Manual allow events to resume. -set extVar0: External variables provide a way for scripts written in BASIC to interact with users, and for scripts to execute as a result of event occurrences. This option sets the variable extvar0 to 1 when the event occurs.
  • Page 60: Script Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.11 Script Tab (Model XRDI-WS3P only) WebSwitch Plus™ can be used to run simple custom programs written in a language similar to BASIC. This page is used to load and execute these programs. Before it can be loaded to WebSwitch Plus™, a script must first be written as a .txt file.
  • Page 61 Revision 1.1 WebSwitch™ Users Manual Upload BASIC Script This field displays the script selected to be uploaded to the device. To upload a script to WebSwitch Plus™, click the 'Choose File' button, find the .txt file previously written, and select 'Open.' The location of the file should appear in the neighboring field.
  • Page 62 Revision 1.1 WebSwitch™ Users Manual Display Button 1 Checking this box will display a button on the Control Page. Clicking this button on the Control Page will set the extVar to value 1. Display Button 2 Checking this box will display a button on the Control Page. Clicking this button will set the extVar to value 2.
  • Page 63: Control Page Setup Tab

    Revision 1.1 WebSwitch™ Users Manual 2.4.12 Control Page Setup Tab The Control Page Setup page is used mainly to set parameters that affect the view of the Control Page, how often it will refresh, etc. Figure 2.4q- Control Page Setup Tab Main Header Text The text entered here appears at the top of the Control Page.
  • Page 64: Section 3: Operation

    Revision 1.1 WebSwitch™ Users Manual Section 3: Operation WebSwitch™ can be operated using a web browser, by sending text commands to an XML status/control page, and/or by sending Modbus/TCP requests. In addition the WebSwitch Plus™ model allows you to control the outlets using inputs, or events. (Using an input or event to control the outlets was described throughout previous sections of the manual, and will not be described here.) 3.1 Browser Operation Once WebSwitch™...
  • Page 65 Revision 1.1 WebSwitch™ Users Manual Header Displays the text entered in the Main Header Text field on the Control Page Setup tab in the setup pages. Outlet 1 and 2 These rows display the current state of the two outlets and allow the user to change the outlet state. Each of these rows can be displayed (as shown) or not displayed by checking or unchecking the appropriate boxes on the Control Page Setup tab in the setup pages.
  • Page 66: Xml Operation

    Revision 1.1 WebSwitch™ Users Manual 3.2 XML Operation Custom computer applications may be created to monitor and control WebSwitch™ without using a web browser. There are two XML pages that can be used to monitor and control WebSwitch™, state.xml and eventX.xml (where X is the event number). 3.2.1 state.xml The state of the outlets, inputs, and sensors can be monitored by sending a request to port 80 (or port specified in setup) for the XML page state.xml.
  • Page 67 Revision 1.1 WebSwitch™ Users Manual XML Tags* Monitor Values <relayXstate> 0= Outlet off (coil off) 1= Outlet on (coil energized) <rebootXstate> 0= Auto-Reboot off 1= Pinging 2= Waiting for response 3= Rebooting 4= Waiting for Boot #= Number of reboot failures <failuresX>...
  • Page 68 Revision 1.1 WebSwitch™ Users Manual When the pulse command is sent to WebSwitch™, the outlet will pulse for the time specified in the setup page. It is possible, however, to specify a pulse time that is different than the pulse time configured in the setup page.
  • Page 69: Get Requests

    Revision 1.1 WebSwitch™ Users Manual 3.2.2 GET Requests GET requests can be used by custom applications to request information from the device, set parameters, and control the Outlets. No Password Enabled GET requests to the device for XML files: Example: Request about.html GET /about.html HTTP/1.1\r\n\r\n Example: Turn Outlet 1 ON GET /state.xml?relay1State=1 HTTP/1.1\r\n\r\n...
  • Page 70: Monitoring Events Through Eventx.xml

    Revision 1.1 WebSwitch™ Users Manual 3.2.3 Monitoring Events Through eventX.xml (Model XRDI-WS3P only) The outlets can be configured to turn on, turn off, or pulse at specified times. Instructions to change the outlet state at a given time (or periodically) are called events. WebSwitch Plus™ supports 50 events and these events can be monitored through an XML page called eventX.xml (where X is the event number 0- 49).
  • Page 71 Revision 1.1 WebSwitch™ Users Manual <action> ON (Outlet will turn on when event occurs.) OFF (Outlet will turn off when event occurs.) Pulse (Outlet will pulse when event occurs.) Toggle (Outlet will toggle state when event occurs.) <pulseDuration> When the event causes the outlet to pulse, this field indicates the time (in seconds) that the outlet will pulse.
  • Page 72: Xml Diagnostics

    Revision 1.1 WebSwitch™ Users Manual 3.2.4 XML Diagnostics There is a special XML page that can be requested for diagnostic purposes called diagnostics.xml. A request for this file (by typing {WebSwitch IP Address/diagnostics.xml} in the browser address bar) returns the following: <datavalues>...
  • Page 73: Configuring Events Through Get Requests

    Revision 1.1 WebSwitch™ Users Manual 3.3 Configuring Events Through Get Requests (Model XRDI-WS3P only) Events can be configured using a Get request. For example, to configure event 5 to start on March 8, 2009 at 02:30:10 and continue periodically every second for 50 times, toggling the outlet each time, send the following request (using the default IP address): http://192.168.1.2/eventSetup.srv? e5=1236479410;1;0;50;0;4;1.50;0;Event5Desc;127;...
  • Page 74: Modbus Operation

    Revision 1.1 WebSwitch™ Users Manual 3.4 Modbus Operation WebSwitch™ can be controlled (and read) using Modbus/TCP protocol. This provides a standard means of using WebSwitch™ in conjunction with devices and software from other manufacturers. This section contains the information necessary to communicate with WebSwitch™ using Modbus/TCP. This is not a tutorial on Modbus and it is assumed that the reader is already familiar with Modbus.
  • Page 75 Revision 1.1 WebSwitch™ Users Manual Regardless of the addressing scheme used, it is important to note that when the control password in WebSwitch™ is enabled, Modbus/TCP communications are disabled. This is because Modbus/TCP does not provide a mechanism for password protection. Make sure the control password is disabled (default) before using Modbus with WebSwitch™.
  • Page 76: Read Coils (Modbus Function Code 01 (0X01))

    Revision 1.1 WebSwitch™ Users Manual 3.4.1 Read Coils (Modbus Function Code 01 (0x01)) This function returns the state of the relay coils. 0 denotes that the coil is not energized, 1 denotes that the coil is energized. In addition, the discrete inputs can be read using this function which allows the full state of WebSwitch™...
  • Page 77 Revision 1.1 WebSwitch™ Users Manual Data Byte (hex) LS Date Bits Input 2 State Input 1 State Outlet 2 State Outlet 1 State (binary) 0x00 10000 0x01 10001 0x02 10010 0x03 10011 0x04 10100 High 0x05 10101 High 0x06 10110 High 0x07 10111...
  • Page 78: Read Discrete Inputs (Modbus Function Code 02 (0X02))

    Revision 1.1 WebSwitch™ Users Manual 3.4.2 Read Discrete Inputs (Modbus Function Code 02 (0x02)) (Model XRDI-WS3P only) This function returns the state of the discrete inputs. Valid Starting Address and Quantity of coils combinations: Valid starting address can fall in the range of 0x0000 and 0x0001. Valid quantities can fall in the range of 0x0001 and 0x0002.
  • Page 79 Revision 1.1 WebSwitch™ Users Manual Modbus Error: Function code (1 Byte): 0x82 Exception code (1 Byte): 0x01 or 0x02 Exception Codes: 0x01 - Function code not supported, 0x02 - Incorrect starting address / quantity of outlets combination. Character String Example: char read_inputs_mb_response[] = {0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xff, 0x02, 0x01, 0x01 };...
  • Page 80: Read Holding Registers (Modbus Function Code 03 (0X03))

    Revision 1.1 WebSwitch™ Users Manual 3.4.3 Read Holding Registers (Modbus Function Code 03 (0x03)) This function is used to read the temperature or humidity values of the sensors. One, multiple, or all values can be read at the same time using this function. Valid Starting Addresses and Quantity of Coil Combinations: Reading these registers requires that the address be in the decimal range of 272 to 276 (0x110 and 0x114).
  • Page 81: Write Single Coil (Modbus Function Code 05 (0X05))

    Revision 1.1 WebSwitch™ Users Manual 3.4.4 Write Single Coil (Modbus Function Code 05 (0x05)) This function allows you to turn Outlets 1 and 2 on and off, one at a time. Request Modbus/TCP: Transaction identifier (2 Bytes): 0x0001 Protocol identifier (2 Bytes): 0x0000 Length (2 Bytes): 0x0006 Unit identifier (1 Byte): 0xff Modbus:...
  • Page 82: Email Notification

    Revision 1.1 WebSwitch™ Users Manual 3.5 Email Notification (Model XRDI-WS3P only) 3.5.1 Email Notification Description WebSwitch Plus™ can be configured to send an email message to up to five email addresses when certain events happen. Events that can trigger email messages include input state changes, outlet state changes, temperature/humidity changes, and commands sent from a BASIC script.
  • Page 83: Email Notification Setup

    Revision 1.1 WebSwitch™ Users Manual 3.5.2 Email Notification Setup Email notification requires the following fields are properly set. See Section 2 for a description of each field. Network Tab: ━ IP Address ━ Subnet Mask ━ Gateway ━ Preferred DNS Server (this is required if Mail Server is entered by name and not by IP address) ━...
  • Page 84: Appendix A: Restoring Factory Default Settings

    Revision 1.1 WebSwitch™ Users Manual Appendix A: Restoring Factory Default Settings In the event that the IP address or passwords are forgotten, WebSwitch™ may be restored to its original factory default settings. To do this, first remove the power from the unit. Next, carefully insert a thin object (such as a toothpick) through the small hole in the back of the unit to press the small button located inside the unit.
  • Page 85: Appendix B: Installing New Firmware

    Revision 1.1 WebSwitch™ Users Manual Appendix B: Installing New Firmware From time to time updates are made to WebSwitch™ firmware. WebSwitch™ firmware can be updated in the field. The procedure for updating the firmware is outlined below. Please note that it is important that this procedure is followed precisely.
  • Page 86 Revision 1.1 WebSwitch™ Users Manual downloaded from the ControlByWeb™ web site. Step 7: Carefully follow these steps: (a) Remove power to WebSwitch™. (b) Press and hold the reset button as described in Appendix A. (c) While holding the reset button, apply power to WebSwitch™. The Link and Act lights will flash.
  • Page 87: Appendix C: Accessing Webswitchâ„¢ Remotely Over The Internet

    Revision 1.1 WebSwitch™ Users Manual Appendix C: Accessing WebSwitch™ Remotely Over the Internet WebSwitch™ can be monitored and/or controlled from a remote location over the Internet. If access over the Internet is required, WebSwitch™ must be set up properly, and the router on the network where WebSwitch™...
  • Page 88: Port Forwarding

    Revision 1.1 WebSwitch™ Users Manual Figure Appendix C.1- Local Area Network A Simple LAN connected to the Internet The LAN in the example above can be connected to the Internet by adding a router and an Internet connection. The router has two network connections. It has an Ethernet network connection that connects to the LAN, and it has another connection that connects to the Internet (this is called the WAN or Wide Area Network connection).
  • Page 89 Revision 1.1 WebSwitch™ Users Manual Using the mailing address analogy, the port is similar to a post office box. The IP address specifies the location, and the port specifies the specific recipient. Port numbers can be set to any number between 1 and 65235;...
  • Page 90 Revision 1.1 WebSwitch™ Users Manual Accessing Setup Pages After changing ports, the setup pages are accessed on a local network as described below: http://(Local IP Address):(Port Number)/setup.html For example, to access WebSwitch™ at the setup page above, the following command would be used: http://192.168.1.25:8000/setup.html To access the ControlByWeb™...
  • Page 91: Appendix D: External Server And Remote Services

    Revision 1.1 WebSwitch™ Users Manual Appendix D: External Server and Remote Services Note: The following methods are supported by WebSwitch™; however, Xytronix Research & Design, Inc. does not provide or support custom third party applications, or external web servers. Accessing WebSwitch™ with Custom Software or Third Party Applications WebSwitch™...
  • Page 92 Revision 1.1 WebSwitch™ Users Manual WebSwitch™ is installed on a separate private network. For example, if the user doesn't control the network connections where WebSwitch™ is installed, “Remote Services” would initiate a TCP connection over the Internet with the control computer. Since WebSwitch™ initiates the connection, the control computer doesn't have to know the IP address of WebSwitch™.
  • Page 93 Revision 1.1 WebSwitch™ Users Manual Appendix E: Log Files (Model XRDI-WS3P only) WebSwitch Plus™ logs information to two different log files; log.txt and syslog.txt. Both log files are text files and are stored in non-volatile memory; this data will not be lost due to power failure. The log files are stored in circular buffers which write from the beginning of the allocated memory space to the end, and then repeat from the beginning (over-writing the original data).
  • Page 94 Revision 1.1 WebSwitch™ Users Manual System log file: syslog.txt ***The setup user name and password are required to access this file. This log file records various system events which can be used for diagnostics and troubleshooting purposes. This file can be up to 16K bytes long. File Format: MM/DD/YYYY HH:MM:SS, (category to which message applies): (message) Examples:...
  • Page 95 Revision 1.1 WebSwitch™ Users Manual This file is read by requesting the syslog.txt file. For example, using the default IP address the following command would be used: http://192.168.1.2/syslog.txt If the TCP port has been changed (not port 80), the port will be required to read the file. For example, using the default IP address, and port 8000, the log file would be read as follows: http://192.168.1.2:8000/syslog.txt To erase the file, use:...
  • Page 96: Standard Objects

    Revision 1.1 WebSwitch™ Users Manual Appendix F: SNMP Requests, Objects and Community Strings Outlet states, input states, some simple network parameters, and temperature/humidity measured by WebSwitch™ can be retrieved using SNMP. The states of the outlets can also be changed through SNMP SET requests when the device is configured correctly.
  • Page 97 Revision 1.1 WebSwitch™ Users Manual Sensors (Model XRDI-WS3P only) Object Response webswitch_sensorOne Value: x.x (Decimal temperature or humidity) webswitch_sensorTwo Value: x.x (Decimal temperature or humidity) webswitch_sensorThree Value: x.x (Decimal temperature or humidity) Outlet Reboots Object Response webswitch_outletOne_reboot Value: # (Number of reboot attempts) webswitch_outletTwo_reboot Value: # (Number of reboot attempts) Read/Write Objects...
  • Page 98: Community Strings

    Revision 1.1 WebSwitch™ Users Manual Inputs (Model XRDI-WS3P only) These traps occur as a result of the inputs changing states. They are configured on the Inputs setup tab. Object Description Value webswitch.95 Input one state change 0 or 1 (0 - OFF, 1 - ON) webswitch.96 Input two state change 0 or 1 (0 - OFF, 1 - ON)
  • Page 99 Revision 1.1 WebSwitch™ Users Manual Appendix G: BASIC Scripts (Model XRDI-WS3P only) BASIC (Beginners All-purpose Symbolic Instruction Code) is a computer programming language that has been in use for many years. This ControlByWeb™ product has an integrated BASIC interpreter for simple BASIC scripts.
  • Page 100 Revision 1.1 WebSwitch™ Users Manual Supported Statements The following are the statements supported by the ControlByWeb™ BASIC interpreter, a short description of the statements, and their formats. The LET statement assigns a variable a value. The format is: LET (variable) = (expression) IF THEN, ELSE, END IF The IF THEN statement tests the truth of a condition.
  • Page 101 Revision 1.1 WebSwitch™ Users Manual The LOG statement causes the device to log data according to the settings specified under the Logging setup tab. Note that in order to log, logging must be enabled in the Logging setup tab. The format is: EMAIL The EMAIL statement causes the device to send an email.
  • Page 102 Revision 1.1 WebSwitch™ Users Manual CALL The CALL statement is found within the main body of code, but requires the interpreter to skip to a subroutine found at the end of the program. After the subroutine is finished, the interpreter returns to the line immediately following the CALL statement.
  • Page 103 Revision 1.1 WebSwitch™ Users Manual Timer Variables Six timers are available for use in BASIC scripts. They are designated as t0 through t5. Timers can be set to any positive integer (or 0) by using the LET statement. As soon as a value is assigned to a timer, it will begin to count down immediately by decrementing one count every 100ms until it reaches zero.
  • Page 104: Event Variables

    Revision 1.1 WebSwitch™ Users Manual Event Variables Actions can be configured to occur at specified days and times. Five events may be configured for the unit. This is done by setting the day and time of the event and then comparing it to the current date and time.
  • Page 105 Revision 1.1 WebSwitch™ Users Manual Extvar1 can be set and cleared by entering the following requests into a web browser or by configuring on and off buttons to appear on the control page for extvar0: http://192.168.1.2/state.xml?extvar1=1 http://192.168.1.2/state.xml?extvar1=0 Testing and Debugging: Note that a copy of the BASIC interpreter for Windows is also available on our website for the use of testing and debugging.
  • Page 106: Appendix H: Specifications

    Revision 1.1 WebSwitch™ Users Manual Appendix H: Specifications Power Requirements: ━ Input Voltage: 100-240V AC ━ Input Frequency: 47-63Hz ━ Input Connector: IEC Appliance Connector (C14 Male) ━ Max Input Current: 10A (DO NOT USE WEBSWITCH TO CONTROL MORE THAN 10 AMPS) Outlets: ━...
  • Page 107 Revision 1.1 WebSwitch™ Users Manual Real-Time Clock (Model XRDI-WS3P only): ━ Manual or NTP (Network Time Protocol) setup ━ NTP Sync Period: Once, Daily, Weekly, On Power-up ━ Automatic Daylight Savings Adjustment ━ Battery (capacitor) Power Backup Capacitor Power Backup (Model XRDI-WS3P only): ━...
  • Page 108 Revision 1.1 WebSwitch™ Users Manual Regulatory Compliance: ━ Electromagnetic Compliance: ━ IEC CISPR 22, CISPR 24 ━ FCC 47CFR15 ━ EU EN55024, EN55022 ━ EN55022:2006: Class B ━ EN61000-3-2 ━ EN61000-3-3 ━ EN55024:2006 ━ IEC 61000-4-2 ━ IEC 61000-4-3 ━ IEC 61000-4-4 ━...
  • Page 109: Appendix I: Mechanical Information

    Revision 1.1 WebSwitch™ Users Manual Appendix I: Mechanical Information Xytronix Research & Design, Inc.

This manual is also suitable for:

Webswitch xrdi-ws3p

Table of Contents