Owner's Manual (Complete)

Chapter 10—Programs and the Visual Programmer
50 The Home Control Assistant
All elements are connected to each other
Test and Repeat elements have two paths from them and are both labeled
All elements have their properties set
Other tests to see if your program is correctly constructed
If you don’t use the Validate button, the validate operation is automatically done when you change
to another tab in the property dialog or attempt to close the dialog with the OK button.
The first thing that the Validate operation looks for is to make sure that all elements are connected
together. That is, there are no elements which can’t be reached from the Begin Here element by
some path. Normally this is a good test. But you can instruct the program validation to not check
for this. There is an option on the HCA Properties Visual Programs tab to set the behavior you
want. It can be useful when you are developing programs to cut sections of the program off but
not to remove them from the programming canvas.
Troubleshooting: Getting programs to do what you want
Drawing programs is the easy part. HCA makes it easy to draw your program, and check it.
Getting the programs to do what you want is a bit trickier. This section discusses some ways that
you can check how your programs are working.
When you create a program, think very carefully about what you want the program to do, and,
most importantly, the sequence for the events. You may have a program that turns on a couple of
lights. Maybe the order in which you control these lights is not important, but then maybe it is.
You need to consider the intent and expected outcome to properly sequence your elements. Once
you have a clear idea of what you want to do, you can begin drawing your program.
You may want to start with a simple program and add to it as you refine what it needs to do. You
may want to keep a version of your base program that works all right before you improve it. Just
make a copy of it, and paste the copy into your design with a new name, and work on that one.
When designing your program, you may want to watch for the use of the Delay, Wait, and Repeat
elements. These are very useful in the proper circumstances, but they may also be used
inappropriately. Remember that a program can be scheduled to start at any time you want—just
like scheduling a light to go on at a given time. If you find that you want a program to do a few
things, wait, and then do some more things, you may really need two programs. And you may
want to schedule them both.
The Delay element is very useful in circumstances where its clear you want to wait, not until some
future time, but just for a short pause. For example, turn on some lights, wait a minute then turn
them off.
Again, the sample file contains several programs that use the delay and wait elements in
appropriate manners.
Hint: Don’t forget that you can have a program start when HCA receives its house code and unit
code from some remote control panel. You can build some very sophisticated home
automation with programs started in this way.
So you have written your program and it contains some
Test elements. You schedule the program
to start at a certain time and you notice, after that time has passed, that things aren’t quite right in
your home. How can you tell what the program did, and why it didn’t work correctly? You can
answer this question by using the Log.
1. From the HCA menu, choose Troubleshooter, and click the Log Setup tab.
One of the log options is “Log executed program elements.”