Creating Chat profile.

Please note that you need Slack account (free) to use the Chat features of Big5.  Detailed instructions of how to setup your FREE Slack account are provided here.

In HS3 go to Plugins –> Big5 –> Configuration

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

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

Chat provider: Only Slack is available currently.

OAuth Token: Follow the instructions to obtain one and enter it.

Channel: Follow the instructions to create Slack account and during the process you’ll name your channel that you enter here. Must be the same you created in Slack.

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, if any.

“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

${StartsWith(input,”!00)}

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. This is quite important for the Chat profile if Chat is going to be used for random human messages. 

“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 Chat input

Floor: Big5  Room: Chat Device name: MyChat

Device name ( “MyChat” in the example) matches the name of the Chat 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 Chat 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: Chat Device name: MyChat-pump

Floor: Big5  Room: Chat Device name: MyChat-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”.

Example:

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

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