Page 2
X-600M User Manual Revisions Revision Description Initial release Changed Assign a Temporary IP Address example from Windows-XP to Windows-8 Added information about new Application Specific component type and Custom Web Page component type. Added information about new I/O Types: indoorTemp, outdoorTemp, indoorHumidity, coolRelay, heatRelay, and fanRelay (all found on the X-300 in thermostat mode.)
With the X-600M you can bypass all of this work. The X-600M comes out of the box with a web server, IP communications and working web pages. In a few minutes you can turn relays on and off, monitor analog sensors, and check the status of digital inputs.
WebRelay, WebRelay-Quad, X-310, X-320, etc. anywhere on the Internet. A family of add-on modules can be connected directly to the X-600M. Remote devices and expansion modules are added as needed to provide a customizable and highly flexible monitoring and control system.
Page 9
Automatically switch from weekday to weekend or holiday schedules. Logging Periodic and event based logging of any of the I/O configured on the X-600M is possible. Up to 5 separate log files can be created and stored either internally or externally on a USB flash drive.
X-600M a very powerful, yet simple controller. You can use the X-600M to control motors, lights, coils, pumps, valves, bells, etc. You can also use it to monitor alarms sensors, switches, fluid level switches, battery voltage, temperature, humidity, and much more.
Introduction 1.3 Accessing X-600M The X-600M has a built-in web server that 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. The configuration is simple to setup, simple to use, and can be accessed from just about any computer or smart phone.
This authentication takes place over an encrypted connection when using HTTPS. The simplicity of the X-600M makes it an inherently secure device. Nevertheless, as with any device installed on a network, appropriate security precautions should be observed. If the X-600M is installed on the Internet, it is recommended that the device only be accessed using HTTPS so that all communication with the device is encrypted.
Page 13
X-600M Users Manual Introduction Expansion Modules and Accessories www.ControlByWeb.com for an up-to-date list of available expansion modules and accessories. Expansion Module Description Part Number X-11s 2-Relay module, Form C (SPDT), 20Amp, 277VAC, X-11s with mating connector X-12s 8-Relay module, Form C (SPST), 2.5-Amp, 120VAC, with...
2.2.2 DIN-Rail Mounting Attach the X-600M to the DIN-Rail by hooking the top hook on the back of the enclosure to the DIN-Rail and then snap the bottom hook into place. To remove the X-600M from the DIN-Rail, use a flat-head screwdriver.
● See Appendix I for wire size and connector terminal torque specifications 2.3.2 Power Supply Connections X-600M requires power for its internal logic circuits. Power is provided by connecting a 9 to 28 VDC power supply to the Vin+ and Vin- terminals. A regulated power supply is recommended, verify that the power supply is rated for the operating current of the X-600M (See Appendix I: Specifications for current requirements.) Multiple X-600M units may be connected to a single power supply by connecting...
Installation and Wiring X-600M Users Manual when connected to the X-600M. The X-600M would be able to support up to 16 modules under this configuration (16 X 105mA = 1.68A). This example is workable because the expansion bus load current is less than 1.70 Amps.
Installation and Wiring 2.3.5 Optional Power Injector As described in Section 2.3.2 above, the expansion modules draw their power from the X-600M thru the expansion bus ribbon cable. The X-600M can provide up to 1.7 Amps for powering the attached expansion modules.
Page 18
• Due to the broad range of applications and environments where the X-600M may be employed, successful installations of long sensor runs may vary significantly. Cat 5 and Cat 5e network cable have proven to be an effective and low-cost solution for long runs. Other cable types can be used, but cable capacitance may limit the length.
Ethernet port on a computer by using a standard Ethernet cable (crossover cable not necessary). The X-600M can be used on a wireless network by making a connection through an Ethernet bridge or a wireless router. The X-600M also works with an 802.11b/g/n USB wireless adapter (see section 3.2 for supported wireless USB adapters).
3.1.1 Method 1: Use DHCP and NetBios This option can be used on a new X-600M. For this to work, the X-600M needs to be installed on a network which has a DHCP server. Most routers have a DHCP server installed and enabled by default.
3.1.2 Method 2: Assign a Temporary IP Address to the Configuration Computer If the first option above is not used, you can use this option to communicate with the X-600M. By default, the X-600M comes from the factory with an IP address of 192.168.1.2. Communication with the X-600M may be established by assigning an IP address to the configuration computer such that it is on the same network as the X-600M (for example, the configuration computer could be assigned to 192.168.1.50)
Page 22
Configuration and Setup X-600M Users Manual 5. Click or touch Change adapter settings 6. Your machine may have more than one Internet connection shown. Right click on the adapter for your connection to the internet. A drop down box will appear, choose Properties to view/edit the settings for this internet connection.
Page 23
8. If “Use the following IP address” is already selected, the computer has been setup with a static IP address. Record these values so that the current IP address of the computer can be restored once the IP address of the X-600M has been successfully changed. Xytronix Research & Design, Inc.
Page 24
(For example: http://192.168.1.2/setup.html) Note: If the setup pages are not accessible, verify that the X-600M is powered on and that the LINK light is illuminated. Check all network connections and settings. Another way to check communications is to ping the X-600M from the command prompt by typing: ping [ipaddress] (e.g.
Access Point connectivity the X-600M must have been previously configured to connect to a wireless access point. For a new device you must access the X-600M using the Ad-Hoc mode or one of the wired access methods described in the previous section. After establishing a temporary wired connection, to configure an Access Point connection, select ▼Access Point from the drop-down menu in the...
These browsers include Internet Explorer 9 and above, and latest versions of Chrome, Firefox and Safari. If configuring the X-600M on a mobile device make sure to use a web browser that supports pop-up windows. Once the X-600M is configured, the Dashboards are viewable by all modern web browsers on mobile devices.
Page 27
Devices have inputs and outputs. Before the inputs and outputs can be monitored or controlled they must be entered into the X-600M's database. This is done with the I/O tab. You add I/O objects to the I/O list one by one. To add an I/O, click on the I/O tab in the left hand menu to see a list of all available I/O types based on the devices that have already been configured in step 2.
ControlByWeb Ethernet devices (on the same sub-net) and also for of any expansion modules connected to the X-600M via the ribbon cable connector. It can also automatically create a dashboard web page and populate it with all of the resources (components) supported by the Ethernet devices and expansion modules.
Page 29
Create Device Widget check box (This will display the status of the I/O on the Dashboard). Click Add Checked I/O to submit these changes. 4. Click Commit Changes - Once clicked, the X-600M begins to monitor the newly added device. Note: You can make changes to multiple pages before you need to Commit Changes.
5. On the main menu, click the View Dashboards menu tab. The View Dashboards page shows a display similar to what users will see when accessing the X-600M's control page. Use this page to test and debug the dashboards, panels, widgets and components in real time. A pull-down menu allows access to other dashboards.
3.7.1 Access Groups The X-600M supports five different access groups. All groups can be configured as a Read Only group or Read Writable group. Read Only groups allow monitoring of I/O only. Read Writable groups allow Xytronix Research &...
Page 32
Only I/O that belong to this group can be controlled by older ControlByWeb products. The X-600M can support up to 30 individual user accounts. Each user is assigned a name and password, and can be assigned to one or more access groups. Users assigned to a group will have the access privileges of that group.
Each of the tabs are explained the following sections. 4.1 System Tab The Overview page displays basic information about the X-600M module and its operating system. Note the Serial Number is the same as the MAC address for the wired Ethernet adapter. The Up Time is the elapsed time since the last system reset.
The image above depicts a scenario where 3 access groups are being used. There are 6 users configured on the X-600M and 7 relays. To determine if a user has access to one or more of the relays examine the access group. (depicted as a circle). The 3 users in the Admin access group, Mark, John, and Sara, have access to any relay also found in the Admin group: relay 1, relay 2, relay 3, and relay4.
CBW group. This means in this example that a ControlByWeb device that is configured to control a remote relay on the X-600M, can only control relay 3, relay 4, relay 6, or relay 7.
Page 36
Setup Pages X-600M Users Manual Full Name: This is a simple description of the user account for documentation purposes. Email: The email address for this user. Username: This is the user name for this user account (used for logging in).
X-600M uses the date and time for scheduled events, such as turning relays on or off at scheduled times, as well as for logging (a time stamp is included with each logged event). The X-600M has a capacitor backed real-time-clock circuit that will keep track of time for several weeks in the event of a power failure.
Page 38
3.pool.ntp.org NTP Sync Interval: This setting allows the user to specify how often the time on the X-600M will be synchronized with the time server. When the Submit button on this page is pressed, the X-600M will immediately Page 36...
This is an effort to conserve energy by making the daylight last longer into the evening hours. If this option is set to Enabled, the time on X-600M will automatically be shifted forward by one hour between the DST Start date and time and the DST End date and time.
X-600M when the certificate is made and is intended to never be accessed outside of the X-600M. The private key will be used to decrypt data that has been encrypted by the public key in the remote web browser. Conversely, the public key is needed to decrypt data the X-600M encrypts with the private key.
Full organizational unit name. This is less important and can be something simple. (e.g. IT) Common Name: This is the domain name you will be accessing the X-600M from. If this does not match what is placed in the browser when accessing the X-600M, your web browser will return a warning. (e.g.
Signing Request (CSR) as well as the signed certificate. Most CA's will have you copy and paste the CSR from the X-600M web pages directly in to their web site. Once the CSR and the other information requested by the CA have been submitted, the CA will generate and digitally sign a certificate.
Page 43
X-600M Users Manual Setup Pages Clicking on a file's name will cause the file to be immediately opened by your browser in a new tab. The Edit button opens a simple, web-based text editor which allows you to edit the contents of HTML, CSS, JS, and other similar ASCII files.
X-600M Users Manual To download a file from the X-600M to your PC, click a file's Download button and then Save File. To upload a file(s) from your PC to the X-600M, click Browse/Choose Files, select the file(s) to upload, then click Upload.
If you have changed the IP address the X-600M will no longer respond to the current IP address. Use DHCP: This option allows DHCP to be enabled or disabled. If this option is set to Yes, the X-600M will wait Xytronix Research & Design, Inc. Page 43...
Page 46
IP Address: Enter the IP address for the X-600M in this field. The IP address is specific to the network where the X-600M will be installed, and must be obtained from the network administrator. The default setting for this field is 192.168.1.2. If the IP address is changed, remember to press Submit and then Commit Changes as explained above.
This option sets the speed of the Ethernet port - either 10 Mbps or 100 Mbps. The 100 Mbps option offers faster communications but the amount of data to and from the X-600M is so small that users will not likely notice much (if any) difference between that and 10 Mbps. The default setting for this field is 100 Mbps.
Page 48
Use DHCP: This option allows DHCP to be enabled or disabled. If this option is set to Yes, X-600M will attempt to obtain an ip address from the access point each time it is powered. The default setting is No (this is recommended for most installations).
Alternate DNS: This field is used to specify the IP address of a secondary DNS server. This is used when X-600M requires DNS services and the preferred DNS server is not available. Note: This is the same DNS setting found on the Ethernet setup page.
If the check box is set, the X-600M will use big-endian format, and the most significant 16-bit word (big end) is sent first. If the box is cleared, then the X-600M will use little- endian format, and the least significant word (little end) is sent first. The default setting for this box is little-endian.
Page 51
X-600M. Before the device can communicate with the X-600M, it needs to be added to the device list on the X- 600M under the Device menu page on the X-600M, and it's Ethernet Comm. Type must be set to Remote Services.
Page 52
This field specifies the periodic interval in which the X-600M attempts to connect to the remote server, or if the X-600M is already connected, it is the interval in which the X-600M sends the connection string. This field can be set within the range of 1 to 34452 minutes. The default setting for this field is 1 minute.
Page 53
600M using an SNMP manager. SNMP Enabled: When this option is set to Yes, the X-600M will support SNMP. The default setting for this option is No. (See Appendix F: SNMP Requests, Objects and Security for more information.) Host Name: This is the address of the machine where the SNMP manager software is running.
4.2.3.6 Network > Advanced Network > Email (Configure Email (smtp) settings) The X-600M can send Email alerts based on any sensor or input conditions, such as temperature, time, frequency, digital inputs, power supply levels, and more. It can send text messages to a cell phone through a wireless carrier's Email bridge.
4.2.3.7 Network > Advanced Network > FTP (Configure FTP settings) The X-600M can be configured to upload log files to an FTP server. The X-600M functions as an FTP client (not a server). FTP settings are configured here.
Page 56
Setup Pages X-600M Users Manual allow the X-600M to be accessed through a web browser using a human readable name instead of an IP address. This name is only valid on the local network. NetBIOS is used with computers running Windows OS.
WebRelay-Quad, X-310, X-320, etc. These devices can be located anywhere in the world that is connected to the Internet. The X-600M does not have any built in I/O, but local I/O can be added by adding devices to the expansion bus and universal serial bus (USB). Currently these devices include the X-11s (2-Relay), X-12s (8-Relay), X-13s (Thermocouple), X-15s (8-Digital Input), X-16s (8-Analog Input) and X-17s (4-Relay 4-Digital Input), and USB to Serial Port adapters using FTDI chips.
Page 58
Serial Number: The serial number for the ControlByWeb device. When the Ethernet Communication Type for the device is Remote Services, the X-600M uses the serial number to communicate with the device. Address: For Ethernet-enabled devices, this field holds either the IP address of the device, or a fully qualified domain name.
By selecting IP Address, the X-600M will connect directly to the device. By selecting Remote Services, the X-600M will wait for the remote device to connect to it. For this to work, the remote services server needs to be enabled on the X-600M, and the remote device needs to configure remote services to connect to the X-600M.
Temperatures, Indoor Humidities, and Outdoor Temperatures. There is a special serial port I/O type that is available when a USB to serial port converter is connected to the X-600M. There is also a special I/O type for irrigation valves found on the SmartStorm X-340 which mimics the behavior of the irrigation valves on the X-340 (Timer countdown, etc.).
Page 61
X-600M Users Manual Setup Pages To add I/O, first select the type of I/O from the side menu. Then select Add [I/O Type] in the top right hand corner of the window. The following window (or one similar) will appear. The following images show how to add a relay.
Page 62
This setting is only available for devices with relays and for WebSwitch outlets. This setting determines the initial state of relays when the X-600M first turns on. The options are Off, On, and Last State. Off, and On are self explanatory, the Last State option allows the relay to be set to the state it was in before it lost power.
X-600M itself. To add a 1-wire sensor connected directly to the X-600M, click the Add New 1-Wire Sensor icon. Up to 32, 1-wire sensors can be connected to the X-600M (the “1-wire” sensors share the same data, power and ground conductors) and are accessed using a unique hardware address. Similar to other I/O objects, you will want to rename these objects to more useful names such as “outdoorTemp”.
Page 64
To configure a new 1-wire sensor you must identify which sensor on the bus you wish to add. This is done by clicking the Scan 1-Wire Bus button. The X-600M will initiate a roll-call procedure to discover all of the sensors on the bus. With the pull-down menu you can view all of the sensors discovered on the bus.
X-600M Users Manual Setup Pages Access Groups: This determines to which access groups this I/O belongs. Only users that belong to the same access group will have access to this I/O when Dashboard and I/O Password Protection is enabled. If the 1-Wire sensor is found on another device, a similar set of options will be presented. For these sensors an 1-Wire sensor address will not need to be defined, but the units for the remote sensor will.
Page 66
Setup Pages X-600M Users Manual Name: This is the name of the register. Names are short (20 character max) identifiers that are used in Lua scripts to reference Registers. They may not contain spaces or special characters. Names must begin with a lowercase letter.
Serial port adapters can be connected directly to the X-600M's USB A-Type connector. Once connected, these adapters appear to the X-600M as devices and the serial ports appear as I/O. Once configured, the serial ports can be accessed by their name in the Lua scripts just like other I/O. There are special Lua functions built into the X-600M to read and write to the serial ports.
Page 68
The default baud rate of the serial port when the X-600M powers on. Data bits: The default number of data bits the serial port will use when the X-600M powers on. Stop bits: The default number of stop bits the serial port will use when the X-600M powers on.
Page 69
X-600M Users Manual Setup Pages The type of flow control the serial port uses when the X-600M powers on. Access Groups: What access groups have access to the serial port through the dashboards. Xytronix Research & Design, Inc. Page 67...
X-600M Users Manual 4.5 Control/Logic Tab In addition to displaying data, the X-600M can execute logic and control actions. These settings are made under the Control/Logic menu tab. With the X-600M control logic it is important to understand the distinction between Events and Actions.
X-600M Users Manual Setup Pages Name: This is the name of the conditional event. Description: This is a simple description of the conditional event for documentation purposes. Type: Digital Analog Complex Select Digital if the conditional event can be done with a Boolean (logic) operation (On, Off, Etc).
Setup Pages X-600M Users Manual I/O: The I/O object that triggers the event. Condition: On: Test the I/O object to be True Off: Test the I/O object to be False Changes State: Test the I/O object for a change of state Equals: Test the I/O object to match the state of another I/O object 4.5.1.2 Analog Event...
X-600M Users Manual Setup Pages When you click Add, the expression is checked for correct syntax. If an error occurs, the first error will be highlighted. You will not be able to add an expression with faulty syntax. You will notice that a Lua expression might already exist.
Page 74
Setup Pages X-600M Users Manual Name: This is the name of the calendar event. Page 72 Xytronix Research & Design, Inc.
Page 75
X-600M Users Manual Setup Pages Description: This is a simple description of the conditional event for documentation purposes. Event Group: Events can be grouped together. Select here which event group this event should belong to. Event groups can be Enabled and Disabled. When an event group is disabled, all events belong to that group will stop being evaluated until the event group is enabled again.
Page 76
Setup Pages X-600M Users Manual There are nine options given. If this event instance belonged to event group 1, there would only be six options since event group 1 cannot be disabled. In this example, the event belongs to event group 2 which can be disabled.
X-600M Users Manual Setup Pages Disable Event Group 2 (August 31 Every Year) This option will disable event group 2 every year on August 31 for the entire day. This is useful for holidays that occur on a day of the month every year. (New Year's Day for example occurs on January ) Any other event belonging to event group 2 (colored red) will also be disabled on this day.
Page 78
Setup Pages X-600M Users Manual Name: This is a unique user-assigned designator for this Action. This name appears in the action list. Description: This is a simple description of what the action does for documentation purposes. Type: This setting controls what an Action does. The selection options include: Page 76 Xytronix Research &...
Page 79
To display the current value of a register or I/O in the email subject, or body, enter [io.ioName] or [reg.regName] into the field. When the X-600M parses the email it looks for io and register names surround by square brackets and replaces them with the actual value of the I/O or register.
1.5-Kbytes. Scripts Lua Scripts can run continuously in the background if designed to do so. The X-600M can run up to five Lua scripts concurrently. Each script can be up to 8-Kbytes. Scripts generally poll inputs, make logic decisions and control outputs.
Page 81
X-600M Users Manual Setup Pages feature is always disabled after committing settings. It can be enabled/disabled from the Debug Console or programmatically in the Lua scripts. The print function will output text to this Debug Console when it is enabled. The Debug Console can hold up to 20Kbytes of text before it will automatically erase itself.
Page 82
To cause the script to run continually, it must contain an all encompassing loop, otherwise when the X-600M first turns on the script will run to completion and then end. Scripts can be up to 8K in length.
Page 83
X-600M Users Manual Setup Pages prevCount1 = io.counter1 if prevCount2 ~= io.counter2 then warningFlag = 2 prevCount2 = io.counter2 if prevCount3 ~= io.counter3 then warningFlag = 3 prevCount3 = io.counter3 if prevCount4 ~= io.counter4 then warningFlag = 4 prevCount4 = io.counter4 if (reg.emailSent ~= 1) and (warningFlag ~= 0) then...
4.6 Logging Tab The X-600M can log up to 5 separate data log files, each with different data and log intervals. The logged data is stored in internal flash memory or an external USB Flash drive. Internal files can be up to 20MB, external (USB Flash drive) files can be 4GB in size when the drive is formatted with the FAT32 file system.
Page 85
X-600M Users Manual Setup Pages Name: This is the file name to be used for the logged data. Description: A short description of the log file and the information contained within. The description will appear at the top of the logX.txt files.
Page 86
Enabled or disable periodic uploading of the log file to an FTP server. When enabled, the log file will be uploaded to a FTP server periodically. When the log file is successfully uploaded, it is erased from the X-600M. The FTP server settings are configured on the FTP page under Network > Advanced Network > FTP.
Dashboards. Each Dashboard behaves like a separate web page. The X-600M has no built-in relays or inputs. As such, you can configure the dashboards for your specific application with a mix of ControlByWeb devices and X-600 series expansion modules. The Edit Dashboards menu tab has many tools you will need for creating professional and functional web pages without needing HTML, Javascript or other programming skills.
Only users who are members of the same Access Groups will be able to view this dashboard. This setting is the easiest method of controlling access to features of the X-600M. Perhaps one Dashboard allows the temperature setting of a thermostat to be adjusted between 72 and 75°F.
Within Panels, you place one or more Widgets. Widgets are framed boxes which represent more specific groups of controls and sensors. Widgets allow the X-600M's web pages to have dynamic content. To add a new Widget to a Panel, Click the “+” icon on the Panel title bar.
Page 90
Setup Pages X-600M Users Manual Title: The title of the widget will appear in the upper left-hand corner of the widget. Name: A unique identifying name for the widget that will be used when updating the widget's component(s) states. This field must also begin with a lowercase letter and contain only alphanumeric characters.
X-600M Users Manual Setup Pages Once you have created a Widget, click on its title bar and drag it to re-arrange its position. Click the Edit icon in the widget title bar to edit the widget. Click on the Trash icon to delete the widget along with all of its components.
Page 92
Setup Pages X-600M Users Manual Seven different Components are available and are shown below together with their respective Edit Component settings. You have tremendous flexibility in how the components appear and work. It's best to keep the components simple. Use appropriate colors and choose descriptive labels and field titles.
Page 93
When determining the color to use for the background, the X-600M checks the state of each event source specified starting with Event Source 1 and working down to Event Source 4. The last event source to evaluate to true takes precedence.
Page 94
Setup Pages X-600M Users Manual Graph The Graph component allows logged data to be displayed in a graph inside a widget. Select the log file to use as the data source, and the time zone to use when displaying the graph. Select the width of the graph (auto, or a number of pixels), and a height (also in pixels).
Page 95
X-600M Users Manual Setup Pages Application Specific Component These Components are application specific components that is only useful for certain ControlByWeb devices such as the X-300 in thermostat mode. Thermostat (X-300) The Thermostat (X-300) component allows interaction with the X-300 thermostat in a manner similar to that found on the X-300 itself.
Page 96
Setup Pages X-600M Users Manual Weather Station (X-320M) The Weather Station (X-320M) component allows interaction with the X-320M weather station in a manner similar to that found on the X-320M itself. The only option for this component is the Data Source.
Page 97
X-600M Users Manual Setup Pages SmartStorm Irrigation Controller (X-340) The SmartStorm Irrigation Controller (X-340) component allows interaction with the X-340 irrigation controller in a manner similar to that found on the X-340 itself. The only option for this component is the Data Source.
Page 98
This component is useful for embedding ip camera live feeds among other things. Custom web pages loaded into the X-600M can be used as well as web pages from remote servers. An example url for embedding a ip camer live feed might look something like: http://username:password@192.168.1.90/video.cgi?
Page 99
X-600M Users Manual Setup Pages Xytronix Research & Design, Inc. Page 97...
The View Dashboards menu tab presents a display similar to what users will normally see when accessing the X-600M. Use this page to test and debug the dashboards, panels, widgets and components in real time. Experiment with and test the buttons, sliders and data entry boxes. With this menu tab you don't need to hop back and forth between http://192.168.1.2/setup.html...
502 (configurable under Network > Advanced Network > Modbus menu tab) and then send requests to read or set relay states, read input states, or sensor values. When the X-600M receives a command, it will perform the desired function and return a response.
See address table Regsiters The X-600M has two TCP sockets available for Modbus/TCP. This allows two connections to be open at one time. Requests for more than two open connections will be rejected. When an error occurs, an error code is returned. Most Modbus client software will interpret this code in a human readable form.
Page 103
Function codes, memory types, and addresses can be converted to the PLC addressing equivalent using the table below. To use the table, look up the row corresponding to the Modbus function code. Then take the desired X-600M feature address and add to it the address offset in the PLC address mode column:...
Response The X-600M will respond to the request with a data field of one byte, each bit representing the coil status. A '1' indicates the Output is ON. A '0' indicates that the Output is OFF.
X-600M Users Manual Modbus Operation 5.3.2 Read Discrete Inputs – Modbus Function Code 02 (0x02) This function returns the state of the digital inputs. Request Start Address: 0x0000 (input1) to 0x00FF (Input 255) Input Quantity: 0x0001 to 0x00FF Response The input states are indicated by bits one and two of the status byte. A 1 indicates that the input is switched high ON.
0.1, the pulse timer will be set to 0.1. If any commands are sent to the X-600M (e.g. Modbus, XML, SNMP, or HTML) before the pulse timer has expired, the pulse timer will be canceled immediately and the new command will be executed.
X-600M Users Manual Section 6: XML/JSON Operation Custom applications may be created to monitor and control the X-600M. This method does not require a web browser. There are two types of files used to control and monitor the I/O previously configured on the X-600M.
These are state.xml and state.json. These files behave like those found on other ControlByWeb devices. The status of all the I/O configured on the X-600M will appear in these files when requested as well as the current time on the X-600M.
Page 110
Relay State Control To control a relay or other I/Os on the X-600M you need to know the name assigned to the relay or I/O. For example, if a relay has been registered with the X-600M and given the name doorLock, then we could energize the relay by issuing the following command: http://192.168.1.2/state.xml?doorLockState=1...
Temperature sensor 1 currently reads [io.owSensor1] and register1 reads [reg.register1]. When the X-600M goes to send an email, it will first parse through the body of the email and replace [io.owSensor1] with the current reading of that sensor. So, when received, the message would would read: Temperature sensor 1 currently reads 80.5 and register1 reads 100.
Page 112
Email Notification X-600M Users Manual Server Port: The port number of the SMTP server. This is generally 25 for non encrypted SMTP servers. If using SSL/TLS, this port number is generally 465. If using STARTTLS, this port number is generally 587.
Appendix A: Restoring Factory Default Settings In the event that the IP address or passwords are forgotten, the X-600M may be restored to its original factory default settings. The restore process restores the IP address to 192.168.1.2, the default admin user name to admin and the password to webrelay.
Appendix B: Installing New Firmware From time to time, updates and bug fixes are made to the X-600M firmware. The X-600M firmware can be updated in the field. Xytronix recommends that new firmware be installed only if there is a specific reason to do so.
Page 115
Firmware Update Utility will indicate if the process was successful, or if it failed. If it failed, turn off the X-600M, restart the update utility, press and hold the firmware update button and power- up the X-600M again. The update process will automatically begin again.
Page 116
Appendix B: Installing New Firmware X-600M Users Manual Page 114 Xytronix Research & Design, Inc.
600M can be accessed on the local network, almost all of the settings required to provide remote access are in the router and not in the X-600M. This guide is not meant to be a tutorial in router setup, but rather to provide a basic overview of remote access.
Page 118
Appendix C: Accessing X-600M Over the Internet X-600M Users Manual Simple 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.
Page 119
192.168.1.26 for WebRelay would be associated with port 8001. The X-600M would be accessed from the Internet by entering the public IP address of the router, plus the port number assigned to the X-600M in the URL window of the web browser: http://266.70.164.97:8000...
Page 120
For example, to access the setup pages when the port is set to 8000, the following command would be used: http://192.168.1.25:8000/setup.html To access the ControlByWeb devices from the Internet, enter the public IP address of the router plus the port number of the desired device in the following format: http://(Public IP Address of Router):(Port Number of Device)/setup.html Using the example above, the following line would be used to access the setup page of X-600M: http://266.70.164.97:8000/setup.html...
Appendix D: Log Files The X-600M logs general I/O data in up to five different log files. System information is logged to a special log file that can be viewed on the System > System Log menu tab. Log files are text files and are stored in nonvolatile memory;...
Page 122
SQLite Manager (A Mozilla Firefox add-on extension) When viewing an internal or external log file through the X-600M web interface, the log will be converted to a *.txt file. The format is a comma separated file (like a .csv file) which is easily read or modified by text editors or spreadsheet programs.
This method is ideal when the web server and all of the X-600M devices are on the same network (without routers between them). In this case, the server can communicate with the X-600M devices directly and securely since data never has to leave the local network.
Page 124
Appendix E: External Server and Remote Services X-600M Users Manual incoming ports need to be opened in the router, security is not compromised. See section Network > Advanced Network > Remote Services Client for more information. Connection String With Remote Services enabled, a connection attempt will be made periodically according to the Connection Interval setting in the Network >...
MIB associated with it will change depending on the configuration. It is recommended to configure the X-600M in its entirety before attempting to use SNMP to access it. Once configured, the X-600M can generate an MIB file for use with SNMP management software that contains all of the I/Os, Registers, and Events found on the X-600M.
These are the io table, the register table, and the event table. The io table is indexed by the names of the I/O configured on the X-600M. To read the current state of an I/O, a Lua script can reference the io table.
Page 127
It is recommended to check the validity of I/O in Lua scripts before using it. If the I/O is not readable by the X-600M or has not been updated yet, it will read not a number (NaN). This is especially important for the five Lua scripts.
Page 128
= file.open(“/usb/filename.txt”, “a”); The third place where files can be access in LUA is an internal ram drive on the X-600M. This location is different than the other two in that files created on the ram drive will not be preserved through a power loss.
Page 129
Reading and Writing to SQLite Database Files Lua can be used to create, read, and write to SQLite database files. To achieve this, the X-600M has the LuaSQLite3 library built into the LUA interpreter. This library allows SQL queries to be run against SQLite databases, which are essentially just files.
Page 130
Appendix G: Lua Scripts X-600M Users Manual Month 1-12 Day 1-31 Year 1900 – 3000 Hour 0-23 Minute 0-59 Second 0-59 time.copy(timeTable) This function will return a copy of the time table passed to it. time.getComponents(timeTable) This function will return a table with the time in component form. The table has the following fields:...
Page 131
X-600M Users Manual Appendix G: Lua Scripts email(emailDef) The email definition table has the following fields: rcpt – the user (usr.username) or group (grp.groupname) that will receive the email. (grp.all will send an email to all users.) subj – the subject line of the email (must be a string) body –...
Page 132
The following example will turn on the first relay on the ControlByWeb device found at address 192.168.1.15 and store the state.xml file in the Lua scripts response buffer. While this example uses another ControlByWeb device, httpRequest can send requests to any web server and device.
Page 133
This function can be used to send an SNMP trap with the state of the I/O given by ioName sendTrap("io.input1") ethUp This function will return a value to indicate if the X-600M's ethernet connection is up or down. It returns 1 if the connection is up, and 0 otherwise. result = ethUp() if result == 1 then print("The ethernet connection is up")
Page 134
Appendix G: Lua Scripts X-600M Users Manual following error codes: 0 – Host did not responded -1 – Can't call tcp functions from lua expressions -11 – Error in send -13 – Bad message length. The message must be under 200 characters.
Page 135
This function will enable the debug console. The print function will output to the debug console when debugging is enabled. This is useful for debugging, but during actual use of the X-600M, debugging mode should be disabled. The debugging console is disabled whenever settings are committed.
Page 136
Each serial port has a transmit buffer that the X-600M keeps track of and a transmit buffer built into the serial port adapter. A call to this function will clear both the X-600M's transmit buffer and the transmit buffer in the serial adapter.
Page 137
X-600M Users Manual Appendix G: Lua Scripts rc = serWrite("io.serialPort1", "Hello "..counter) -- Check result, if less than 0 then something is wrong -- close the serial port, wait 5 seconds and attempt to open it again -- do this until the serial port is back up if rc <...
Page 138
Appendix G: Lua Scripts X-600M Users Manual -- loop forever while true do –- check for received bytes rc = serGetRXByteCount(“io.serialPort1”) -– if no bytes received sleep for 50 ms else echo the received bytes if rc <= 0 then...
These files are stored in a separate location from the default web pages built into the X-600M. When a web page is requested from the X-600M, it first looks to see if that web page exists as a custom web page before looking for the built in web pages.
Page 140
600M, all custom HTML files are parsed by the template engine. The X-600M uses an object oriented approach for the available {tags} that can be used in the HTML files. The following objects are available: $io, $reg, $act, $evnt, $user, and $db. To see how these objects are used inside {tags} to generate dynamic content, lets look at an example.
Page 141
To create a page that should only be visible by the user access group, you would use this for line 1: {if $user->hasAccess(2)} Line 2: Will cause the template engine to load information about all the registered I/O on the X-600M. The load function must be called for each object that is to be later used in the template.
Page 142
Appendix H: Custom Web Pages X-600M Users Manual ioName $reg load() Load the register information from settings. desc(“regName”) desc Get the description of the Register named regName units(“regName”) units Get the units of the Register named regName initVal(“regName”) initVal Get the initial value of the register.
Page 143
X-600M Users Manual Appendix H: Custom Web Pages untilType(“eventName”) untilType Does event stop after a certain number of events, or at a certain date/time, or never. dtUntil(“eventName”) dtUntil Get the date/time when the event stops forever. $user name() name Get the name of the user that is viewing the page.
Page 144
Appendix H: Custom Web Pages X-600M Users Manual beginning SEEK_CUR – offset from current file pointer SEEK_END – offset from end of file getContents(filename, offset, filename Name of file to read from. If a length) path is not give, then the file is assumed to be on the internal flash.
Page 145
To achieve this we use AJAX (Asynchronous JavaScript and XML.) This can be done by creating your own JavaScript library to request XML files from the X-600M, and then update the I/O states in the web page. Alternatively the X-600M has a built-in library for handling such things. This JavaScript library can be included in custom pages and used to update the I/O.
Page 146
71:</script> The key to updating I/O using the X-600M helper library is the function refreshIOFields that belongs to the currentPage class. This function takes 3 parameters: Filename: xml/json file to get I/O states from. In this example we use “widget1State.json.”...
Page 147
Database Error Missing Parameter The previous example showed some of the functionality given by the X-600M JavaScript library. The following table contains a list of all the classes and functions found in the library. More examples can be found on the X-600M device under the System > Custom Web Pages menu tab.
Page 148
Appendix H: Custom Web Pages X-600M Users Manual Note: Settings must be committed for this change to take effect. See db.commitSettings() below. update(id, name, luaExpr, desc, Update an action with the specified id. eventSourceID, callback) Parameters are the same as those for the add function.
Page 149
X-600M Users Manual Appendix H: Custom Web Pages dtEnd, freq, interval, byday, monthlyRepeatType, untilType, dtUntil, count, callback) Parameters are the same as those for the add function. Note: Settings must be committed for this change to take effect. See db.commitSettings() below.
Page 150
There are a couple of things that cannot be accomplished using the templating engine or the X-600M javascript helper library. These are deleting custom files and downloading custom files. To achieve this functionality, there are two special files that can be requested along with the name of the file to delete or download.
600 ft (180 m) maximum combined cable length Temperature Sensor: Dallas Semiconductor DS18B20 digital 1-wire thermometer +/-0.5°C from -10°C to +85°C Temp & Humidity Sensor: ControlByWeb X-DTHS-WM wall mount sensor +/-0.5°C from -10°C to +85°C 0-100% RH +/- 1.8% Xytronix Research & Design, Inc.
Page 152
Supports Web Browser (HTTP/HTTPS), XML, Modbus/TCP, SNMP protocols Communications Control and monitor up to 128 external ControlByWeb devices - Devices can be ControlByWeb products such as the WebRelay, WebRelay-Quad, X-310, X-320, etc., or expansion modules such as the X-11s, X-12s, X-13s, X-15s, etc.
Page 153
X-600M Users Manual Appendix I: Specifications Logging Up to 5 log files Stored internally (nonvolatile Flash) or externally (USB thumb drive) 20MB max each log file (internal storage) 4GB max each log file with external USB thumb drive formatted using FAT32.
X-600M Users Manual Appendix K: Warranty Appendix K: 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 &...
Appendix L: FCC Statement X-600M Users Manual Appendix L: 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.
The software included in this product contains copyrighted software that is licensed under both the GPL and LGPL. A copy of these licenses can be found on the X-600M's internal web page opensource.html. You may obtain the corresponding source code from us for a period of three years after our last shipment of this product by going to www.ControlByWeb.com/opensource/linux.
Need help?
Do you have a question about the X-600M and is the answer not in the manual?
Questions and answers