Full control over TV via RS232?

Show or discuss your existing Home automation project here, so a detailed explanation!.....
Post Reply
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Full control over TV via RS232?

Post by DJF3 »

While looking for a TV in de bedroom I ran into a model with an RS232 port.
(LG 32LV2500 lg.com/nl/tv-audio-video/televisie/LG-l ... LV2500.jsp)
(manual: lg.com/nl/common/product/support.jsp?lo ... V2500.jsp#)

Page 110
This port can be used to connect to an external control device (like PC). What can be controlled?
Screenshot of LG TV RS232 commands
Screenshot of LG TV RS232 commands
Screen Shot 2012-01-25 at 10.19.57 .png (107.66 KiB) Viewed 15574 times
This looks pretty cool.

So the Question remaining: (not that important)
WHY do I want to control remotely on a TV in my bedroom????? I need it but don't understand why ;-)

Help me..
DJ
Esteban
Forum Moderator
Forum Moderator
Posts: 677
Joined: Sun Jan 13, 2008 6:39 pm
Location: Netherlands

Re: Full control over TV via RS232?

Post by Esteban »

For the 'why', how about: So you can have it turn on in the morning when waking up? I know it's not much, but you have to legitimate it somehow, don't you? :P
User avatar
Bjochems
Member
Member
Posts: 179
Joined: Wed Jun 04, 2008 2:06 pm
Location: Netherlands

Re: Full control over TV via RS232?

Post by Bjochems »

You can get a fully automatic live stream of your living room when somebody is breaking into your house :-)
Bas
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Full control over TV via RS232?

Post by Digit »

You can create a Homeseer event (not triggered by motion of course, but by a microphone that detects the snoring :lol: ) that will turn off the TV after you fall asleep.
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Full control over TV via RS232?

Post by DJF3 »

<grin>
User avatar
structor
Member
Member
Posts: 125
Joined: Tue Sep 22, 2009 8:12 pm
Location: Netherlands

Re: Full control over TV via RS232?

Post by structor »

DJF3 wrote: WHY do I want to control remotely on a TV in my bedroom????? I need it but don't understand why ;-)
Easy, because you can, therefor you must :D
User avatar
Noel
Senior Member
Senior Member
Posts: 1887
Joined: Tue Feb 12, 2008 12:13 am
Location: Netherlands
Contact:

Re: Full control over TV via RS232?

Post by Noel »

When your wife and you are making "special" moves (up/down), turn TV on and change to "preset" TV channel.
--
Maak nu je eigen video bericht online.
Anyone interested in time travel meet me here last Thursday!!
ıɟ ʇ,uɐɔ noʎ buıɥʇʎuɐ ʇɹɐʇs ɹǝʌǝu
labium
Advanced Member
Advanced Member
Posts: 512
Joined: Sat Feb 06, 2010 10:56 am
Location: netherlands

Re: Full control over TV via RS232?

Post by labium »

why , do you want domotica ? It is all in the mind, i think you want to take control. controlfreak ? OCS ?

the human why is not logical , has never been, will never be . we arent computers, nor machines, we feel, react by motivation not by buttonpress.
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Post by DJF3 »

I got the TV ;-)

Do you know if there are HS plugins that can read/interpret serial data? Once the data is in HS I can write something to translate the data into readable info.

DJ
Droezel
Member
Member
Posts: 104
Joined: Sun Jul 29, 2007 4:02 pm
Location: Belgium

Re: Full control over TV via RS232?

Post by Droezel »

Here's my script to control my sharp aquos tv in the bedroom:

Code: Select all

Sub Main(parm)

	'add spaces if neccesairy
	Do Until len(parm) = 8
		parm = parm & " "
	Loop 

	Dim retVal
    	'hs.WriteLog "SharpTV", "Execute: [" + parm + "]"
	hs.SendToComPort 14, parm + vbCr
	hs.WaitSecs(1)
	retVal = hs.GetComPortData(14)
	'hs.WriteLog "SharpTV", "Response: [" + retVal + "]"

End Sub

