Kodi Community Forum
XBMC Tuxbox Enigma Stream Client (Enigma / Enigma2 Based Dreambox & Dbox2) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: XBMC Tuxbox Enigma Stream Client (Enigma / Enigma2 Based Dreambox & Dbox2) (/showthread.php?tid=23834)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47


- rehnmark - 2011-11-18

eickmeyer Wrote:It still doesn't work for accents on vowels, for example "éèêàáâ". Great plugin though. Do the picons only work with confluence? I am using back row and the OSD looks like it would for any other stream (basically controls only and no further information). I hope development on this continues - I'm loving it!

Ok, i will fix that in the next release.


- rehnmark - 2011-11-18

gorgone Wrote:which picon format u use ?
this nameformat ?

1_0_19_246C_456_1_C00000_0_0_0.png ?

here my 4500picon package
http://www.mediafire.com/?58wjsuyzq4l5p4m

No, you need to name the picon the same name as you see in the boquetlist. For example, if the channelnames are:
SVT1 HD
SVT2 HD
TV3
TV4 HD
Kanal 5
The picons need the following name:
SVT1 HD.png
SVT2 HD.png
TV3.png
TV4 HD.png
Kanal 5.png

The Picondirectory is in the plugin.video.dreambox dir, for example, on windows the directory will be:
C:\Users\xxxxxx\AppData\Roaming\XBMC\addons\plugin.video.dreambox\Picons


- alexport - 2011-11-18

Hi there. The plugin is really what I need. The problem is that I can't get it running. My dbox uses gemini 4.70 with pli streaming. My streaming port is 31339 or something, which I give into the plugin like this "192.168.1.4:31339" in the IP address bar. Still when I run the plugin I get the "plugin.dreambox.blahblah failed". My HTPC runs win7 home premium 32bit. I used both nightly builds of the plugin and still nothing happens.
Can anybody help?
Thanx for your time


- rehnmark - 2011-11-18

alexport Wrote:Hi there. The plugin is really what I need. The problem is that I can't get it running. My dbox uses gemini 4.70 with pli streaming. My streaming port is 31339 or something, which I give into the plugin like this "192.168.1.4:31339" in the IP address bar. Still when I run the plugin I get the "plugin.dreambox.blahblah failed". My HTPC runs win7 home premium 32bit. I used both nightly builds of the plugin and still nothing happens.
Can anybody help?
Thanx for your time

It should be the web/http port(80) that you should configure with in the settings menu, not the streamingport.


- alexport - 2011-11-18

I see. I will try it as soon as I get home. Smile I 'll give feedback later. Thanx


- smouge - 2011-11-18

dutchmatrix Wrote:Thanx, i already added some program info in the channel list behind the I button.
Next step is channel switch.

Thanks a lot for the good work,

Would be so nice if we could zap with the remote control immediately from one channel to the next channel!!

At the moment we can only stop a channel, select next channel and start next channel, three button clicks, which should be one click only. Waiting eagerly for the next update


- alexport - 2011-11-19

Obviously I m doing something wrong. I still get the "plugin failed" message. I just load the plugin on xbmc, set my dbox's IP, username and password, open the plugin through video add ons while the box is on standby but nothing happens... Sad


- slain - 2011-11-19

alexport Wrote:Obviously I m doing something wrong. I still get the "plugin failed" message. I just load the plugin on xbmc, set my dbox's IP, username and password, open the plugin through video add ons while the box is on standby but nothing happens... Sad

Do you have the web interface enabled? Just to make sure, set both HTTP and HTTPS to enabled within the Dreambox and retest.


- smouge - 2011-11-19

rehnmark Wrote:Great work with the channel info! Works perfectSmile

The only issue i have with this addon is when my dm800 is not in standby, this script is not able to start the stream.
So i edited the script to check if the box is in standby or not. If its not, it will set the dreambox in standby before switching channel. This means that you will never need to manually switch off your box before running this addon.
People with dual tuners may not want this feature though...


Thanks a lot for this feature, saves me a lot of running up/down the stairs!

