[Solved] Samsung TV Binding - Some functions not working (Watch out for upnp media server)

Hi, i was using an orangepi with openhab2 with my Samsung TV UE46F5500AY without any problems, the things that should be supported were working without any problem.

I noticed that when i enabled the binding on the tv a pop-up appeared asking if i wanted to give access to the tv for a device called “Openhab”. When i cliked ok i could turn off the tv and mute the volume, but i couldn’t control the volume ad see the source and channel number. But if i keep pressing the volume up/down buttons after some time another pop-up appeared asking for giving control to a device called “Device0” (i think). And when i cliked ok i could control the volume e see the channel number.

Now i moved openhab to a proper server, the first pop-up appered immediatly, but i can’t get to show the second pop-up, so i can’t control the tv volume and see channel number.

I tryred rebooting the tv and the server several times, without any success, the second pop-up don’t show up.

This is the log:

11:43:38.146 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'samsungtv:tv:sala' changed from OFFLINE (COMMUNICATION_ERROR): Could not send command to device on to ONLINE
11:43:38.148 [INFO ] [smarthome.event.ItemStateChangedEvent] - Sala_TV_Stato changed from OFF to ON

But before it was working!!

check on your TV: Menu \ System \ General \ Network Remote Control

I have no “Network Remote Control” under System>General as you can see (sorry its in italian)

the only things that i could find is in Network\AllShare Options\Content Sharing

where i can see “OpenHab”, i previously removed the “Device0” device during my attempt to troubleshoot the problem

try to remove all entries from there and restart the TV and it should pop up the message to allow openHAB to control it (when you try to send a Command from OH2 to the TV like change the volume)
This happened to me also once and I reset it like this
If this doesn’t work: remove the TV Thing from OH2 and rescan/readd it

nothing, i tryed all, only the first popup show up. I noticed that if i run an automatic scan for the tv openhab can’t find it. Something is missing in my openhab install for upnp?

I just restore openhab in my orange pi, if i run an automatic scan the orange pi can find the tv, my server can’t.

The orangepi is running on armbian, my server in ubuntu 18.04

here we go, with the orange pi this message pop-up:

now it is called “Device 6”, if i give access to it all the commands work without any problem, with my server this message don’t pop-up.
Something is clearly missing in my openhab or ubuntu install.

very strange… no idea where to look for…
maybe try to enable TRACE log level on the binding to see if something interesting comes up…
from the OH2 console:

log:set TRACE org.openhab.binding.samsungtv

don’t forget to lower it back to INFO log level afterwards :slight_smile:

Doesn’t seems to be any error, even if i try to send command it doesen’t throw any error, this is the install log:

13:07:57.435 [DEBUG] [org.openhab.binding.samsungtv        ] - BundleEvent INSTALLED - org.openhab.binding.samsungtv
13:07:57.475 [INFO ] [smarthome.event.ItemStateChangedEvent] - solar_voltage changed from 356.0361022949219 to 356.05572509765625
13:07:57.542 [DEBUG] [org.openhab.binding.samsungtv        ] - BundleEvent RESOLVED - org.openhab.binding.samsungtv
13:07:57.564 [DEBUG] [org.openhab.binding.samsungtv        ] - BundleEvent STARTING - org.openhab.binding.samsungtv
13:07:57.565 [DEBUG] [org.openhab.binding.samsungtv        ] - BundleEvent STARTED - org.openhab.binding.samsungtv
13:07:57.572 [DEBUG] [org.openhab.binding.samsungtv        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=347, service.bundleid=225, service.scope=bundle, component.name=org.openhab.binding.samsungtv.internal.SamsungTvHandlerFactory, component.id=220} - org.openhab.binding.samsungtv
13:07:57.576 [DEBUG] [org.openhab.binding.samsungtv        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.UpnpDiscoveryParticipant}={service.id=348, service.bundleid=225, service.scope=bundle, component.name=org.openhab.binding.samsungtv.discovery, component.id=221} - org.openhab.binding.samsungtv
13:07:57.581 [INFO ] [smarthome.event.ExtensionEvent       ] - Extension 'binding-samsungtv' has been installed.
13:07:57.593 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - Create a Samsung TV Handler for thing 'samsungtv:tv:sala'
13:07:57.617 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'samsungtv:tv:sala' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
13:07:57.619 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'samsungtv:tv:sala' changed from INITIALIZING to OFFLINE
13:07:57.620 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - Initializing Samsung TV handler for uid 'samsungtv:tv:sala'
13:07:57.620 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - channelLinked: samsungtv:tv:sala:volume
13:07:57.621 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - channelLinked: samsungtv:tv:sala:mute
13:07:57.621 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - channelLinked: samsungtv:tv:sala:sourceName
13:07:57.622 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - channelLinked: samsungtv:tv:sala:keyCode
13:07:57.621 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - channelLinked: samsungtv:tv:sala:channel
13:07:57.621 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - thingDiscovered: DiscoveryResult [thingUID=astro:sun:local, properties={geolocation=43.5142062,13.1625117,0}, representationProperty=geolocation, flag=NEW, label=Local Sun, bridgeUID=null, ttl=-1, timestamp=1543233010636]
13:07:57.622 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - channelLinked: samsungtv:tv:sala:power
13:07:57.624 [DEBUG] [ng.samsungtv.handler.SamsungTvHandler] - thingDiscovered: DiscoveryResult [thingUID=astro:moon:local, properties={geolocation=43.5142062,13.1625117,0}, representationProperty=geolocation, flag=NEW, label=Local Moon, bridgeUID=null, ttl=-1, timestamp=1543233010636]

what the heck is this?
the SamsungTvHandler is talking about the Sun ? :slight_smile:
check the names of your Things, Channels, Items and Links :stuck_out_tongue:

Unless you installed your SamsungTV on the Sun and have a satellite dish for discovering the TV :smiley:

(or is it a copy-pasta error?)

Yeah i think there is something strange going on with the astro binding, but i have it installed also in the orangepi and there the samsung tv binding is working correctly. I also tried to diable it but still no luck.

There is some kind of configuration mistake in your new server.
Even if you uninstall the astro binding you will still have problems if you don’t fix it. Double check thing and item names.
Clear cache and check jsondb also

Found the problem!! I have to start listening to a friend of mine who always tells me to use virtual machines.

I saw that this binding use upnp protocol, that use port 1900, so i run a netstat to see if there was something that uses that port:

server@server-ProLiant-DL380-G7:~$ sudo netstat -peanut | grep ":1900 "
udp        0      0  *                           999        35493      1221/EmbyServer

Emby server was using that port, so i disable it, restart the server and now:

server@server-ProLiant-DL380-G7:~$ sudo netstat -peanut | grep ":1900 "
udp6       0      0 :::1900                 :::*                                125        41539      2016/java
udp6       0      0 :::1900                 :::*                                125        41538      2016/java

Java is using it! Infact now the samsung tv binding is working!!

I think that it is not clear in the instructions, if you use this binding make sure to not have any media server installed in your machine that use that port!

Thanks for your help!

If you want to solve the problem you need to disable DLNA (or uninstall your media server), in Emby you can do that by going to:
Settings / DLNA and disable “Enable DLNA server”. Maybe also “Enable DLNA on” and in Advanced “Enable automatic port mapping”.

Of course, now you can’t use anymore DLNA, but for me the only place where i needed DLNA was in my Samsung TV, that for some reason could not find the DLNA Server of Emby.

1 Like