Copy

Home Control Assistant Newsletter for February 14 2021

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

Looking for answers to the most common questions about HCA? Check out our
Frequently Asked Questions page.
 
Program templates
I looked over the last several months of these weekly messages and I see I have spoken about the Compute element a fair bit. And most of those are with parameterized programs used to create utility programs or programs that respond to triggers like tag changes. Today I want to show a much different, though related, use of parameterized programs. As I often do, I will start with an example.

I have several rooms in my home with are managed in similar ways. In general, there is a sensor that detects motion and light level plus several devices that can be controlled. Each room of course has differently named devices and a differently named sensor. Some rooms have only a single device, but others have two or three. What I want to build is a program that triggers on motion, considers the light level in the room, and controls the room devices depending upon that light level plus the time of day. None of that is hard and I could build a separate program for each room that does exactly that. But there is a better way.

Suppose I could create a program that implements my desired algorithm and that program is provided the sensor and the devices to work with. Here is the Begin-Here element of the program:


 
Unlike the examples from the last months with “Value” parameter types, the types of the parameters in this program are specified as “Object”. What does that mean? It means it is either an HCA Room, Device, Program, or Group. The key piece here is it isn’t the “name” of the thing, it is the “thing” itself. Why is that important? Because of what you can do with it! Look at an ON element from this program.

 
Here is an Auto-Off element:
 

In both cases in the element, instead of selecting a device name as usual, you get to pick the name of an object parameter. 
Suppose I start the program with a Start-Program element like this:

 

In this case the ON and Auto-OFF elements will operate upon “Bath-Lights Mirror”. But when I use the Start-Program element like this the “Kitchen – Lights Counter” is used.

 
What’s the big deal, you ask? Instead of creating separate programs for each room I can create one program and use it for all my rooms that I want to act in that manner. This means that if I improve the program or fix a problem, I only must do it in one place and not many. That’s a big savings in time. Also a  way to not make mistakes like changing the programs for some rooms but not others. Any time you can create something once and use it in multiple places rather than create multiple things is a win.

There is one small issue that you should know about. Note in the “Bath” example above when “Lights3” was set to “[Nothing]” because that room didn’t have three devices. You should check for that before using an element like ON or Auto-Off. That way HCA doesn’t get upset and generate a program error. To do that is easy. Just use the Compute-Test element like shown below and point the “Yes” path to the elements that use that object parameter, and point  the “No” path to skip operating on that object parameter.


 
That checks if the name of the object is empty, if it is then it wasn’t provided in the Start-Program.
And that is all there is. Using programs with object parameters lets you create algorithms that operate on the HCA objects you supply. If you want to know which programmer elements can operate upon a provided object parameter, go look at technical note
#119 on the support website.

 
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.


https://www.reddit.com/r/HomeControlAssistant/

 
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 © 2021 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