One thing I noted however, that is not yet working and forces me still to run up and down the stairs:


If you leave the dreambox in radio mode, and you start up xbmc and want to watch tv, the dreambox is nicely set to standby, but the tv will not play. You can only play radio.

Would be very nice if xbmc will force the draeambox as well into tv or radio mode wen selecting tv or radio in xbmc


- xalaros - 2011-11-19

can i suggest something about the picons??
all the picon packs that are available for enigma2 are referenced by e2servicereference and not e2servicename. So i think the best aproach for picon addition would be to get a picon pack and link the e2servicereference of the channel to be the same as the name of the file of the picon.


- rehnmark - 2011-11-20

éèêàáâ-fix:
DreamboxPlugin-2011-11-18.zip


- rehnmark - 2011-11-20

xalaros Wrote:can i suggest something about the picons??
all the picon packs that are available for enigma2 are referenced by e2servicereference and not e2servicename. So i think the best aproach for picon addition would be to get a picon pack and link the e2servicereference of the channel to be the same as the name of the file of the picon.

Now it looks for both e2servicename and e2servicereference for the picons. So just extract your piconpack to ....plugin.video.dreambox/Picons and it should work.

DreamboxPlugin-2011-11-20-1.zip

Best Regards,
Rehnmark


- xalaros - 2011-11-20

great work rehnmark, i can confirm that markers in the enigma2 settings don't give script errors anymore with the latest script. Also picons seem to be working, although i will check some more.


how can i stream without standby? - null_ - 2011-11-21

This plugin is AMAZING, exactly what I was after.

Only snag is that I can't seem to disable the PowerDonwOnZap option - the last thing I want is the wife to be watching it on stream and turning the sat box off every other minute.

To try and resolve I've putty'd into the box, vi'd /storage/.xbmc/addons/plugin.video.dreambox/Dreambox.py and changed:
PowerOffDreamBoxOnZap = "true"
to
PowerOffDreamBoxOnZap = "false"

Exited and saved, rebooted box - but still the box goes to standby when streaming..? Am I missing an option elsewhere?

I've got a VU+ Duo box (enigma2, almost a dreambox clone), with twin tuner (2 identical feeds going to it) and then using this to stream to OpenElec (XBMC on linux basically)

Any ideas?

rehnmark Wrote:And dutchmatrix's dreambox.py edited with the above code:
Code:
import xbmc, xbmcplugin, xbmcgui, urllib, urllib2, sys, xml.dom.minidom

def getText(nodelist):
    rc = []
    for node in nodelist:
        if node.nodeType == node.TEXT_NODE:
            rc.append(node.data)
    return ''.join(rc)

