Copy

Home Control Assistant Newsletter for December 20

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.
 
Devices as programs
I was working on my own home automation design this last week and had a difficulty until I remembered the “program that operates as a device” option.

In my own home I have Phillips Hue lights installed outside. Hue lights are controlled using commands sent from the Hue Bridge. HCA sends the appropriate Hue commands when they are controlled ON or OFF or from the Visual Programmer ON, OFF, and Hue elements. There is an important “complication”. These lights are on a circuit controlled by a wall switch. If the circuit is powered on, then commands sent by the Hue bridge can be received by the lights and acted upon.  If the circuit is unpowered then the commands have no effect because the lights don’t work without power. Also, the circuit can be powered but the lights appear OFF because they received a Hue command to go off. To recap: Circuit powered = all commands work. Circuit unpowered = no commands possible. Even if the circuit is ON, the lights can appear ON or OFF.

Each time I want to send a command to a hue light I first want to power on the circuit if not already on, wait a second, and then send the Hue command. I don’t want to have to implement that logic in all the places that I want to control the lights. For example, in a program that handles a driveway sensor. Also, it would be stupid to have to perform two actions from a mobile client: turn on the wall switch device then turn on the Hue light. Clearly what I need is a program that does both operations and use that program when I need to act upon the light. But how to implement that?

Normally programs that have ON and OFF triggers can in some ways act like a device. For example, from a voice assistant the “turn on” command could reference a device or program and HCA knows to either send a command or to start the program. But regular programs doesn’t give you the full range of actions that devices have, like configuring an Auto Off or participate in determining if a room is on off.

In the recent versions of HCA, a program can be designated to “operate as a device”. That option is on the “Advanced Options” tab of the program. In addition to ticking the box, you do have to set up the program to handle parameters and test what action HCA is commanding the program to perform when the program starts. Beyond that the program can do whatever it wants. To the rest of HCA it’s just a device. This would work well for my application! On a mobile client I see one icon and when I tap on that to turn the device on, my program starts, tests the state of the circuit – that is, looks at the state of the switch and controls it ON if necessary – and then uses the Hue element to control the light as desired. Works great.

The reason I bring this up is that many of the exciting things happening in the automation world are not power line control based. LIFX lights, Hue Lights, TPLink devices, and many other LED based lighting systems are now available, and they are very capable. But our homes were not designed for these and lighting is typically controlled by a wall switch. As you work with these new kinds of systems you will encounter the problem I faced: “making sure the switch is on” before controlling the device. The new “device as a program” option helps with this. There is a
technical note available that describes these kinds of programs in more detail, but I wanted to show you a real-world reason why this feature exists.

Here is an aside for the more advanced programmer: While a “program that operates a device” requires that you create it with a certain set of parameters, and the program must test the value of the first parameter to see what action to take, you can augment this for your own use. For example, you can create your own codes – just don’t use the same values that HCA is using – to control color or effects, and then add additional parameters to provide the info needed for the color or effect. Once the program is built like that, then in other places in your design you can use the start-program element to start the “operates as a device” program and control the light for color or effects.

Winter Solstice
Winter begins on Monday December 21st at 2:02AM Pacific Standard Time. Once that time is past, the number of hours of sunlight gets a tiny bit greater each day. Please join me in thinking how wonderful it is that we live in a universe that is, if not benevolent, at least very predictable. Celebrate with your families – biological or intentional – as we really need something to celebrate as 2020 the “year of no fun” closes out.


Stay safe, Wear a mask. Be a member of a community that helps. Science will save us.
 
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 © 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