Linux Home
Automation

(Last updated: Saturday July 25, 2009)
Google
 

Software Supervisory Controller

So what is a supervisory controller?

The Supervisory Controller (SC) is the communication hub of the HCS II Home Automation system. On the original HCS II there is one serial port that functions as a dedicated 9600-bps serial RS-485 connection to the various network links (Comm-links) that may be located up to 4000 feet away via inexpensive twisted pair cable. The second serial port connects to a PC which functions as the master console. The master console acts as an on-line real-time display of all control activity in the system. However, once you compile and download your control code, the PC can be shutoff at anytime.

Software SC?

Since it's getting tough to get the parts for the original HCS II's SC (it was designed in the late 80's) I thought it might be a good idea to use a small Linux Embedded System to replace the original Zilog Z180 based SC. On it would be the XPRESS interpreter. I've decided that the language I'd like to use to interprete the XPRESS code is Groovy. Groovy supports writing Domain Specific Languages and should make it easier to write the XPRESS interpreter and allow it to be extensible (something not easily done with the hardware SC.

Software SC II

I've been giving the SC a lot of thought and using XPRESS is probably not such a great idea. XPRESS is old, limited and won't take nicely when being extended to support new features. Most likely some breakage will occur with the entensions. So it makes just as much sense to start over and build something new.

The image above is a quick drawing of the type of connectivity the controller will support. Shown is an RS485 connection to the older HCS II comm-links (9,600 baud, half duplex). A newer RS485 connection (higher board rate, half or full duplex) is not shown. The implication is that more than one RS485 network can be supported. I believe that some kind of routing and caching will be required to minimize the traffic (xPL or XAP perhaps?). Shown is the XBee network. Like the RS485 network one 'port' on the host is used. Unlike the original RS485 network it's wireless. It uses the ZigBee (802.15.4) protocol in a point-to-multipoint configuration.