class Dreambox(object):
    __settings__ = sys.modules[ "__main__" ].__settings__
    __language__ = sys.modules[ "__main__" ].__language__
    __plugin__ = sys.modules[ "__main__" ].__plugin__

    def __init__(self, handle):
        self.handle = handle
        self.ipaddress = self.__settings__.getSetting("ipaddress")
        self.username = self.__settings__.getSetting("username")
        self.password = self.__settings__.getSetting("password")
        
        PowerOffDreamBoxOnZap = "true"
        password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
        dreambox_url = "http://" + self.ipaddress
        password_mgr.add_password(None, dreambox_url, self.username, self.password)
        handler = urllib2.HTTPBasicAuthHandler(password_mgr)
        opener = urllib2.build_opener(handler)
        urllib2.install_opener(opener)

    def rootmenu(self):
        menu = [
            { "name":self.__language__( 1 ), "mode": "tv" },
            { "name":self.__language__( 2 ), "mode": "radio" },
            { "name":self.__language__( 3 ), "mode": "movies" },
        ]

        for item in menu:
            li = xbmcgui.ListItem(item["name"])
            url = sys.argv[0] + '?' + urllib.urlencode({"mode":item["mode"]})
            xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=True, totalItems=len(menu) )

        xbmcplugin.endOfDirectory(handle=self.handle, succeeded=True)

    def readradioservicelist(self):
        # Get Bouquet list
        data = urllib2.urlopen("http://" + self.ipaddress + "/web/getservices?" + urllib.urlencode({"sRef": '1:7:2:0:0:0:0:0:0:0:(type == 2)FROM BOUQUET "bouquets.radio" ORDER BY bouquet'}))
        e2servicelist = xml.dom.minidom.parse(data)
        data.close()

        servicelist = e2servicelist.getElementsByTagName("e2service")
        for service in servicelist:
            data = {}
            for element in service.childNodes:
                data[element.localName] = getText(element.childNodes)

            cmd = {}
            cmd["mode"] ="readservice"
            cmd["e2servicename"] = data["e2servicename"].encode("utf-8")
            cmd["e2servicereference"] = data["e2servicereference"].encode("utf-8")

            li = xbmcgui.ListItem(data["e2servicename"])
            url = sys.argv[0] + '?' + urllib.urlencode(cmd)
            xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=True, totalItems=len(servicelist))

        # Get provider list
        data = {
            "mode":"readservice",
            "e2servicename":"Provider",
            "e2servicereference":"1:7:2:0:0:0:0:0:0:0:(type == 2) FROM PROVIDERS ORDER BY name"
        }
        li = xbmcgui.ListItem(data["e2servicename"])
        url = sys.argv[0] + '?' + urllib.urlencode(data)
        xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=True, totalItems=len(servicelist))

        xbmcplugin.endOfDirectory(handle=self.handle, succeeded=True)

    def readtvservicelist(self):
        # Get Bouquet list
        data = urllib2.urlopen("http://" + self.ipaddress + "/web/getservices?" + urllib.urlencode({"sRef": '1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 195) || (type == 25)FROM BOUQUET "bouquets.tv" ORDER BY bouquet'}))
        e2servicelist = xml.dom.minidom.parse(data)
        data.close()

        servicelist = e2servicelist.getElementsByTagName("e2service")
        for service in servicelist:
            data = {}
            for element in service.childNodes:
                data[element.localName] = getText(element.childNodes)

            cmd = {}
            cmd["mode"] ="readservice"
            cmd["e2servicename"] = data["e2servicename"].encode("utf-8")
            cmd["e2servicereference"] = data["e2servicereference"].encode("utf-8")

            li = xbmcgui.ListItem(data["e2servicename"])
            url = sys.argv[0] + '?' + urllib.urlencode(cmd)
            xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=True, totalItems=len(servicelist))

        # Get provider list
        data = {
            "mode":"readservice",
            "e2servicename":"Provider",
            "e2servicereference":"1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 195) || (type == 25) FROM PROVIDERS ORDER BY name"
        }
        li = xbmcgui.ListItem(data["e2servicename"])
        url = sys.argv[0] + '?' + urllib.urlencode(data)
        xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=True, totalItems=len(servicelist))

        # Get satellite list
        data = {
            "mode":"readservice",
            "e2servicename":"Satellite",
            "e2servicereference":"1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 195) || (type == 25) FROM SATELLITES ORDER BY name"
        }
        li = xbmcgui.ListItem(data["e2servicename"])
        url = sys.argv[0] + '?' + urllib.urlencode(data)
        xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=True, totalItems=len(servicelist))

        xbmcplugin.endOfDirectory(handle=self.handle, succeeded=True)

    def readservice(self, data):
        servicereference = data["e2servicereference"][0].decode("utf-8")
        data = urllib2.urlopen("http://" + self.ipaddress + "/web/getservices?" + urllib.urlencode({"sRef": servicereference.encode("utf-8")}))
        e2servicelist = xml.dom.minidom.parse(data)
        data.close()
        currentEvent1 = "http://" + self.ipaddress + "/web/epgnow?" + urllib.urlencode({"bRef": servicereference})
        dataEpg = urllib2.urlopen("http://" + self.ipaddress + "/web/epgnow?" + urllib.urlencode({"bRef": servicereference.encode("utf-8")}))
        e2epglist = xml.dom.minidom.parse(dataEpg)
        dataEpg.close()
        servicelist = e2servicelist.getElementsByTagName("e2service")
        epglist = e2epglist.getElementsByTagName("e2event")
        epgArray = {}
        for epg in epglist:
            tempData = {}
            for element in epg.childNodes:
                tempData[element.localName] = getText(element.childNodes)
            if tempData["e2eventservicename"]:
                epgArray[tempData["e2eventservicename"]] = tempData
        for service in servicelist:
            data = {}
            for element in service.childNodes:
                data[element.localName] = getText(element.childNodes)
            servicereference = data["e2servicereference"].split(":")
            attr = int(servicereference[1])
            mode = int(servicereference[2])
            cmd = {}
            if attr & 4:
                cmd["mode"] ="readservice"
                isFolder = True
            else:
                cmd["mode"] ="stream"
                isFolder = False
                
            cmd["e2servicename"] = data["e2servicename"].encode("utf-8")
            cmd["e2servicereference"] = data["e2servicereference"].encode("utf-8")
            extraInfo = " (" + epgArray[data["e2servicename"]]["e2eventtitle"]  + ")"
            li = xbmcgui.ListItem(data["e2servicename"] + extraInfo)
            mediatype = ""
            if mode == 1:
                mediatype = "video"
            elif mode == 2:
                mediatype = "music"
            if mediatype:
                labels = {
                   "plot":epgArray[data["e2servicename"]]["e2eventdescription"] + "\r\n" + epgArray[data["e2servicename"]]["e2eventdescriptionextended"],
                   "title":data["e2servicename"] + extraInfo
                }
                li.setInfo("video", labels)
                #li.setInfo(mediatype, {'Title': data["e2servicename"] })
            url = sys.argv[0] + '?' + urllib.urlencode(cmd)
            xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=isFolder, totalItems=len(servicelist))
        xbmcplugin.endOfDirectory(handle=self.handle, succeeded=True)

    def readmovies(self):
        data = urllib2.urlopen("http://" + self.ipaddress + "/web/movielist")
        e2movielist = xml.dom.minidom.parse(data)
        data.close()

        movieList = e2movielist.getElementsByTagName("e2movie")
        for movie in movieList:
            data = {}
            for element in movie.childNodes:
                data[element.localName] = getText(element.childNodes)

            li = xbmcgui.ListItem(data["e2title"], data["e2description"])
            labels = {
                "size":int(data["e2filesize"]),
                "plot":data["e2description"],
                "title":data["e2title"]
            }
            li.setInfo("video", labels)
            url = sys.argv[0] + '?' + urllib.urlencode({"mode":"ts", "e2servicename":data["e2title"].encode("utf-8"), "e2filename":data["e2filename"].encode("utf-8"), "e2servicereference":data["e2servicereference"].encode("utf-8")})
            xbmcplugin.addDirectoryItem(handle=self.handle, url=url, listitem=li, isFolder=False, totalItems=len(movieList))
        xbmcplugin.endOfDirectory(handle=self.handle, succeeded=True)

    cont.........................



- rehnmark - 2011-11-21

null_ Wrote:This plugin is AMAZING, exactly what I was after.

Only snag is that I can't seem to disable the PowerDonwOnZap option - the last thing I want is the wife to be watching it on stream and turning the sat box off every other minute.

To try and resolve I've putty'd into the box, vi'd /storage/.xbmc/addons/plugin.video.dreambox/Dreambox.py and changed:
PowerOffDreamBoxOnZap = "true"
to
PowerOffDreamBoxOnZap = "false"

Exited and saved, rebooted box - but still the box goes to standby when streaming..? Am I missing an option elsewhere?

I've got a VU+ Duo box (enigma2, almost a dreambox clone), with twin tuner (2 identical feeds going to it) and then using this to stream to OpenElec (XBMC on linux basically)

Any ideas?


Hi null_,

I didnt implement that check in the script(its just an empty variable), so right now it always sets the box in standby.
I can enable it in the next release, maybe i should create a checkbox in the addon settings, so you can choose in the GUI if you want to enable it or not ...

Best Regards,
Rehnmark