Home Control Assistant Newsletter for Jan 5

Have you looked over the version 16 release notes? Lots of changes that you can incorporate into your designs right away.

And if you are looking for answers to the most common questions about HCA check out our
Frequently Asked Questions page.

Want to read messages from past weeks? Here you go.

Version 16

In case you missed it, HCA version 16 was released in October. There are two big reasons to upgrade to this new version. First there are a lot of
new features and a lot of stability improvements that make things go better and faster even if you make no changes in your design. Take a look at the release notes and you can see all the changes. Let me highlight two reasons to upgrade.

First, over the years we have had a lot of requests for ZWave and Zigbee device support. These wireless devices have their pluses and minuses and some people really like them. If this is what you are looking for, then you should look into
Samsung SmartThings and Hubitat Elevation. Both offer hubs that provide the interface that HCA needs to talk to these kinds of devices.

The second big reason to upgrade is that you have a lot of time invested in HCA and by upgrading, at a nominal cost, you support the company that keeps this software going year after year. A few weeks back the HCA Cloud got caught up in a bit of a squall when our hosting company came under attack. While it was nothing to do with HCA, our team was there over the weekend and sorted it out within a day.
Upgrade now to keep this level of support going.
SmartThings & Hubitat

You may be getting a bit tired of me focusing again on these two new interfaces, but if you haven’t investigated them you really should not wait any longer. In my own home I use UPB and I work closely with several users who are all Insteon. While these power line technologies are great there are so many things that they just aren’t very good at or lack completely. Yes, there are Insteon door and window sensors, but their range and features aren’t great. And no, there aren’t any directly compatible UPB motion sensors.

This new generation of wireless devices that both SmartThings and Hubitat support are excellent. The door sensor detects not only open and close but someone knocking on the door and provides a remote reading of the battery level and temperature.

And I have some good news if you looked at Hubitat and didn’t take it up because it didn’t support two-way operation. There is now an update to the Hubitat “Maker API” that lets it send events to HCA. I have updated the Hubitat technical note and uploaded a new version of the Hubitat package to the library. If you are a SmartThings user there have been improvements as well to its technical note, and a new package uploaded to the library.

And these are not expensive technologies. The Hubitat hub is about $80. And the SmartThings hub plus some sensors sells for about $100. All at Alexa’s favorite online retailer.

One word of caution: The changes outlined in the SmartThings and Hubitat technical notes require some changes in a not-quite-released version of HCA: 16.0.30. If you want a pre-release of that just drop me a note. I expect it will be released “officially” within about a week.

How to?
Several messages ago I wrote about a user who was doing something smart with their design, and I got email saying that was interesting, but I didn’t provide enough “how to”. So, in the next several weeks I’m going to focus in each email on a feature and say both why it is useful and how to use it.

HCA 16 has a new feature called “tags”. You are familiar with variables in HCA but here is a very brief review: A variable is a piece of state that holds a value. That value could be some text, a number, a date, or a yes/no value. Variables that are used by only a single program are called “local variables” and have existence only while the program is running. “Global variables” are different. While they hold the same kind of information, they exist all the time HCA is running. That means that multiple programs can share their values. All good? Hope so!

Global variables work well but they have some limitations: Each must have a unique name and there is just a single “pile” of them, so it can be hard to organize them. A “tag” is like a variable that isn’t associated with a program (a local variable) or with HCA (a global variable). A tag is a variable associated with a device. So that is what it is, but how to use? Here is an example:

Suppose you installed several lights that support colors like LIFX or Hue and you want to somehow turn some green, some yellow, and others blue. You could put them all in a group and control them ON or OFF, but that’s not what you want. You could write a program that controls each one to the color wanted, but if you add another light or change the color choice for an existing one, you must change the program. 
Suppose you could mark each of the color capable devices in some way and say the color wanted? Then suppose you could write a program that finds all the marked devices and controls each one to the color wanted? That would be good, right? And you can do that! Here is how:

The “mark” part of the problem is what tags are all about. A tag lets you “mark” a device with a name and a value. In this case, any device you want to change its color, mark with the tag “color” and the value of that tag is the color you want – red, blue, green, etc.

For each of your devices you want to include in this operation, open its properties and on the “Tag” tab add a tag. Enter “Color” for the name and the color you want as the current value. Like this:

That’s the “mark” part. Now for the “Find” part. To do that we will use the DesignOpen and DesignName expression functions. What DesignOpen does is to create a list of devices that match certain criterion and DesignName gives us one name from that list. 

Here’s the program:

I’ll describe each of the elements starting at the first element after the Begin-Here and going left to right.

Element #1
This Compute element generates that list of devices. It contains this expression:

hDesign = _DesignOpen(1, "", "Color");

The first argument is a code. “1” means look only at devices.
The second argument is what room or folder to look in. “” means look everywhere.
The third argument says to add to the list only devices with a given tag. In this example to find devices with the “color” tag.

Element #2
This Compute element gets the name of one of the devices on the list. It contains this expression:

colorLightName = _DesignName(hDesign);

Each time the DesignName function is used it generates the next name on the list.

Element #3
This Compute-Test element checks to see if we have gotten all the devices on the list. In contains this expression:

colorLightName == ""

The DesignName function gives back “” when the list is exhausted. The Yes path from the test goes to an Exit element as the operation is complete.

Element #4
This compute element uses a function that gets the value from a device tag. It contains this expression:

color = _ObjectTagGet(colorLightName, "color");

This looks in the device for the value of the “color” tag. We know that the device has the “Color” tag since it is on the list.

Element #5
Now we have the name of a device and the color wanted. Just a matter of doing the actual work. In this example it starts another program to do the control - how that program does that isn’t important.The start—program element looks like this:

The only complex part of this is that you must provide the value of the colorLightName and color variables, and that is done as shown above. Like other places in HCA when you want to create text that has the value of a variable, you enclose the variable name in %%’s and HCA substitutes the value into the text.

Element #6
This just connects back to element #2 to get the next name in the list.

Now this may seem like a lot of work but think of what you gained by doing this. If you add a new light, just add the “color” tag to it and the program will handle it. Also, if you want a different color for a device just edit the tag’s value. You could even get more function by instead of a single “color” group you could make several by using different tag names, and then improve the program to create different lists.

And that’s just one use of tags! Tags can get added to devices not only manually like we did in this example, but programs can add them as well. In the SmartThings and Hubitat programs (you knew I would get back to them, right?) tags are added on to sensor devices with info of the current temperature and battery level. You could write programs that look at that data.

Want to know more? The best place to find out more about some of these functions is in the expression chapter of the user guide. It is the only piece of the user guide I printed out and keep as a desk reference.

Next week we will tackle how to send email to HCA and have it do things. That will be a dive into both the email receive feature and also the string processing functions in the Compute element.
Want to watch instead of read?

If you are interested in watching some videos about how HCA and Insteon can work together, George De Luca, a HCA users of a few years and technology video creator, has started to add HCA videos to his channel. He has a good knowledge of HCA and its ins-and-outs.
His channel can be reached at: While I’ve offered him some thoughts on the videos, his opinions and advice on using HCA are his own. If you have questions about something you see, ask them in the video comment section and you may see a video with an answer.

User-to-User forum

An HCA User who wanted to set up a forum for user-to-user communication. I'm passing this on, but please know that this is not a HCA company project and I will not be spending much time there so I don't know how this will work out. Here is a link to what he set up.

Want to take the next step in automation? Want to get started with Amazon Alexa and Google Assistant and control HCA by voice commands? Even if you are a long-time user of HCA, the Getting Started guides have all the info you need on client-server, mobile applications, DDNS, and voice assistants.

All of the Getting Started Guides are available on the support website.
Copyright © 2020 Advanced Quonset Technology, Inc, All rights reserved.

Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list.

Email Marketing Powered by Mailchimp