Navigation
Using ASCII Data Banks to Control Additional Devices
Any serial port on a Cortexa can be set up to send specific commands to a third-party device. In this way, devices and subsystems (that do not have drivers already written in the Cortexa) can be integrated into the home automation system. This feature is referred to as an ASCII Data Bank. Simple blinds/shade controllers are a common device that can be set up using the ASCII Data Bank feature.
A few notes about integrating using the ASCII Data bank feature:
- The subsystem will need to be set up and configured outside of the Cortexa. The Cortexa will only be able to be used to trigger or possibly receive data from the subsystem.
- A copy of the protocol for the subsystem will be needed.
- The user will need to have specific information on the communication settings that the subsystem will utilize.
The Basics
All subsystems send and receive data in the form of a list of characters or numbers. Some systems use an ASCII style format for the protocol, while others will use a HEX based system (where each unit consists of 2 characters in a “base 16” system). Either way the protocol is written, the data as it goes out the serial lines is processed down to 0’s and 1’s and decoded at the subsystem interface.
With the Cortexa ASCII data bank, the primary purpose is to allow for ASCII data protocols to be included in the Cortexa. Hex Characters (which have ASCII equivalents) can also be sent out. Carriage returns (or other special characters) may sometimes be needed at the end of a line of data.
Enabling an ASCII Data Bank
The Cortexa interface allows for up to four different interfaces via the ASCII Data Bank System. Each interface is assigned a “bank number” (BANK 1-BANK 4). The label is assigned to the interface and has no bearing on the number of interfaces (if using BANK 2 alone, then select Bank #2 in additional control steps).- Identify any unused COM port on the Cortexa and plug the serial cable that runs to the serial interface of the third-party device into that port. (The onboard COM port is COM 1, COM ports on the fan cable identified as S1-S4 will be COM 21-24).
- Navigate to Setup Options > Sub-System Setup, and under ASCII Data (Bank 1, 2, 3, or 4) select the appropriate port that the third-party subsystem serial cable is plugged into.
- Specify the Baud Rate of the third-party subsystem
- Click the Button on the bottom of the screen
Sending and Receiving ASCII Data
The Cortexa should now be able to send and receive information to and from the third-party subsystem. This section describes how to specify what information is sent, and/or what information is expected. There are two main ways to set up interaction with the third-party device: 1) through an ASCII data device, or through a Cortexa event.
ASCII Data Device
An ASCII data device can be created to be able to send a specific serial command through the data bank; additionally, the device can be made to listen for a specific list of ASCII data responses on the same serial line. The data bank will need to be identified and the specific strings that need to be sent (or that are expected) will need to be known.- Navigate to Home Management > Device Manager
- Click the <Add New Device> button at the top of the screen.
- On the New Device page, select ASCII Data from the <Hardware Type> drop-down list.
- Fill in the following information as with other typical Cortexa devices:
- Description
- Room Name (drop-down for existing, or 1 to add a new room name in the field just below the drop-down)
- Icon
- Legacy Device Type (not currently utilized)
- Lighting: 2 to show under lighting
- Show this Device
- Log this Device- Select the appropriate Data Bank # from the Bank drop-down List
- If desired, enter the ASCII data in the <Send On String> and <Send Off String> field. Note the blue box that shows how to include a carriage return (\r), a new line/line feed(\n), or HEX data (\##)
- If desired, enter the ASCII data in the <Receive On String> and <Receive Off String> fields. If the ASCII data in these fields are received, then the state of the device will change to the appropriate value. (Some third-party systems only offer one way communication)
- If desired, modify the Status Text Option values for and . The strings entered here will be used instead of “On” or “Off” (only currently applies to legacy Cortexa units). For example, instead of using “On” and “Off” to describe the state of a blind, “Open” and “Closed” can be used.
- Click the < Create > button at the bottom of the page.
Before proceeding to enter other devices, test the device to make sure that the protocol is correctly implemented and that device control is functional.
Add additional devices tied into the subsystem using the same technique.
ASCII Data through an Event
Through an event macro, specific ASCII data can be sent via the serial interface to a third-party subsystem. The specific ASCII strings from the protocol will be needed.
Additionally, an ASCII string can be used as a trigger to cause a macro to begin.
Integrate ASCII data through an Event Macro
When specifying the macro action while creating an event (Home Management > Event Manager), the following steps will integrate the third-party device:- Click the <Add New Line> button (if a new line is needed)
- Click the <Edit Action> button on the new line (or of the line to be modified)
- From the Edit Macro Action Page, select the Send ASCII Data from the <Action Type> drop down menu.
- Specify the Bank # from the (ASCII data) bank drop-down menu.
- Enter the desired ASCII data string (obtained from the third-party protocol) into in the field <ASCII Data>
- Click <Save Action> to save the macro line.
- Make additional modifications to the macro to add additional controls.
Test the macro by manually triggering the event to make sure the implementation of the third-party protocol works.
ASCII data as an Event Trigger
A specific string coming through the Serial data from a third-party can be used to trigger a group of events in the Cortexa. The following steps will set up the ASCII data trigger:
- Within the Home Management > Event Manager, click the <Edit Trigger> button on an existing event or create a new event (enter an Event description and click <Add New Event>) and the click the <Edit Trigger> button.
- In the Edit Event Trigger screen, select the ASCII Data from the <Trigger Type> drop-down menu.
- Specify the Bank # from the (ASCII data) drop-down menu.
- Enter the specific ASCII command to trigger the event in the <ASCII Data:> field.
- Click <Save Trigger>
Test and trigger the event to make sure the implementation of the third-party protocol is correct.
