Creating TCP profile.

Please note the TCP profiles operate on client/server basis. If the checkbox “listening” is checked than you are creating a TCP server at HS3 machine. Otherwise your TCP profile will act as TCP client.

In HS3 go to Plugins –> Big5 –> Configuration

Scroll down to “TCP Profiles” –> “New Profile”

Name. Pick the name of the TCP profile. It will be used for all future references and for the names of HS3 devices created by Big5. We will use the name “MyTCP” in the examples below.

Hostname/IP. Enter here the address of the computer where your TCP server is running in case of an outbound TCP profile or enter the IP address of your HS3 machine if you are setting Inbound (“listening”) profile. Examples: or (do not enter port number here. there is another box for that)

Port: Enter unique port number that is not used by anything else on your HS3 server for inbound (“listening” ) profile. Enter the port number of the remote TCP server if you are setting up an outbound TCP profile.

Listen mode: If this box is checked than you are creating TCP server at HS3 machine. Otherwise your Big5 profile will act as TCP client. See a special note about listening mode at the bottom of this page.

Big5 uses Regular Expressions (or RegEx) for many of it’s advanced functions.  While the full theory of RegEx is quite complex, only a small subset is needed for the practical purposes of home automation, HomeSeer and Big5. Practical examples of most frequently needed RegEx are shown at the bottom of Big5 –> Configuration page. Again you can use Big5 happily without ever needing to touch any RegEx, but they are there for the tough cases when your devices generate information that is tough to tackle otherwise. Please note that all fields are “optional” that use RegEx. Last but not least at the bottom of the Big5 –> Configration page you’ll find RegEx sandbox where you can try RegEx before you use them (highly recommended).

Training: Try some of the examples shown at the bottom of the page in the sandbox to get your hands dirty.

“Locked” if checked it will prevent Big5 from creating new HS3 devices, however Big5 will update HS3 devices, previously created.

“Device create expression” is a logical Regular Expression (result is true or false) that if true will allow the creation of a new HS3 devices by Big5. If false than no new HS3 will be created.
This field was renamed “Device affect expression” effective version 1.28 and higher. We’ve made changes to this filter to filter unwanted input not just when Big5 creates HS3 devices but also when Big5 updates devices.

Example: All of the examples below are from Pentair Pool control

All responses by Pentair pool start with !00. This explains the RegEx used for Device Create Expression


Training: Go to the sandbox at the  botom of Big5–>Configuration and enter the above RegEx. Also enter this string in the input field

!00 pump=1

and see the result. Must be true. Now enter this string as an input

“Error. Interface Busy.”

The result will be false.

This example shows you how Big5 creates/updates real HS3 devices based on useful information and ignores other information that may not be useful to you.

Both “Locked” and “Device create expression” are designed to prevent a glut of HS3 devices being created by “noise” and “gibberish” that sometimes happen over communication lines. TCP is less prone to it than Serial RS232 but we kept these fields for the sake of uniformity across all protocols.

“Device name expression.”  This optional box contains RegEx used to determine the name(s) of HS3 devices that Big5 creates. If left blank than Big5 will create only one HS3 device upon receiving TCP input

Floor: Big5  Room: TCP Device name: MyTCP

Device name ( “MyTCP” in the example) matches the name of the TCP profile see above.

If our pool however has several pumps and features than one HS3 device won’t do it. This is when device name expression comes handy.

Example: Let’s assume that the pool has Pump and SPA that report their status 1 (on) or 0 (off) by sending this info over the TCP interface

!00 pump=1

!00 spa=0

The RegEx that will retrieve the names pump and spa respectively will look like this

${Split(Split(input, “=”)[0],” “)[1]}

As we said before RegEx could be quite complex but we are using simple ones in Big5. The above RegEx can be interpreted easily. You first split the input at “=” and take the first part which will be “!00 pump”. Than you split this part again this time by the space ” ” and get the second part “pump”.

Please note that the counting always start from 0 at RegEx. So if you need the first part than you specify [0].

Training: Try this RegEx with the above two input data in the sandbox at the bottom of Big5–>Configuration page. 

The above example will produce names “pump” and “spa” respectively and will create/update the following two HS3 devices

Floor: Big5  Room: TCP Device name: MyTCP-pump

Floor: Big5  Room: TCP Device name: MyTCP-spa

“Device value expression” This optional box can be left empty. It it is left empty Big5 will still create a single HS3 device (see above) and the received information will be put as a device string in the same HS3 device. If it happens to be a number it will show also as the device value in HS3. If the input information is of more complex nature and contains letters and numbers and if only specific numbers are of interest than you use “device value expression”.

Example: Let’s get the values for the devices we’ve created in the above example.

We will use this RegEx

${Numbers( Split(input, “=”)[1] )[0]}

for getting the numerical values from these inputs and put them as values in the HS3 devices

!00 pump=1

!00 spa=0

The RegEx splits along the “=” and takes the second part and than the first number of this second part.

As a result of such operation Big5 will put values 1 and 0 in the devices named Pool-pump and Pool-spa respectively. Each time the pool controller sends updated input the values will change within the HS3 devices automatically. No action needed no HS3 events are needed.

IMPORTANT ! Please note that ${ } are stripped from the RegEx when entered in the last two boxes “Device name creation” and “Device value creation”.


RegEx: ${Numbers( Split(input, “=”)[1] )[0]}

Entry in the box: Numbers( Split(input, “=”)[1] )[0]

Note about “listening mode” : When sending a message to a listening TCP profile, the message is sent to all external clients that have connected in to that TCP profile. Since this TCP server is generic, there is no ‘ping’ message sent regularly to clients who have connected in – which in practice means that routers and/or NAT gateways between this server and the client(s) might silently drop the connection due to inactivity. If incoming persistent connections are dropped after minutes of inactivity, explore the possibility of sending messages on a ca. 30 seconds interval. 

 Update: Effective version 1.28 and later a new check box was added to the TCP profile called “persistent”. If this box is unchecked than Big5 will drop (disconnect) the TCP connection to a remote TCP server immediately after sending out the information per Big5 action request. This will prevent Big5 getting back a response from the server (if any). If you do not expect a response from the server than it is wise to keep this box unchecked to minimize the number of active TCP connections. Check the box if you want Big5 to hold the connection and wait for a response.