[svlug] linux only household

Paul Reiber reiber at gmail.com
Sat Jan 26 19:27:20 PST 2008

On Jan 26, 2008 5:44 PM, Erik Steffl <steffl at bigfoot.com> wrote:
> [...]
> I was somewhat surprised when my new sony tv (bravia xbr4)
> came with GPL attached :-) BTW I love it, it makes a kick ass monitor
> (gaming PC) (except you cannot put it on primary DVI on nvidia 8800)
> just one more step on the way towards linux only household :-)
>         erik

Hi, Erik!  Your note got me reminiscing, so I'll share.

Back around 2000, after the X10 guys released their "computer
interface module" with an RS232 interface, my home at the time was
indeed controlled by a Linux box - lights, heat, music, video,
security, and even my internet connection were all controlled via
shell scripts!

I set up 4 primary "modes" for the house - day mode, evening mode,
night mode, and visitor mode.  For all modes except visitor mode, the
system learned when I was turning those modes on and off... and it
used those same times on subsequent days, turning the modes on/off
automatically (unless I had previously beat ot to the punch, at which
point it adjusted its idea of when to make the particular change for
future use)

The system controlled the internet connection in an interesting way;
it simply removed the TCP/IP stack from the kernel during "night
mode", inserting it back in in the morning right after simulating an
alarm clock to help wake me up.

There were two glitches that  I never managed to work out.

The first glitch was that the "auto adjusting" feature wasn't very
smart, and could get confused.  For example, since going to "visitor
mode" involved "ending" the current mode and "starting" visitor mode.
that "end" time for the current mode would get remembered and the next
day the mode would end way earlier than it should have (basically, the
same time the doorbell had rung the night before!)  Also,
auto'adjusting "starting" times for modes to LATER never really worked
right.  I ended up resigning myself to adjusting those times in vi
rather than via the X10 controls.

The second glitch was that, since some mode transitions that involved
using the same light or lights at different intensities looked kind of
goofy as the transition was being done.  For example, the kitchen
lights went from on-full to on-dimmed inbetween evening and night
modes; this happened in the following way:  as evening-mode was
"ending", the light would be turned off entirely.  Then night mode
"started" and the light was turned on again (full) then dimmed down to
the intensity level where it would stay all night.  That looked kind
of blinky and schizophrenic.  Had the various modes known about each
other,  or had I modelled the state of each individual controlled
unit, the system could have decided to simply dim that particular
light rather than turning it off, then on, then dimming it.

I'll note that anyone attempting to implement something similar with
X10 equipment should know that this approach can only work well if you
use different house codes for all your X10 modules as opposed to all
your X10 controllers.  That implements separate "channels" (for lack
of a better word) for input and output, ensuring that no signals from
the controllers (either timed (de)activations or human-requested
(de)activations) accidentally turn on or off anything directly.   The
software monitoring the RS232 input from the X10 computer interface
module took the inputs it got on the "A" housecode and ran the
shellscript named  ~/bin/x10/A<unitcode>{on, off, dim, bright} if it
existed.  That script in turn issued any number of commands using the
"B" housecode to actually turn things on and off, etc.

In the intervening years, some open-source implementations of X10
interfaces for Linux may have been released; these might very well
simplify or otherwise help with this sort of home automation.

Wrapping up... regarding SONY equipment with Linux in it - you might
note that their blu-ray player also runs Linux.  I was the "vendor
Liaison" between the OEM (Pioneer) and its chip vendor (Sigma Designs)
a few years back, and I got intimately familiar with ucLinux in the

Thanks, Erik, for your note; I've enjoyed the reminiscing and hope
others will derive some value from the above.

Best regards,
-Paul Reiber

More information about the svlug mailing list