[SOLVED] Cannot connect to Samsung Smart TV

Hi Guys!

I’m struggling with connecting Samsung Smart TV to OpenHAB.

I’m using clean installation (with also addons and demo installed). I’ve changed 4 following files:

In openhab.cfg

################################ SAMSUNG TV Binding ###################################
#
# Host of the first TV to control 
# samsungtv:SchlafzimmerTV.host=192.168.1.8
# samsungtv:SchlafzimmerTV.port=55000

In demo.items

/* Smart TV */
Number        TV_Kanal      {samsungtv="0:SchlafzimmerTV:KEY_0, 1:SchlafzimmerTV:KEY_1, 2:SchlafzimmerTV:KEY_2, 3:SchlafzimmerTV:KEY_3, 4:SchlafzimmerTV:KEY_4, 5:SchlafzimmerTV:KEY_5, 6:SchlafzimmerTV:KEY_6, 7:SchlafzimmerTV:KEY_7, 8:SchlafzimmerTV:KEY_8, 9:SchlafzimmerTV:KEY_9"}
Dimmer        TV_Kanal_up_down {samsungtv="INCREASE:Livingroom:KEY_CHUP, DECREASE:Livingroom:KEY_CHDOWN"}
Rollershutter TV_Lautstaerke   {samsungtv="UP:SchlafzimmerTV:KEY_VOLUP, DOWN:SchlafzimmerTV:KEY_VOLDOWN"}

In demo.rules

rule "TV_Kanal_Remote_Top"
    when
    received command TV_Kanal_Remote_Top
Then
    Switch TV_Kanal_Remote_Top.state {
        case 0 : {
            sendCommand("TV_Kanal", 1) 
        }
        case 1 : {
            sendCommand("TV_Kanal", 2)
        }
        case 2 : {
            sendCommand("TV_Kanal", 3)
       } 
    } 
sendUpdate("TV_Kanal_Remote_Top", 3) 
End

And in demo.sitemap

Switch item=TV_Kanal_Remote_Top label="TV_Channel" mappings=[0="1", 1="2", 2="3"]

After running OpenHAB there is nothing related to the Samsung on the screen. Button is displayed wrong (as toogle) and after changing state there is following message:

2015-09-16 21:43:38.108 [WARN ] [.w.internal.servlet.CmdServlet] - Received command 'TOGGLE' for item 'TV_Kanal_Remote_Top', but the item does not exist in the registry

TV IP was checked, TV has capacity to be remote controlled from mobile phone. As far as I know myself I haven’t done something in the middle of the process - but what?

Hi,

as far as I can see you are referring to an item named “TV_Kanal_Remote_Top”. However, this item is not defined within your demo.items. That’s why you get the “item not found”-error.

Also, the demo rule doesn’t seem to be very useful as you’re mapping TV_Kanal_Remote_Top values directly to TV_Kanal values.

Try using the TV_Kanal item directly within your sitemap:

Switch item=TV_Kanal label="TV_Channel" mappings=[0="1", 1="2", 2="3"]

There should be no need for any rule then.

Best,
Daniel

Hi,

Thanks for this hint, seems everything works better now but still with error

2015-09-16 22:08:13.525 [INFO ] [runtime.busevents             ] - TV_Kanal received command 0
2015-09-16 22:08:13.526 [WARN ] [.b.s.internal.SamsungTvBinding] - Cannot find connection details for device id 'SchlafzimmerTV'

This error was solved by change from

################################ SAMSUNG TV Binding ###################################
#
# Host of the first TV to control 
# samsungtv:SchlafzimmerTV.host=192.168.1.8
# samsungtv:SchlafzimmerTV.port=55000

to

################################ SAMSUNG TV Binding ###################################
#
# Host of the first TV to control 
samsungtv:SchlafzimmerTV.host=192.168.1.8
samsungtv:SchlafzimmerTV.port=55000

Good to hear that you were successfull now.
Sure. Lines starting with a # are just comments and will not be evaluated.

Best,
Daniel

Is it possible to send more than one command to the television?
For example

sendCommand(“TV_Kanal”, 1)
sendCommand(“TV_Kanal”, 0)
sendCommand(“TV_Kanal”, 1)

Would be the channel Code of ARD(German Television)

But it doesn’t work.
There is a solution for that Problem, but i removed my samsungtv.rules :frowning:
Thanks

Not sure I got you right, but what about

sendCommand("TV_Kanal", 101)

?

Best,
Daniel

Hi
i wonder if youcan assist me binding my Samsung Smart tv model 6400.
i tried to bind with openhab 1.6.1 and 1.7.1 the line from openhab are in the box
when i telnet to 10.0.0.121 55000 i dont get any connection.
do you know if there is a different port for the allshare feature ?

Thanks Aviram

Could not send command to device on 10.0.0.121:55000: java.net.ConnectException: Connection refused
[INFO ] [runtime.busevents ] - SdirectChannel received command 0

As far I know, F and H series doesn’t support anymore the remote control protocol (port 55000). Your TV seems to be H series.

-Pali

Guys any news about the Samsung TV right binding? I have a UE40H6400 so the “H” means my TV is a H series? trying to connect it in the network and no luck by now! i use OH 1.7.1 and same bindings 1.7.1. Is there any updated version of the binding that will work with my TV?
Thanks!