Stream video from OSMC on RPi to Smart TV (LG)

I just updated my OSMC running on RPi2 to the latest version. About a year ago I did the last update so it was high time.
I recently bought an LG smart-TV and when I checked out the functionality I found that the TV was able to see my KODI unit in OSMC and I could in fact navigate the video files on KODI and play on the TV via the network.
So this was a neat feature I have real use for when moving the systems to my summer home.

But now after I did the update of OSMC I can no longer see KODI info from the smart-TV, in fact it is not listed as a network media source on the TV. I have no idea how it was set up before on the old KODI, but I would like to know how to re-enable this functionality. In fact I don’t know what feature in OSMC that enables this functionality…

Is there any tutorial available describing this or some other resource that can be of help?

Note that in my previous version I was running the Amber skin, but that is apparently incompatible with the new OSMC and so was removed during the update. The skin now is the OSMC default.

Hi,

I think the LG tv was picking up the kodi upnp library, this feature is now disabled by default in kodi 18; more details can be found here:

Thanks Tom.

That is too bad! I should not have updated OSMC then…
You say that it is now disabled by default do you mean that it should work if enabled in the settings/services section?
If so this is what I have done and it worked partially after a reboot, but on the TV I see only one of the video libraries…
I have two drives defined as libraries in the files section, one is a 1TB USB drive I have attached to the RPi and it holds my video files. The other is a NAS device connected to by way of a samba share. It was where I originally kept video files until I switched to a local USB drive instead.
The ONLY library displayed when I enable UPnP is the NAS one (which does not have the new videos). The locally attached drive named MEDIADRIVE is not visible.

In fact when I checked the system the USB drive has disappeared completely so it is not visible anymore even via KODI itself. And there was a samba share defined on the USB drive too in order for me to upload the videos to watch into the drive, it is also gone…

I have checked that the drive itself is connected as shown:

sudo blkid /dev/sda1: LABEL="MEDIADRIVE" UUID="EE78237678233D29" TYPE="ntfs" PARTUUID="81375152-01"

So somehow my system setup for both the USB drive mount, the samba share and UPnP have all been erased by the OSMC update…
And I no longer remember how I had done it several years back…

Provide output of
grab-logs -A

also install smbclient (if not done already) sudo apt-get install smbclient
and post output of smbclient -L localhost

1 Like

My problem was not with Samba client but with Samba server…

Problem now resolved as described in this thread:
Updated OSMC…

  1. Had to add a mount definition for my USB drive containing videos to /etc/fstab
  2. Had to re-add my share definition and workgroup name into samba configuration.
    Here I noticed that one should redirect config to smb-local.conf in order to persist across system updates…

I also made a change to a kodi config file described in a post by macjawa on April 18, 2019 in the tread UPnp/DLNA not working

What I did was I edited the .kodi/userdata/upnpserver.xml file and set the Port node value to 8200 while changing the name of the original node so as to keep info on the previous value.
This did not work, however, because the old value has now been removed from the xml file…
So now I am running with Port=8200 and it works and I don’t remember what it was set to originally.

I am now going to create another media server fresh from a new OSMC image, so I might be able to see what OSMC will assign as Port for UPnp/DLNA…

Now running new OSMC.
The Port value out of the box seems to be: 1601

Back again on the UPnp/DLNA issue…
I have set up a brand new OSMC box on RPi3B+ and it is working OK except for one thing and that is the UPnP/DLNA…

At first during config I had it connected to the wired network and it had an IP ending in something like 192. At this point the system was working fine and I was looking at GUI details. Especially I could see the OSMC box as a source from my TV alongside my old updated OSMC box.

Then when I was almost done I switched to WiFi instead of wired (because this is how it will have to be connected at my summer home). Now the IP address changed to end in 139, but all is still working when viewed via the Kodi GUI or when using PuTTY to access the command line.

So now I went back to view a video on the TV and surprise(!), The new server is no longer listed as a source even though it is on the same network.

If I go into the services section in settings it still shows UpNP/DLNA as enabled and running…

What can I do now to get it going?

The last things I have done before checking the TV is to configure samba sharing and making sure it will work.

You changed the ip address of the server by switching your network connection so where your TV was connected to is no longer available. You will have to tell your TV to look for the ‘new’ dlna server. You would probably be well served by making the ip of your server (the pi) static as well so that this situation does not repeat after a reboot.

Meanwhile I made a test by reconnecting the network cable to the pi making it dual homed. So it now uses both addresses:
192.168.119.198 (wired)
192.168.119.139 (WiFi)

With only this done I went over to the TV (which is connected by WiFi to the same network) and activated the external source list.
Now both my OSMC boxes show up!

So this to me proves that the UpNP/DLNA service seems to be bound ONLY to the wired NIC!
My Samba server on the other hand works on both network interfaces.

Is there a way to tell the UpNP/DLNA service to bind to both WiFi and Wired networks???

I have never told my TV to do anything on the network, there is a button for external sources on the remote and this is what brings up the list where I can see my OSMC Kodi machines. Right now the new OSMC is visible when I connected the wire…

I just tried it on my pi and it works either with wired or wireless. I did have to reboot the pi after switching network connections for the server to show up though.

OK I will try that shortly too.

…testing…

YES! It does work fine after a restart!
Thanks, don’t have to worry anymore then.

PS: I have already set the router’s DHCP server to hand out a reserved address to the RPi every time it connects. DS