Classic Computer Magazine Archive ANTIC VOL. 7, NO. 4 / AUGUST 1988


Type-in home control software

BSRk delivers the main features of the commercial PowerManager home controller software reviewed in this issue. Use your Atari to program a series of timed sequences on the X-10 Powerhouse Computer Interface for BSR on/off units. The BASIC program works with all Atari 8-bit computers with at least 48K. It requires an Atari 850 or P:R: Connection interface, a disk drive, the model CP290 Powerhouse interface and X-10 BSR modules. An ST version of BSRk is also published in this issue. It will work in high or medium resolution.

By Walter Lazear

X-10 photo
X-10 wall-plug, module and Powerhouse RS-232 serial
controller let your Atari (8-bit or ST) automatically brew
your first morning coffee – or any other on/off electrical

BSR modules such as the popular X-10 products plug into electrical outlets and use the household wiring to transmit programmed signals for switching any standard electrical equipment on and off. Full details about the X-10 system are explained in this issue's review of Terrific Corp.'s PowerManager software.

BSRk (BSR kontroller) is essentially a simple, menu-driven disk database manager that sends its data to the X-10 PowerHouse, which has its own memory and microprocessor. BSRk does much of the same job as PowerManager – but on a smaller scale and with fewer features. The key differences are:

  1. BSRk requires an interface with a serial port, such as the Atari 850 or ICD's P:R: Connection. PowerManager plugs directly into the Atari's joystick port 2 with a special cable that comes with the package.
  2. BSRk can control 16 devices and 24 on-off events. PowerManager handles 256 devices and 128 on-off events.
  3. PowerManager can load previously saved libraries of scheduled activities. Only a single library can be saved as part of the BSRk program.


You need to use the IBM PC version of the X-10 Powerhouse CP290 interface, which comes with a generic RS-232 cable. This cable connects to your Atari 850 via your own modem cable (an RS-232C cable with a female DB25 connector on one end and a male DB13 connector on the other).

Plug one end of this cable into the R1: port on the 850. Plug the other end into the cable that came with your X-10. Finally, plug the other end of your X-10 cable into the back of your X-10, and plug your X-10 into a wall socket.

You must keep all your BSRk files together on a separate disk that has been formatted with DOS 2 or DOS 2.5. Type in Listing 1, BSRK.BAS, check it with TYPO II and SAVE a copy to your BSRk disk. This is the main program.

Next, type in Listing 2, BSRHAND.BAS, check it with TYPO II and SAVE a copy to your BSRk disk. When RUN, Listing 2 creates a file called BSRRAND.OBJ, a machine language program which first sets-up the RS-232 serial handler program, then RUNs BSRK.BAS. Antic Disk Subscribers will find a copy of BSRHAND.OBJ on the monthly disk.

Finally, copy BSRHAND.OBJ to your BSRk disk and rename it AUTORUN.SYS. At this point you should have just four files on your BSRk disk: DOS.SYS, DUPSYS, AUTORUN.SYS and BSRK.BAS.

     Figure 1


     FIELD           LEGAL VALUES
     Status          I= inactive, A = active.
     Device ID       BSR module number 1-8.
     Location        Any text.
     Days            Selected from a menu.
     Time On         24-hour time.
     Time Off        24-hour time.
     Level           0 = brightest, 8 = dimmest.
     Mode            N = normal (exact time),
                     S = security (within an hour).


Start by choosing item 1, Init Database, from the BSRk menu. You need to initialize a disk database and index files only once. This Init function erases any previous database from your disk and creates blank, new ones.

Next, choose item 3 to Update Records. Specify record 1, select each field and enter your data choices, as explained in Figure 1. Exit that Update, then again select Update Records from the main menu, but this time specify record 2. Repeat for as many BSR modules and on/off times as needed.

At any time you can use choice 4, Show Active, to conveniently display all of the active records, or choice 5 to Show All of the records in the database.

Next, choose item 6, Load BSR Interface, to actually send your records to the X-10 Powerhouse's memory.

Finally set the current date and time with choice 2. Now you can unplug your 850 or P:R: connection from the Powerhouse – which will remember the events you sent it and activate them when appropriate. Now, it's time to sit back and enjoy your house gone BSRk.


BSRk is very modular and subroutine-oriented. This aids in debugging the initial code and extending the functionality later.
   50 Initializes the 810 interface to 600 baud and even parity.
 100 Writes characters from MSG$ to the X-10 with inter-character delay.
 150 Reads a character from the X-10.
 200 Reads sync and status characters.
 250 Computes the checksum across the START to FINISH portion of MSG$.
 300 Display column headers for record listings.
 350 Displays a record in columns.
 400 Set up constants, arrays, and labels.
 450 Overwrites a record on disk.
 500 Reads a record from disk.
 550 Reads index file from disk and fills CHAR( ) and SECT( ) arrays.
 600 Breaks 24-hour time into hours and minutes.
 650 Sends the default housecode (A) to the X-10 to clear its memory.
 700 Main loop. Display menu, get user choice, call appropriate routine.
 1000 Initializes disk database by writing blank records and initializing the index.
 2000 Prompts for hours and minutes and sends that time to the X-10.
 3000 Retrieves record from disk, displays it, prompts for individual field changes, rewrites record to disk.
 4000 Displays records that will be downloaded to the X-10 (Status = active).
 5000 Displays all records in the database.
 6000 Clears the X-10, composes messages from active records, and sends them to the X-10.
 7000 Exit BSRk to BASIC.



On DISK   DATA.BSR Download

On DISK   INDEX.BSR Download

Walt Lazear describes himself as a Chesapeake Bay sailor who finances his cruising by working as a systems analyst specializing in networks and communication protocols. He has enjoyed his Atari 800 for over five years.


GEM home control in GFA BASIC

By Charles Jackson, Antic Technical Editor

The ST Version, BSRK.BAS, is written in GFA BASIC, and works the same way as its 8-bit cousin. Antic Disk owners will find BSRK.PRG, a runtime version of BSRK, in this month's disk. This version can be used even if you don't own GFA BASIC.

When RUN, BSRK.PRG clears your desktop, then displays a menu bar with three choices – Desk, Records and Files. Use the Desk menu to access your desk accessories.

The Options menu contains choices to initialize your BSRk database, set the interface's time, load the database into the interface, and to quit the program.

Use the Records menu to update your BSRk database, show all of the records in the database, and to show only the active records.

Start by pulling down the Options menu and clicking on "Initialize". You need to initialize the database file only once. Be Careful! This function erases any previous database from your disk and creates a blank, new one.

Next, pull down the Records menu, click on "Update" and specify record 1. Select each field and type the proper data, as shown in Figure 1. When you have entered the entire record, choose menu item 9 to return to the main screen.

For a quick summary of records, pull down the Records menu. From here you can click on Show Active to conveniently display only the active records, or Show All to display all of the records in the database.

Now, pull down the Options menu and click on Load BSR Interface to send your records to the X-10 Powerhouse's memory.

Finally, click on Set Time to set the current date and time. Now you may turn off your ST and let your X-10 Powerhouse control your house.