开发者

How to determine the power status of a monitor/TV in Linux

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: Detecting if the monitor is powered off

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.

In my previous thread, I found I could use ddccontrol 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.

I've also tried using get-edid to get live resolution and color information, but that fails to return any information from the TV.

I've tried udevadm monitor开发者_开发百科 but an event only fires on the initial monitor plugin.

I have a feeling that the nVidia drivers are blocking these calls to the monitor, but I can't confirm that.

Ultimately, all I'm looking for is a single byte of information that changes when the monitor turns off.

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.

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.

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.

I ended up building my own current sensor. It's Arduino based and cost about $60 in parts. I wrote about it here: http://trafficlightads.net/2011/09/06/an-arduino-current-sensor/


I have a couple of Watts up? .Net models that have USB and Ethernet for monitoring devices and controlling devices. The .Net model adds Ethernet and an internal relay to turn the attached device on and off. This could be used to eliminate the possibility of IR being blocked and not being able to transition the state of the TV.

Watts up? .Net Product Link

They aren't cheap, but they are well-built. I recommend getting the international model if you want the most flexibility in outlet type. This allows you to use your own in and out cords. In the USA model the input cord is hard-wired/integrated.

Good luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