title: How to determine the power status of a monitor/TV in Linux
body: <p>I asked this same question a few months ago, but I've run into another roadblock and I'm hoping someone will have a flash of insight.  The is the previous thread: <a href="https://stackoverflow.com/questions/5813195/detecting-if-the-monitor-is-powered-off">Detecting if the monitor is powered off</a></p>
  
  <p>I'm trying to figure out the power status of a monitor, in particular a TV that is plugged in via HDMI.  I'm running Ubuntu 10.10 with nVidia ION video cards.  These PCs will be running some digital signage and I need to make sure the power is on to the TV during business hours.  I have a working Python script controlling an IR transmitter to turn the TV off and on.  The last piece of the puzzle is to know the current state of the TV.</p>
  
  <p>In my previous thread, I found I could use <code>ddccontrol</code> to get information from the monitor.  That worked great for a traditional Asus monitor plugged in via HDMI.  However, the Vizio TV says it doesn't support DDC.</p>
  
  <p>I've also tried using <code>get-edid</code> to get live resolution and color information, but that fails to return any information from the TV.</p>
  
  <p>I've tried <code>udevadm monitor</code> but an event only fires on the initial monitor plugin.</p>
  
  <p>I have a feeling that the nVidia drivers are blocking these calls to the monitor, but I can't confirm that.</p>
  
  <p>Ultimately, all I'm looking for is a single byte of information that changes when the monitor turns off.</p>
  
  <p>EDIT:  So, I'm coming to the conclusion that this may not be possible.  At least not consistently possible across various combinations of video cards and monitors/TVs.  The next idea I have is to monitor power usage on an outlet.  I first looked at Kill A Watts, but they are completely stand alone.  After several hours of searching, I came across Digi and their XBee radios.  I ordered one of XBee's Smart Plugs from Digi and a XBee radio and USB adapter from Spark Fun.  My current plan is to use a Python script that polls the Smart Plug for power usage.</p>
  
  <p>The plug and radio were kind of expensive.  Does anybody know of a power meter that plugs in?  Everything I found was wireless.  I'd like to be able to connect to it via USB, ethernet, or serial.</p>
  
  <p>EDIT 2:
  I could never get the XBee plug to work.  It's incredibly difficult to configure the plug unless you buy one of Digi's gateways.</p>
  
  <p>I ended up building my own current sensor.  It's Arduino based and cost about $60 in parts.  I wrote about it here: <a href="http://trafficlightads.net/2011/09/06/an-arduino-current-sensor/" rel="nofollow noreferrer">http://trafficlightads.net/2011/09/06/an-arduino-current-sensor/</a></p>