Page 1 of 1

Automatic stream (cast) to Smart TV

Posted: Wed Feb 10, 2016 4:11 am
by aleks2x
Hello everybody,

I've been trying to find a program (media server) that can do the scenario explained in the following topic and so far UMS is the only media server that is promising enough to do this.

I have 2 smart LG TVs connected in LAN. Both of them automatically turn on specifically at 7am every day and turn off at 4pm.
My first question Is: Is it possible that i can create some kind of script that can push video content to one of the tvs (corporate video) that need to loop until the tv is automatically turned off at 4pm?
My second question is: Is it possible to create a script to stream TWO JPEG photos to the second tv (slide show) until the tv is turned off automatically at 4 pm?

The idea of the photos is to be automatically added to a playlist when someone adds them in a shared folder.

The whole concept is intended to have minimum human input (besides adding the photos in the shared network folder)

Thanks in advance!

P.S. Sorry for using the word "automatically" to often :)

Re: Automatic stream (cast) to Smart TV

Posted: Wed Feb 10, 2016 10:30 am
by valib
All communication between a renderer and a media server is the DLNA protocol based so the renderer is always asking for the media which should be played. It is not a responsibility of a media server to push something to them. If you would be able to make a script in your smart TV then it could work. Or you can make a new UMS plugin which can use the UPnP support implemented and push the media to your TV. We don't use scripts for such cases.

Re: Automatic stream (cast) to Smart TV

Posted: Thu Feb 11, 2016 8:10 am
by infidel
aleks2x wrote:Is it possible that i can create some kind of script that can push video content to one of the tvs
You can try this using the jumpy plugin's (undocumented), renderer_ip) scripting command, e.g. working example in python to start a video at a given time and stop it a minute later (

Code: Select all

import sys, time, jumpy

def push_at(hour, min, uri, renderer):
	while True:
		now = time.localtime()
		if now.tm_hour == hour and now.tm_min == min:
			# push the uri to the renderer, renderer)

# parse start time
t = sys.argv[1]
hour, min = [int(x) for x in t.split(':')]

# schedule start at hour:min
push_at(hour, min, 'c:\\video.mp4', '')

# playing...

# schedule stop after one minute by pushing
# a dummy uri to interrupt previous stream
push_at(hour, min + 1, 'dummy', '')
Assuming this script is located in plugins/jumpy/timer/, you would need to add it as an asynchronous (note the '&' at the end of the command) startup script to your jumpy-scripts.ini like so:

Code: Select all

cmd = ${home}/timer/ 07:00 &
and it should get launched 'automatically' :) at UMS startup and wait for the appointed time before kicking in and doing its thing. The uri could be a jpeg too.

Note that you would need to script all the directory-scanning, timing and looping logic yourself in python, and push uris accordingly.

Re: Automatic stream (cast) to Smart TV

Posted: Fri Feb 19, 2016 2:36 am
by aleks2x
Thank you very much!
I'll definitely try this and let everybody know how it goes.

Kind regards!

Re: Automatic stream (cast) to Smart TV

Posted: Fri Jan 11, 2019 1:05 am
by widi

When I was seeing this post, I was really happy, thinking, I have a solution for my challenge - but unfortunately not :-( We want to use displays around our company to show certain information, which are been propagated via a picture. At the moment, we have this picture as desktop-background on some client-computers - as an addition, we want to have some bigger screens standing around to propagate those information more.

For this reason I installed UMS on the server, where the picture is and want to push it to the screens. I can do so manually: I switch on the TV and then work according the following manual: ... a-Renderer.

According this forum topic, I wanted to create and run a script to send this command to the TVs, but as Jumpy seems not to work and also is not supported anymore, it is not really an option to run an outdated UMS with a not-anymore-supported plugin to solve this. So I wanted to find an alternative - but unfortunately, I am not a developer - therefore programming something on my own is not really an option...

So what command could I use to push the content automatically? I imagine, that I would run a task every few minutes to push it to the IPs, which I define (TVs would have predefined IPs). I COULD do that manually - but how can I do it automatically (Manually it IS possible - so can I hook somehow on that process and let it been done automatically)? U use UMS version 7.7.1.

Thank you very much and kind regards

Re: Automatic stream (cast) to Smart TV

Posted: Tue Jan 15, 2019 3:24 am
by widi

Could it be possible to solve this by an entry in the Custom Device profile .conf-file? What parameter could I add there?

Thank you for any input - especially as it is my only idea for the moment to solve this...

Kind regards

Re: Automatic stream (cast) to Smart TV

Posted: Fri Feb 15, 2019 12:34 am
by valib
I have one proposal. Try to make some folder with the pistures you want to show and add that folder to the UMS shared folders. Than if your TVs are really smart there should be a choice to play the slide show. TV will be asking for all pictures from the folder and the UMS will serve it.

Re: Automatic stream (cast) to Smart TV

Posted: Tue Apr 09, 2019 8:06 pm
by widi
Hi valib

Thank you very much for your answer! I finally got some time to look again into this...

Hmm, according your suggestion, after switching it on, the TV should automatically choose to pull some content via DLNA. Unfortunately, I cannot set it to do this. If I start up the TV, there is nothing shown (it would show a TV media from a cable or satellite program, if configured).
I have already defined a share folder and I have my picture there and I can load the content from there on my TV but the TV does not open that DLNA source by itself right after switching it on - but this is, what i would need.

If I do NOT want to have to do anything at the TVs, I have to go to the UMS Main menu, then click on the TV in the devices screen. After that, I can choose a file on the bottom of the device-window and click the run button: It immediately start showing the picture. So here is my question:
How could i automate this? I could imagine, that i would need to start a command (for a batch file for example) where i can tell UMS:
Use file C:\example\example.jpg and run it on Device with IP

I then can run this command on the media Server on a regular base, and therefore would push the picture to the desired devices, if they are switched on. I could create a line like this for every device I wish to control and then it works. How could I create such a command?
-> I don't know if there even exist TVs, that could actively pull content from an internal DLNA LAN-server automatically right at startup - or not even how to search for right devices :-(

Thank you very much for again look into this!

Kind regards