Classic Computer Magazine Archive START VOL. 4 NO. 7 / FEBRUARY 1990



Make Your ST a Power house


The X-10 Powerhouse Interface is specialized hardware that lets you control any household appliance directly through your ST's serial port. With GFA BASIC 3.0, Howard MacOdrum takes the X-10 Interface a step further with a customized program to control anything from a photographer's darkroom to an electrician's workbench. His X-10 Controller runs on either color or monochrome systems.

Take total control! X1OCTRL.ARC is on Side 1 of your START disk.

With this hardware and the X-10 Controller software, you can
automate tedious tasks.

I enjoy developing film and printing pictures, but working in a darkroom always requires a lot of tedious handwork. To avoid it, I've built my own special darkroom equipment with solenoid valves to dump the chemicals and rinses into my processor.

My first efforts to control these solenoids were with a crude homemade mechanical timer, since I couldn't find any commercial timers that suited my needs. With this timer, unfortunately, it was difficult to make changes whenever a different film, paper or chemical process was used. Then I learned about the X-10 Powerhouse controllers and purchased an X-10 and the software to run it. To my disappointment, I found that the Stored-Program feature of the X-10 only let me control events with an accuracy of hours and minutes--not fine enough for my purposes. I decided to write my own program: X-10 Controller.

A Controller with a Differences

The main difference between X-10 Controller and other control software available for the ST is the "Run From File" option. When this option is used with a properly designed file, event accuracy may be controlled from hours to seconds, a substantial improvement.

There are limitations, however. The primary limitation is that since the X-10's Stored-Program feature is not used, your ST must be dedicated to this function during the entire process. Also, because some time is required for the X-10 to send signals and respond to the ST, it's not possible to control the time between steps precisely to the second. The time required for signals to be transmitted varies and is dependent upon the number of units upon which the action is to be performed. However, steps will be maintained in the proper order and completed in turn.

X-10 Controller was written in GFA BASIC version 3.0 and utilizes resource files created with the resource construction set supplied with the language. Hardware requirements consist of an ST or Mega, a monochrome monitor, an X-10 Controller and one module for each device to be controlled; a printer is optional. Complete instructions for the design and set-up of X-10 systems is contained in the X-10 Command Unit documentation.

Figure 1. The Update Steps menu option will show you the first
page of steps of any loaded file or let you create a new file. This
is a typical page file display for the control of a darkroom.

Getting Started

To run X-10 Controller, boot this month's START disk; the START Menu runs automatically. At the main screen, click on Prepare, then select "X-10 Controller." The program will un-ARC directly onto the destination disk you specify. Double-click on GFABASRO.PRG (the GFA BASIC 3.0 Run Only program) and then select X1OCTRL.GFA in the file selector box.

After loading, you'll see the main menu with the menu headings of Desk, File and Options. The Desk menu will let you access your desk accessories and shows the credits and some information about the resource file.

The File Menu

Load: Loads a previously saved X-10 Controller file with the filename extender .X10.

Update Steps: If you select this option and haven't loaded a file, a dialog box will appear giving you the choice of continuing or returning to the main menu. If you click on Continue, a new file is created and X-10 Controller will go directly to Update Detail (more about this later). If you've loaded a file, the first page (the first 16 steps) of the file will be displayed, as shown in Figure 1. If the file is larger than 16 steps, you may click on the Page Down button to display the next 16 steps. The maximum number of steps is 128--dictated by the X-10 controller's memory capacity.

Save: Saves any file created in the Update Steps or Update Units options.

Each step is a command for a specific time and for a specific module or modules. You can specify the module(s), the location and the time for the action. To change the contents of any step or create a new step at the end, click on the applicable line. This will bring up the Update Detail display in which you change or create a step. See Figure 2.

If you click on Return from the Update Detail display, you will return to the main menu, but if you have created any steps out of time sequence, an alert box will appear to warn you where the error is, so that you may go back and change the time. If you created the out-of-sequence step on purpose, you may use the Sort box to rearrange the file into correct time sequence. In order to exit the Update Detail display, you must either correct the out-of-sequence step or sort the file.

Figure 2. The Update Detail screen lets you change each individual
action in your sequence as to start and end times, the module you
want controlled and its location.

The Update Detail Display

Step Number: Sets the step number on which the given action is to be taken.

Action: The action is shown as new or update.

