Samsung remote.

Any one out there interested in a LUUP Samsung SmartTV remote.

It does not look to hard to implement and I thought I might give the basics ago.

cheers

zoot1612

That would be interesting for me. I have it on my long list of todo’s, so if you start it, I can help debug as I have two Samsung TV’s.

Hi,
I have one too.

Sent from my GT-I9000

This would be awesome. I’ve been playing with figuring out how to control my Samsung TV via UPnP and ruby. The one trick I’ve found so far is you have to register the remote with the TV before it will work. I haven’t had a chance yet to do a packet capture on a working remote to figure out the sequence.

I’m interested…I see through a uPnP scan my samsung TV-32C5000.

Putting this on the back burner for now as I am hoping the upnp bugs will be fixed in UI5 which would make things easy as it looks like the Remote Control has a upnp appearance.

<?xml version="1.0"?> <root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><device> <deviceType>urn:samsung.com:device:RemoteControlReceiver:1</deviceType> <friendlyName>[TV]UA32D6000</friendlyName> <manufacturer>Samsung Electronics</manufacturer> <manufacturerURL>http://www.samsung.com/sec</manufacturerURL> <modelDescription>Samsung TV RCR</modelDescription> <modelName>UA32D6000</modelName> <modelNumber>1.0</modelNumber> <modelURL>http://www.samsung.com/sec</modelURL> <serialNumber>20090804RCR</serialNumber> <UDN>uuid:0129029a-2be0-f97c-3765-7258d26c1edb</UDN> <sec:deviceID>H3CIT2MED52GI</sec:deviceID> <serviceList> <service> <serviceType>urn:samsung.com:service:TestRCRService:1</serviceType> <serviceId>urn:samsung.com:serviceId:TestRCRService</serviceId> <controlURL>/RCR/control/TestRCRService</controlURL> <eventSubURL>/RCR/event/TestRCRService</eventSubURL> <SCPDURL>TestRCRService.xml</SCPDURL> </service> </serviceList> </device> </root>

I have a SAMSUNG TV with Ethernet…
May i be able to connect the SAMSUNG TV to my VERA via Ethernet and then somehow control it from my VERA?

@therealabdo
Currently I don’t have any code. Maybe someone else does?

Zoot

I’d be interested in this too. I have a Samsung Smart TV with wi-fi and can control it over wifi using the iPhone Samsung app, so I guess the TV should respond to similar commands sent from Vera :slight_smile:

Any progress on this? I’d like to get my TV to turn ON/OFF.

it works in the new ui with tricksTV
im working on a samsung mdc control over rs232… but this works on business models only alas…

1+

ON/OFF will not work since the interface is down and the TV is no longer connected to you network.
For On/ off you can use SQ Remote.

[quote=“TANE, post:12, topic:169188”]1+

ON/OFF will not work since the interface is down and the TV is no longer connected to you network.
For On/ off you can use SQ Remote.[/quote]
well… most new samsung tv have a rs232c interface which can turn on and off your tv. for business models this is a large rs232c normal db9 connector but a lot of consumer models use a headphone-plug connection called ex-link or service-port.

I juste release a new plugin to control my Samsung smart TV. It’s emulate Samsung iphone or Android App so it is compatible with most of connected TV (or Smart TV).

You can fund an howto on my blog at Antor – Controler votre Smart TV Samsung depuis la Vera (sorry for now it is only in french).

