Back about 1984 or 1985 I found an article that showed how to Interface to the Apple ][ Game I/O Port and Opto-Isolator ( AKA Optocoupler ) and a TRIAC ( A Bidirectional SCR ) to control 120VAC ( or possibly Higher Voltage ) devices... I even bought all the Parts, but never put them together.. I was worried about Blowing Up my $1200.00 Apple Computer..
A few months ago on eBay, I found this little Peripheral, The TRIAC Driver Board and Computer Interface.
It uses an Apple Slot and an Intel designed, 8255 Programmable Peripheral Interface (PPI), to control TRIACs through some Opto-Isolators.
This might be a great Project to clone for the ZX-81/TS-1000, C64, CoCo and other 8 Bit Micros that have access to the Microprocessor Data and Address Buses.