# Controlling Power outlets?



## Deleted member 2077 (Jan 21, 2013)

This is a weird question, but I would like to control some power outlets or power strip from FreeBSD.  That is, turn on or off a light (outlet) from my server.  I have seen various hardware around, but seems these days most are targeted towards smart phones.

Anyone know of some relativity cheap, simple devices that would work from FreeBSD?


----------



## wblock@ (Jan 21, 2013)

The X10 stuff is still around, and you can get a serial interface to it.  Not very well made, misses commands from time to time.  Maybe it's better now.

There are USB relay controls, like https://www.sparkfun.com/products/9669 or http://electronics-diy.com/electronic_schematic.php?id=835.


----------



## HenkeZan (Jan 21, 2013)

How about Tellstick?
http://forums.freebsd.org/showthread.php?t=12553

/HenkeZan


----------



## pboehmer (Jan 21, 2013)

We use APC Master switches at our shop with success.  My only complaint with them is if the unit loses power, outlets default to on (as opposed to retaining current state) when power returns.  For the most part, this is not a problem.  Anyways, with some SNMP calls, you can script out control of each outlet.  Granted, they are not exactly cheap, but Ebay might have something.  If you like to tinker, you could always get an Arduino board and wire up a relay circuit.

Link for the APC: 
http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=AP7900


----------



## SirDice (Jan 21, 2013)

With a handful of resistors, a diode, a transistor and a relay you can easily build something yourself. 

Schematics are similar to this: http://www.rentron.com/pc-relay.htm

And in case of a PC it's usually quite simple to (ab)use the parallel port for this. If you add a few more components you could easily switch about 256 relays on/off from your parallel port.


----------



## wblock@ (Jan 21, 2013)

What is this "parallel port" you speak of? 

A warning: those without experience should not build things that mess with AC line voltages.


----------



## SirDice (Jan 21, 2013)

wblock@ said:
			
		

> What is this "parallel port" you speak of?



A port that's gone missing on "modern" machines :e

http://en.wikipedia.org/wiki/Parallel_port


----------

