Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[REL] Dreambox plugin 0.1 is done

1246762

Comments

  • imyrvoldimyrvold Posts: 91Members
    I am running the Plex Server on a Mac Pro Mountain Lion. The BouquetesMenu and ChannelMenu functions are never called, I put a Log line in there to make sure.
  • xbenderCHxbenderCH Posts: 13Members, Plex Pass Plex Pass
    oysteing wrote:

    Hi!

    Could you send the script as it is now? Are you trying to play the url I had in my script? That shouldn't be a m3u-file. I also got the player, but it never tried to play anything when I tried..


    Hi oysteing

    Here is what I have so far, it's a mix from the initial (which was not working at all on my system) and your updated script (which was perfectly working for Bouqets & Channels).
    ART = 'art-default.jpg'
    ICON = 'icon-default.png'
    REGEX = '%s = new Array\((.+?)\);'
    ZAP_TO_URL = 'http://%s:%s/web/zap?sRef=%s'
    CHANNEL_URL = 'http://%s:%s/web/getservices?sRef=%s'
    STREAM_URL = 'http://%s:%s/%s'
    
    ####################################################################################################
    def Start():
    
    	Plugin.AddViewGroup('List', viewMode='List', mediaType='items')
    	ObjectContainer.art = R(ART)
    	ObjectContainer.title1 = 'Dreambox'
    	DirectoryObject.thumb = R(ICON)
    
    ####################################################################################################
    @handler('/video/dreambox', 'Dreambox', art=ART, thumb=ICON)
    def MainMenu():
    
    	dir = MediaContainer(viewmode='List', no_cache=True)
    
    	if Prefs['host'] and Prefs['port_web'] and Prefs['port_video']:
    		url = 'http://%s:%s/web/getservices' % (Prefs['host'], Prefs['port_web'])
    		
    		try:
    			urlHtml = HTML.ElementFromURL(url)
    		
    		except:
    			Log("Couldn't connect to Dreambox.") 
    			return None
    		
    		ServiceReference = urlHtml.xpath("//e2servicereference/text()")
    		ServiceName = urlHtml.xpath("//e2servicename/text()")
    
    		for item in range(len(ServiceReference)):
    			dir.Append(Function(DirectoryItem(BouquetsMenu, ServiceName[item]), index=ServiceReference[item], name=ServiceName[item]))
    	dir.Append(PrefsItem(L('Preferences'), thumb=R('icon-prefs.png')))	
    	return dir
    
    #@route("/bouquets/{sender}/{index}/{name}")
    def BouquetsMenu(sender, index, name):
    	url = CHANNEL_URL % (Prefs['host'], Prefs['port_web'], String.Quote(index))
    	try:
    		urlHtml = HTML.ElementFromURL(url)
    	except:
    		Log("Couldn't get channels.") 
    		return None
    	ChannelReference = urlHtml.xpath("//e2servicereference/text()")
    	ChannelName = urlHtml.xpath("//e2servicename/text()")
    	
    	oc = ObjectContainer(title2=name, view_group='List', no_cache=True)
    
    	for item in range(len(ChannelReference)):
    		oc.add(TvStationMenu(sender=ChannelName[item], channel=ChannelReference[item]))
    
    	return oc
    
    ####################################################################################################
    #@route("/tvstation/{sender}/{channel}/{thumb}/{include_oc}")
    def TvStationMenu(sender, channel, thumb=R(ICON), include_oc=False):
    
    	video = VideoClipObject(
    		#url = STREAM_URL % (Prefs['host'], Prefs['port_video'], channel),
    		key = Callback(TvStationMenu, sender=sender, channel=channel, thumb=thumb, include_oc=True),
    		rating_key = channel,
    		title = sender,
    		thumb = thumb,
    		items = [
    			MediaObject(
    				parts = [PartObject(key=Callback(PlayVideo, channel=channel))]
    			)
    		]
    	)
    
    	if include_oc:
    		oc = ObjectContainer()
    		oc.add(video)
    		return oc
    	else:
    		return video
    
    
    ####################################################################################################
    #@route("/play/{channel}")
    def PlayVideo(channel):
    	# Tune in to the stream
    	stream = STREAM_URL % (Prefs['host'], Prefs['port_video'], channel)
    	Log(stream)
    	return HTTPLiveStreamURL(Redirect(stream))
    


    Best
    xbenderCH
  • imyrvoldimyrvold Posts: 91Members
    Could you be so kind to show your webservices xml here, then I can have a chance to see what is the difference between yours (which is working) and mine which doesn't show anything.
    Just write this string into your browser (replace my IP with your servers IP):
    http://192.168.207.241:80/web/getservices
  • x-techsolucoesx-techsolucoes Posts: 47Members ✭✭
    edited February 2013
    atrus wrote:

    What I meant is: The first field is the address to the box. As the box is always streaming raw video, this will fetch that raw stream. The last field is an alternate address (in the form of a port number (or for example /xxxx/stream.m3u8)) which points to another subpart of the same IP which streams transcoded material which another app have done. In my case a VLC transcoded stream which keeps the bitrate down.

    My example:
    First field:
    asdfasdf.zapto.org
    

    Second field:
    33080
    

    Third field:
    /ramdisk/stream.m3u8
    


    The third field could also have been as easily another port number, as long as another stream was on that port. I do however believe it has to be a HLS stream on that port. I am not 100% sure.



    Hi i am having some issues in getting it to run properly



    PS- and this is my DefaultPref.json

    [
    {
    "id": "host",
    "type": "text",
    "label": "Host",
    "default": "192.168.2.209"
    },
    {
    "id": "port_web",
    "type": "text",
    "label": "Web Interface Port",
    "default": "80"
    },
    {
    "id": "port_video",
    "type": "text",
    "label": "Streaming Video Port",
    "default": "8001"
    }


    i have done the following steps and installed Dreambox.bundle in my Linux ubuntu server PMS latest version updated 0.9.7.7

    after placing folder in plugins subfolder i entered PMS webinterface and i could see my Dreambox channel added, clicked on the Settings, inputed my LAN dm800 iP address, webif port, streaming port 80001 and clicked saved.

    But nothing else showed now..

    i am using DM800 enigma2 OpenPli2.0 with OpenWEBIF

    it this webif compatible with the plugin on PMServer ???

    Anything else i need to do now? because i cannot see any listings showing up..
  • atrusatrus Posts: 11,093Members, Plex Pass, Plex Ninja Plex Ninja
    edited February 2013

    Hi i am having some issues in getting it to run properly



    PS- and this is my DefaultPref.json

    [
    {
    "id": "host",
    "type": "text",
    "label": "Host",
    "default": "192.168.2.209"
    },
    {
    "id": "port_web",
    "type": "text",
    "label": "Web Interface Port",
    "default": "80"
    },
    {
    "id": "port_video",
    "type": "text",
    "label": "Streaming Video Port",
    "default": "8001"
    }


    i have done the following steps and installed Dreambox.bundle in my Linux ubuntu server PMS latest version updated 0.9.7.7

    after placing folder in plugins subfolder i entered PMS webinterface and i could see my Dreambox channel added, clicked on the Settings, inputed my LAN dm800 iP address, webif port, streaming port 80001 and clicked saved.

    But nothing else showed now..

    i am using DM800 enigma2 OpenPli2.0 with OpenWEBIF

    it this webif compatible with the plugin on PMServer ???

    Anything else i need to do now? because i cannot see any listings showing up..

    There is no webIF support yet (at least not in the original plugin). You have to add the web interface port to the second field, not a seperate webIF port if that is what you have.
     Mac mini 2,3 GHz Quad-Core Intel Core i7 (With Fusion drive) (PM score: 7347)  Panasonic VT50 (55 inch)  Pioneer VSX-2021 Receiver  Norco 24-bay NAS (CPU: Intel Xeon E3-1240v2 3,4GHz, PM score: 9300) 
    New to Plex/Nine? Watch my screencast video (slightly out-dated nowadays, but still informative for new users)
    Want to know how to handle subtitles? Watch my subtitle screencast video (out-dated, but still informative), and this One Minute Subtitle Addendum screencast
    Always attach log files if you are reporting an issue: Log file info & location
    Get Plex guides here: Howto name your files NAS guide Troubleshooting Plex Support Page
  • xbenderCHxbenderCH Posts: 13Members, Plex Pass Plex Pass
    imyrvold wrote:

    Could you be so kind to show your webservices xml here, then I can have a chance to see what is the difference between yours (which is working) and mine which doesn't show anything.
    Just write this string into your browser (replace my IP with your servers IP):
    http://192.168.207.241:80/web/getservices


    1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet Top 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.aff0a.tv" ORDER BY bouquet HDTV 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.636b8.tv" ORDER BY bouquet Sky 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.8666d.tv" ORDER BY bouquet Music 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.1eac3.tv" ORDER BY bouquet Kabel
    
  • oysteingoysteing Posts: 61Members, Plex Pass Plex Pass
    xbenderCH wrote:

    Hi oysteing

    Here is what I have so far, it's a mix from the initial (which was not working at all on my system) and your updated script (which was perfectly working for Bouqets & Channels).

    Best
    xbenderCH


    Hi!

    I've tried this way, and I get the same result as you do. It seems like it should have worked now, but there must be some problems with the format or something.

    I saw that you have taken away the zap-part of the code, is this because you have more than one tuner? I thought if having an option in the preferences to select if the Dreambox should zap to the desired channel or not before streaming, but first we'll have to make it actually streaming anything..
  • xbenderCHxbenderCH Posts: 13Members, Plex Pass Plex Pass
    edited February 2013
    Hi all

    Great news! The plugin is finally working with the enigma2 web interface B)

    ART = 'art-default.jpg'
    ICON = 'icon-default.png'
    REGEX = '%s = new Array\((.+?)\);'
    ZAP_TO_URL = 'http://%s:%s/web/zap?sRef=%s'
    CHANNEL_URL = 'http://%s:%s/web/getservices?sRef=%s'
    STREAM_URL = 'http://%s:%s/%s'
    
    ####################################################################################################
    def Start():
    
    	Plugin.AddViewGroup('List', viewMode='List', mediaType='items')
    	ObjectContainer.art = R(ART)
    	ObjectContainer.title1 = 'Dreambox'
    	DirectoryObject.thumb = R(ICON)
    
    ####################################################################################################
    @handler('/video/dreambox', 'Dreambox', art=ART, thumb=ICON)
    def MainMenu():
    
    	oc = ObjectContainer(view_group='List', no_cache=True)
    
    	if Prefs['host'] and Prefs['port_web'] and Prefs['port_video']:
    		url = 'http://%s:%s/web/getservices' % (Prefs['host'], Prefs['port_web'])
    		
    		try:
    			urlHtml = HTML.ElementFromURL(url)
    		
    		except:
    			Log("Couldn't connect to Dreambox.") 
    			return None
    		
    		ServiceReference = urlHtml.xpath("//e2servicereference/text()")
    		ServiceName = urlHtml.xpath("//e2servicename/text()")
    
    		for item in range(len(ServiceReference)):
    				oc.add(DirectoryObject(
    					key = Callback(BouquetsMenu, sender=ServiceName[item], index=ServiceReference[item], name=ServiceName[item]),
    					title = ServiceName[item]
    				))
    
    	oc.add(PrefsObject(title='Preferences', thumb=R('icon-prefs.png')))
    
    	return oc
    
    #@route("/bouquets/{sender}/{index}/{name}")
    def BouquetsMenu(sender, index, name):
    	url = CHANNEL_URL % (Prefs['host'], Prefs['port_web'], String.Quote(index))
    	try:
    		urlHtml = HTML.ElementFromURL(url)
    	except:
    		Log("Couldn't get channels.") 
    		return None
    	ChannelReference = urlHtml.xpath("//e2servicereference/text()")
    	ChannelName = urlHtml.xpath("//e2servicename/text()")
    	
    	oc = ObjectContainer(title2=name, view_group='List', no_cache=True)
    
    	for item in range(len(ChannelReference)):
    		oc.add(TvStationMenu(sender=ChannelName[item], channel=ChannelReference[item]))
    
    	return oc
    
    ####################################################################################################
    #@route("/tvstation/{sender}/{channel}/{thumb}/{include_oc}")
    def TvStationMenu(sender, channel, thumb=R(ICON), include_oc=False):
    
    	video = VideoClipObject(
    		#url = STREAM_URL % (Prefs['host'], Prefs['port_video'], channel),
    		key = Callback(TvStationMenu, sender=sender, channel=channel, thumb=thumb, include_oc=True),
    		rating_key = channel,
    		title = sender,
    		thumb = thumb,
    		items = [
    			MediaObject(
    				parts = [PartObject(key=HTTPLiveStreamURL(Callback(PlayVideo, channel=channel)))]
    			)
    		]
    	)
    
    	if include_oc:
    		oc = ObjectContainer()
    		oc.add(video)
    		return oc
    	else:
    		return video
    
    
    ####################################################################################################
    #@route("/play/{channel}")
    def PlayVideo(channel):
    	# Tune in to the stream
    	stream = STREAM_URL % (Prefs['host'], Prefs['port_video'], channel)
    	Log(stream)
    	return Redirect(stream)
    


    My big mistake was, that I used the Plex Web Interface and the iOS app... both of them use transcoding to display the live stream which still doesn't work.

    If I use the script above and the standard plex client, it perfectly streams my live tv B)

    Please note that I don't call the ZAP first, because I have 4 tuners in my dreambox and it automatically uses a free tuner the way the script is without interrupting any active channel.

    Best,
    xbenderCH
  • TheSatmanTheSatman Posts: 227Members ✭✭
    Applaus :o)

    Great news. Hopefully there will be a release for the enigma1 users as well any time soon...

    The era of movie viewing in the dark has passed!!!

     

    Plex Media Server: Windows 10 Home x64 ,AMD A10-5800K 4,10 GHz, 16Gb RAM

    Media Storage: 2 + 1 TB Network shared USB Hard Drive // 

    8 TB Synology Hybrid Raid (with data protection of 1 disk fault-tolerance)on XPEnology DSM 5.0- 4458 VM on VMware ESXi 5.1.0, HP ProLiant N54L

    Plex Clients: Roku 3 // Xbox 360 // Multiple Android devices // iPad1 // iPad3 // iPod Touch // Plex/Web

    Home entertainment: Pioneer VSX-921 // Pioneer BDP-140 // 5500ANSI Full HD 1080P DLP 3D Projector // 85" Mocom 2D /HD, Passive/Active 3D Projection Screen - 20 Gain // 32" HDMI TV // 50Mb-50Mb Fiber internet connection

  • waghelakwaghelak Posts: 46Members ✭✭
    so let me confirm... web interface is 80 and i can see the channels etc.

    streaming video port is 8001 correct?

    I can get it to work on iphone i guess you said it does not work on ios

    what is a standard plex client?
  • plexiblueplexiblue Posts: 4Members, Plex Pass Plex Pass
    Thanks a lot for this plugin!

    I have waited for ages for someone to get the tuxbox plugin to work (works in XBMC) but gave up. And now this!! :rolleyes: :lol:
    I tried it out in combination with my Dreambox 7025 and my Dreambox 8000, both work, but only one at a time, because I can only specify one Box address in preferences.
    Hope this will change when the development continues...

    This is great news for all Dreambox Users with Plex
  • waghelakwaghelak Posts: 46Members ✭✭
    plexiblue wrote:

    Thanks a lot for this plugin!

    I have waited for ages for someone to get the tuxbox plugin to work (works in XBMC) but gave up. And now this!! :rolleyes: :lol:
    I tried it out in combination with my Dreambox 7025 and my Dreambox 8000, both work, but only one at a time, because I can only specify one Box address in preferences.
    Hope this will change when the development continues...

    This is great news for all Dreambox Users with Plex


    i wonder what am doing wrong, any tips, is 8001 correct for video streaming port?
  • plexiblueplexiblue Posts: 4Members, Plex Pass Plex Pass
    waghelak wrote:

    i wonder what am doing wrong, any tips, is 8001 correct for video streaming port?


    Yes
  • waghelakwaghelak Posts: 46Members ✭✭
    ok got it working, didnt know there was a pc client too so works with that, excellent.

    Only thing is i have two tuners and using this locks one out even after i stop streaming so would be good to have the tuner freed after it.

    Hope someone get it working for ios would be awesome :)
  • oysteingoysteing Posts: 61Members, Plex Pass Plex Pass
    xbenderCH wrote:

    Hi all

    Great news! The plugin is finally working with the enigma2 web interface B)


    My big mistake was, that I used the Plex Web Interface and the iOS app... both of them use transcoding to display the live stream which still doesn't work.

    If I use the script above and the standard plex client, it perfectly streams my live tv B)

    Please note that I don't call the ZAP first, because I have 4 tuners in my dreambox and it automatically uses a free tuner the way the script is without interrupting any active channel.

    Best,
    xbenderCH


    Hi!

    I have done some small changes to be able to select in the preferences if you need to zap before streaming or not.

    Just change the last part of _init_.py to this:

    ####################################################################################################
    #@route("/play/{channel}")
    def PlayVideo(channel):
    	if Prefs['zap']:
    		#Zap to channel
    		url = ZAP_TO_URL % (Prefs['host'], Prefs['port_web'], String.Quote(channel))
    		try:
    			urlHtml = HTTP.Request(url, cacheTime=0, sleep=2.0).content
    		except:
    			Log("Couldn't zap to channel.")
            # Tune in to the stream
    	stream = STREAM_URL % (Prefs['host'], Prefs['port_video'], channel)
    	Log(stream)
    	return HTTPLiveStreamURL(Redirect(stream))
    


    and in the DefaultPrefs.json, it looks like this:

    [
    	{
    		"id": "host",
    		"type": "text",
    		"label": "Host",
    		"default": "dm800"
    	},
    	{
    		"id": "port_web",
    		"type": "text",
    		"label": "Web Interface Port",
    		"default": "80"
    	},
    	{
    		"id": "port_video",
    		"type": "text",
    		"label": "Streaming Video Port",
    		"default": "8001"
    	},
    	{
    		"id": "zap",
    		"type": "bool",
    		"label": "Zap to channel before streaming",
    		"default": "true",
    	}
    ]
    


    I still haven't got the streaming to work. I'm also using the web interface, and have tried with the Android client. None of them are working. On the Samsung TV, only local files are available, no channels are visible at all. Probably a limitation with the Samsung TV app?

    When I try the Windows client, I don't actually see any bouquetes, as another user described. So here is a lot of differences between different client version. Hopefully we will figure this out as well. :)

    oysteing
  • xbenderCHxbenderCH Posts: 13Members, Plex Pass Plex Pass
    oysteing wrote:

    I still haven't got the streaming to work. I'm also using the web interface, and have tried with the Android client. None of them are working. On the Samsung TV, only local files are available, no channels are visible at all. Probably a limitation with the Samsung TV app?

    When I try the Windows client, I don't actually see any bouquetes, as another user described. So here is a lot of differences between different client version. Hopefully we will figure this out as well. :)


    Hi oysteing

    Web Client & iOS Client doesn't work, because the transcoding of the live stream currently doesn't work... I'm still trying to find a solution for this.

    OSX Client works perfectly, because it can directly decode the stream as it is. Previously, I had the same issue as you have (no bouquets visible), that's why I adjusted the menu creation at the first level. Since then, it works on my OSX Client.

    Best,
    xbenderCH
  • imyrvoldimyrvold Posts: 91Members
    Thanks!
    But could you post the whole XML, like I did on Page 3 at 17. February?

    xbenderCH wrote:

    1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet Top 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.aff0a.tv" ORDER BY bouquet HDTV 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.636b8.tv" ORDER BY bouquet Sky 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.8666d.tv" ORDER BY bouquet Music 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.1eac3.tv" ORDER BY bouquet Kabel
    

  • Peter91101Peter91101 Posts: 333Members, Plex Pass Plex Pass
    Hi!

    Many Thanks, XBenderCH!!!

    It works for now;-)

    BR
    Peter
  • oysteingoysteing Posts: 61Members, Plex Pass Plex Pass
    edited February 2013
    Hi!

    I was a bit bored last night, so I did some more enhancement to the plugin.

    Changes:
    * Possability to show EPG on current program, lenght, time since the program started, and description of the program. Be aware that this function has to communicate with the Dreambox for each channel, so if you have a long bouguete, this will take some time. Probably best to use this on small bouquetes. Function can be turned on/off in preferences.
    * Possability to use Picons. Download a Picon package, and place the files in the Resources-folder of the plugin. Function can be turned on/off in preferences.

    Needed work:
    * I couldn't quite figure out how to check if a picon exists. Because of this, it will now assume that the picon actually exist, if not the layout might look strange.
    * Still problems with some clients, not showing anything at all.
    * Only direct streaming is working, an only on some clients.

    Here is the lastest versions of the files: (just replace _init_.py and DefaultPrefs.json in the correct folders.) Also, there is some picons, mainly for the channels on 1w.
  • sivheadsivhead Posts: 15Members
    edited February 2013
    oysteing wrote:

    Hi!

    I was a bit bored last night, so I did some more enhancement to the plugin.

    Changes:
    * Possability to show EPG on current program, lenght, time since the program started, and description of the program. Be aware that this function has to communicate with the Dreambox for each channel, so if you have a long bouguete, this will take some time. Probably best to use this on small bouquetes. Function can be turned on/off in preferences.
    * Possability to use Picons. Download a Picon package, and place the files in the Resources-folder of the plugin. Function can be turned on/off in preferences.

    Needed work:
    * I couldn't quite figure out how to check if a picon exists. Because of this, it will now assume that the picon actually exist, if not the layout might look strange.
    * Still problems with some clients, not showing anything at all.
    * Only direct streaming is working, an only on some clients.

    Here is the lastest versions of the files: (just replace _init_.py and DefaultPrefs.json in the correct folders.) Also, there is some picons, mainly for the channels on 1w.



    I know its been previously mentioned that the plugin does not support OpenWebif but I am using OpenWebIf the 1st script that you supplied in post 41 http://forums.plexapp.com/index.php/topic/58831-dreambox-plugin-01-is-done/page__view__findpost__p__352200 worked with OpenWebIf showing bouquets and channels. the only that was not working was the zapping and streaming

    The second script supplied in the post quoted above only shows the 1st table of bouquets with categories you cant select a category to get to a channel. Can you confirm what version of webinterface you are currently using to perform your tests please ? as the script in post 41 seems to be working better than this one.
Sign In or Register to comment.