In a very smart, voice driven, house, I have a very dumb Television, perfect for my needs, the only problem has been controlling it. Recently this problem (and many others) were overcome with the purchase of a Broadlink RM wifi IR/433Mhz transmitter allowing simple sending of IR commands using an app, or my case a Tasker Plugin.

However, because there was no way of determining the status of the TV, the voice commands controlling entertainment would lose sync with the tv if someone were to use a remote for example. The net result was the phrase "are you kidding me ?" being uttered far too often for my liking.

Previous to this I had wanted to build an "Are you kidding me ?" module to add the capability to detect the status of non smart devices, in order to compensate for those things that weren't smart or addressable and never quite work seamlessly in a smart house (kettle being another).

Having voice automated most aspects of my home and entertainment, the only thing letting the experience down was never really knowing the status of the TV. This would manifest itself in the TV turning itself on or off when it was not expected to. Having spent a few weeks playing around with ESP8266 wifi modules, it occurred to me that if I could find few voltages that did useful things in the TV I could solve this problem once and for all.

With ESP modules being as cheap as they are and nearly indestructible, I had a few lying around to play with.

First off, remove the back of the TV

Remove the back of the TV

Second, get out the trusty multimeter

Knock up a quick ESP8266-01 Board - Using GPIO 2

Success, after much probing I have the 5V constant voltage needed to power the ESP8266 and the signal 3.3v I could use to detect if the display was powered or on standby.

A Quick little bit of Node MCU LUA Code

pin = 4 -- GPIO 2
-- Set to INPUT mode
gpio.mode(pin, gpio.INPUT)

function tvstatus()
local pinValue = gpio.read(4)
local h = ("<hmtl>\r\n")
local f = ("<\html>\r\n")

if pinValue == gpio.LOW then
print ("TVLOUNGE",'GPIO2 is low')
st = "ON\r\n"
status = h .. st .. f
else
print ('GPIO2 is high')
st = "Standby\r\n"
status = h .. st .. f

end
end

tmr.alarm(0, 2500, 1, tvstatus)

Using one of the numerous LUA web servers to serve the results :


And the final result integrated into Tasker