Time: Time is shown as hours, minutes and seconds. If the file is to be loaded into the X-10 Controller's memory (rather than run from the ST), seconds have no meaning and may be ignored. You must keep in mind how a file will be used when creating it. If a file is to be stored in the X-10 memory, the time to be entered is the hour and minute until the action. If a file is to be Run From File, the starting time of the first step is set from a zero starting point, since the real starting time can't be determined at the time the file is created.

Description: This is optional but will help you remember the purpose of each step when you look at a file later on.

Function: Click on a button to set the level from On (brightest) to 16 (dimmest).

House: Click on the House in which the unit is located.

Units: Click on one or more of the units (modules) that you want to respond to the current step.

Day: Click on one or more days on which you want the module(s) to respond. Day only has meaning if the file is to be stored in the X-10 memory; Day is ignored if the Run From File option is used.

You only need a few peripherals to
turn your ST into a powerhouse.

Normal/Security: Normal means that the action will be taken on the day(s) and at the time indicated. Security is used to take advantage of the X-10's Security function; an action will not be taken precisely at the time indicated (which might indicate a timed operation to burglars), but within a random time of one hour from the time indicated. Normal/Security applies only if the file is stored in the X-10 memory; it has no meaning if the Run From File Option is used.

Insert: Lets you insert a new step prior to this step; all subsequent steps are shifted down one step number.

Delete: Deletes this step and shifts all subsequent steps up one step number.

Display Units: Lets you review and, if desired, change descriptions of unit assignments (more about this later).

Adjust Time: Lets you adjust the time of this and all following steps forward (plus) or back (minus).

Return: Returns you to the page file display.

Print Steps: If a printer is available and on-line, this will give you a hard copy output of the current file.

Update Units: Lets you assign names to all 256 possible units. These names are for reference only, but names are much easier to remember than unit numbers. See Figure 3.

Print Units: If a printer is available and on-line, this will give you a hard-copy output of the current unit assignments for this file. This option will only print Houses and Units with a description.

Analysis: Searches the current file for common errors. You can view or print any errors, up to 50. If you have more than 50, correct the first 50 and then use Analysis again.

Figure 3. The Update Units menu allows you to assign easy-to-re-
member mnemonics for up to 256 units. These are the typical names
assigned to darkroom units.

Quit: Exits from the program. If you have inadvertently left any X-10 control modules in an On status, an error message will appear listing those units. You should always end the program with this option, rather than just shutting off your ST.

The Options Menu

Run From File: This option is the main reason X-10 Controller was written. You may abort a Run From File by pressing the [A] key. If any units are left on, an alert box will appear and then X-10 Controller will turn all units off. The ST must naturally remain on-line during the entire process. You may rerun a Run From File by simply reselecting it. Each starting time is calculated from the time you start the Run From File and has no relationship to the time maintained by the ST system clock, a battery-backed ST clock or the X-10's own clock.

File to X-10: This option loads the current file into the X-10 Command Unit's memory. The X-10 clock will then control the times when actions will occur. When using this option, any file previously stored in the X-10 will be overwritten by the new program. The X-10 clock setting is not changed by this option and will continue to run.

The X-10 Powerhouse unit can con-
trol multiple units.

X-10 to Printer: If you have forgotten which file is currently loaded into the X-10 Command Unit or want to check whether a file has loaded properly into the X-10 Command Unit's memory, click on this option. This will not change the X-10 memory contents or the X-10 clock setting. The X-10 lets you perform a self-diagnostic test; if you have done one prior to selecting this option, the X-10 memory will contain the hexadecimal diagnostic data rather than intelligible data that can be displayed onscreen; you'll receive an alert box to this effect.

Base Code: This option lets you change the Base Code of the X-10. Base Code is normally set to A on power-up. The Base Code's only function is to control the rocker switches on the X-10 control module. This option will clear any file stored in the X-10 memory.

X-10 Diagnostics: If you suspect that the X-10 is not working properly, you may use this option to run a self-check of the X-10. This option will also clear any file stored in the X-10 memory.

Set X-10 Clock: This option lets you check and, if necessary, change the X-10's clock and day setting, independent of the ST clock.

Direct Commands: Lets you take an action on any of 256 possible combinations.

Howard MacOdrum lives in Concord, California. This is his first program for START.


X-10 Powerhouse, $69.99 Control Modules, $14.99 and up. X-10 (USA), Inc, 185A Legrand Avenue, Northvale, NJ 07647, (201) 784-9700.