Soon on Apps Store : MiOS Apps (and until that => http://www.antor.fr/wp-content/uploads/2012/06/Samsung-TV-Remote-V0.1.zip)

Install :

Device type : urn:antor-fr:device:SamsungTVRemote:1
Description : le nom du module
Upnp Device Filename : D_STVR1.xml
Upnp Implementation Filename : I_STVR1.xml

Config :

TV Ip : TV IP Adresse (you can found it on the “menu” on your TV)
Ping Delay : empty = unable / 30 = 30 second / 2m = 2 minutes / 1h = 1 hour
TV App String : Your TV model, but it seems work without change it

All buttons is not already on UI but you can use them with advanced scene and SendKey function
All that Keys are available :
KEY_0
KEY_1
KEY_2
KEY_3
KEY_4
KEY_5
KEY_6
KEY_7
KEY_8
KEY_9
KEY_UP
KEY_DOWN
KEY_LEFT
KEY_RIGHT
KEY_MENU
KEY_PRECH
KEY_GUIDE
KEY_INFO
KEY_RETURN
KEY_CH_LIST
KEY_EXIT
KEY_ENTER
KEY_SOURCE
KEY_AD
KEY_PLAY
KEY_PAUSE
KEY_MUTE
KEY_PICTURE_SIZE
KEY_VOLUP
KEY_VOLDOWN
KEY_TOOLS
KEY_POWEROFF
KEY_CHUP
KEY_CHDOWN
KEY_CONTENTS
KEY_W_LINK (=Media P)
KEY_RSS (=Internet)
KEY_MTS (=Dual)
KEY_CAPTION (=Subt)
KEY_REWIND
KEY_FF
KEY_REC
KEY_STOP
KEY_SLEEP
KEY_TV

Nice! Once this is exposed I can add this to my Square Connect UI right?

great !
tested on vera 3 light with a UE46ES8000S and a UE55D8000 works fine once you set the correct tv-string (modelname)
it cannot be turned on since the tv has no network connection once it is off, however my ES model can be turned on with speech-control so this might be an option to use.
i could speak through my ip-cam and so turn on the tv from standby lol (yeah i like the impossible :stuck_out_tongue_winking_eye: )

You can use this to get the ip address and model (works for D 2011 model)

[code]---------------------------------------------------------------------------------------
function findSamsungTV()
–Currently only works if you have one Samsung TV on the network.
local udp = assert(socket.udp())

local ssdpPacketTable = {
	[1] = "M-SEARCH * HTTP/1.1\n",
	[2]= "HOST: 239.255.255.250:1900\n",
	[3] = "MAN: ssdp:discover\n",
	[4] = "MX: 4\n",
	[5] = "ST: urn:samsung.com:device:RemoteControlReceiver:1\n",
	[6] = "CONTENT-LENGTH: 0"
}

local ssdpPacket = table.concat(ssdpPacketTable )

assert(udp:sendto(ssdpPacket, "239.255.255.250", 1900))
local address = assert(udp:receive())

address = string.match(address,"LOCATION:[%s+]?(http%:%/%/[%w%.%-]+:?[%d?]+[%/%w+]+%.%w+)")
ipAddress = string.match(address,"http%:%/%/([%w%.%-]+)")
local contents,response=http.request(address)
response = string.match(response,"[%s+]?%d+")

if (response=="200") then
	contents = string.match(contents,"[%s+]?%<modelName%>(%w+)")
	return contents, ipAddress
end

end
---------------------------------------------------------------------------------------[/code]

Also for local MAC address

[code]---------------------------------------------------------------------------------------
function getMacAddress ()
local ifMac = 0
local ifAddress = 0
local ifMacFound = false
f = assert (io.popen(‘route -n’))
for line in f:lines() do
if(line:match(“^(0%.0%.0%.0)”) ~= nil) then
ifName = line:match(“(%w+)$”)
break end
end
f:close()

f = assert (io.popen('ifconfig'))
for line in f:lines() do

	if(line:match(ifName) ~= nil) then
		ifMac = line:match("HWaddr ([%:%x]*)")
		ifMac=ifMac:gsub("%:", "%-")
		ifMacFound = true
	end
	
	if(ifMacFound ==true) then
		ifAddress = line:match("inet addr:([%.%d]*)")
			if(ifAddress ~= nil) then
				return ifAddress, ifMac
			end
	end

end
f:close()

end
---------------------------------------------------------------------------------------[/code]

I was working on it but looks like I was too slow :slight_smile:

Thank a lot zoot1612 8) , findSamsungTV() function is now integrated to the next release (V0.2) !

Release is waiting for MCV approval so it will be available soon.

hi all,

Zoot1612’s code to find Samsung TV on your network is available on curent plugin release (V0.2 and next) …

---------------------------------------------------------------------------------------
function findSamsungTV()
--Currently only works if you have one Samsung TV on the network.
	local udp = assert(socket.udp())

	local ssdpPacketTable = {
		[1] = "M-SEARCH * HTTP/1.1\n",
		[2]= "HOST: 239.255.255.250:1900\n",
		[3] = "MAN: ssdp:discover\n",
		[4] = "MX: 4\n",
		[5] = "ST: urn:samsung.com:device:RemoteControlReceiver:1\n",
		[6] = "CONTENT-LENGTH: 0"
	}

	local ssdpPacket = table.concat(ssdpPacketTable )

	assert(udp:sendto(ssdpPacket, "239.255.255.250", 1900))
	local address = assert(udp:receive())
	
	address = string.match(address,"LOCATION:[%s+]?(http%:%/%/[%w%.%-]+:?[%d?]+[%/%w+]+%.%w+)")
	ipAddress = string.match(address,"http%:%/%/([%w%.%-]+)")
	local contents,response=http.request(address)
	response = string.match(response,"[%s+]?%d+")

	if (response=="200") then
		contents = string.match(contents,"[%s+]?%<modelName%>(%w+)")
		return contents, ipAddress
	end
end
---------------------------------------------------------------------------------------

It work’s pretty well on my Vera2 but not on my VeraLite. I can’t test it with Vera 3 because i don’t have one.

I have no idea why it’s not working with my VeraLite. Any idea ? :-X

i know the issue is with udp:receive(). it never receive the response. Vera2 and VeraLite are linked to the same ethernet switch … So it’s not a network issue

Does it need to include the socket library.

require "socket"

I can see it is not in the function so unless it is declared globally.

cheers

Zoot