Sub GetStatus()

	' get the power state and update device V7

	retVal = ""
	hs.SendToComPort 14, "POWR?   " + vbCr
	hs.WaitSecs(1)
	retVal = Trim(hs.GetComPortData(14))
	
	If Instr(retVal, "1") > 0 Then
		hs.SetDeviceStatus "V40", 2 
		
	Else
		hs.SetDeviceStatus "V40", 3
	End If
	
	' update other devices, if powerstate is on, otherwise set all to off
	If hs.IsOn("V40") Then
	
		' get the audio state and update device V8
		retVal = ""
		hs.SendToComPort 14, "MUTE?   " + vbCr
		hs.WaitSecs(1)
		retVal = Trim(hs.GetComPortData(14))
		'hs.WriteLog "SharpTV", retVal
		
		If Instr(retVal, "1") > 0 Then
		    
			hs.SetDeviceStatus "V41", 3 
		Else
			hs.SetDeviceStatus "V41", 2
		End If
		
		'get the source input and update device V9, V10,V11
		'retVal = ""
		'hs.SendToComPort 14, "IAVD?   " + vbCr
		'hs.WaitSecs(1)
		'retVal = Trim(hs.GetComPortData(14))
		'If Instr(retval, "1") > 0 Then
		'	hs.SetDeviceStatus "V9", 2 
		'Else
		'	hs.SetDeviceStatus "V9", 3 
		'End If
		'If Instr(retval, "5") > 0 Then
		'	hs.SetDeviceStatus "V10", 2 
		'Else
		'	hs.SetDeviceStatus "V10", 3 
		'End If
		'If Instr(retval, "8") > 0 Then
		'	hs.SetDeviceStatus "V11", 2 
		'Else
		'	hs.SetDeviceStatus "V11", 3 
		'End If
		
		'get volume level
		retVal = ""
		hs.SendToComPort 14, "VOLM?   " + vbCr
		hs.WaitSecs(1)
		retVal = Trim(hs.GetComPortData(14))
		'hs.WriteLog "SharpTV", retVal
		hs.SetDeviceValue "V42", Clng(retVal)
		hs.SetDeviceString "V42", retVal
		'hs.SetDeviceString "V12", ""

		'get sleep timer
		hs.SendToComPort 14, "OFTM?   " + vbCr
		hs.WaitSecs(1)
		retVal = Trim(hs.GetComPortData(14))
		'hs.WriteLog "SharpTV", "Sleeptimer: [" & retVal & "]"
		hs.SetDeviceValue "V43", Clng(retVal)
		If retVal = 0 Then
			hs.SetDeviceString "V43", "Off"
		Else
			hs.SetDeviceString "V43", retVal & " min"
		End If

		'get the channel
		hs.SendToComPort 14, "DCCH?   " + vbCr
		hs.WaitSecs(1)
		retVal = Trim(hs.GetComPortData(14))
		'hs.WriteLog "SharpTV", "Channel: [" & retVal & "]"
		hs.SetDeviceValue "V44", Clng(retVal)
		hs.SetDeviceString "V44", retVal
		
	Else
		' set all other devices to off
		hs.SetDeviceStatus "V40", 3
		hs.SetDeviceString "V43", "Off"
		hs.SetDeviceValue "V43", 0
	End If
	
	
	
	'hs.CloseComPort 10
End Sub

Sub PowerToggle()
	If hs.IsOn("V40") Then
		hs.SendToComPort 14, "POWR0   " + vbCr
		hs.SetDeviceStatus "V40", 3 
	Else
		hs.SendToComPort 14, "POWR1   " + vbCr
		hs.SetDeviceStatus "V40", 2 
	End If
End Sub

Sub SetVolume()
	Volume = Cstr(hs.DeviceValue("V42"))
	If len(Volume) = 1 Then
		Volume = "0" + Volume + "  "
	Else
		Volume = Volume + "  "
	End If
	hs.SetDeviceString "V42", Volume
	hs.SendToComPort 14, "VOLM" + Volume + vbCr
	
End Sub

And here's a screenshot of some tv events, I have 2 sharp aquos tv's in the house.
TV_Events.jpg
TV_Events.jpg (233.38 KiB) Viewed 15444 times
aagesen
Starting Member
Starting Member
Posts: 6
Joined: Thu Feb 26, 2009 1:29 am
Location: Norway

Re:

Post by aagesen »

DJF3 wrote:I got the TV ;-)

Do you know if there are HS plugins that can read/interpret serial data? Once the data is in HS I can write something to translate the data into readable info.

DJ
Hi, take a look at this thread http://board.homeseer.com/showthread.php?t=123350
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Full control over TV via RS232?

Post by DJF3 »

Fantastic!

Droezel, thank you for sharing and aagesen, thank you for this link..
Just have to figure out what exactly I'm going to do with ;-)
DJ
aagesen
Starting Member
Starting Member
Posts: 6
Joined: Thu Feb 26, 2009 1:29 am
Location: Norway

Re: Full control over TV via RS232?

Post by aagesen »

And now there is a plugin too.
I'm markus on the homeseer forum so I'm the one bothering mrhappy. This works with my lg tv from 2009.


http://board.homeseer.com/showthread.php?t=152929
Post Reply

Return to “Home Automation Projects”