kdschlosser / samsungctl

Remote control Samsung televisions via a TCP/IP connection
MIT License
148 stars 34 forks source link

Fixes https://github.com/kdschlosser/samsungctl/issues/72 #91

Closed p3g4asus closed 5 years ago

p3g4asus commented 5 years ago

As you asked, here it is the fix in a separate PR. The big one with the full python 2 compatibility will come when I am in front of the TV and I can make some last tests. If you want to have a look to the changes in the meanwhile, they are included in my encrypted_py2py3 branch.

kdschlosser commented 5 years ago

I checked out your updates.

suggestions... here is a code example


try:
    unicode = unicode
except NameError:
    unicode = bytes

def bytes2str(data):
    if isinstance(data, unicode):
        return data.decode('utf-8')
    else:
        return data

def debug(label, data):
    logging.debug(label + bytes2str(he(data)))

I think that if you directly convert each byte using chr() you may end up with values that are not supposed to be there. I am not sure why I think that I may have run across an issue doing that before I cannot remember off the top of my head. But the way it's done above will also take into consideration unicode for python 2

p3g4asus commented 5 years ago

Nice suggestion. I will edit my code accordingly. TY.

kdschlosser commented 5 years ago

I know you are still working on it. and if you can think of another way to go about it then awesome.

I did want to give you one heads up. I am not a HUGE fan of importing a specific item inside of a module. I would much rather see the whole module use. and no renaming of the import. It makes the code easier to follow.

example would be

from binascii import unhexlify as uh,hexlify as he

uh(var) he(var)

now imagine a file that has 2000 lines of code and you didn't write the code. how long do you think it would take you to figure out what uh and he was. imports are not always the first thing to get looked at. if the call is not like what is below I am off and hunting for a module level function in the same file. not an import. if you do what is below. it is alot easier to know that the call is made to a function in another module. I can understand the want to press less keys when coding. But what I have learned is when you have to go back to fix something say a year later it will drive you nutz trying to figure out what you wrote. better to use the long version. so that is why I am not a not a huge fan of that type of coding.

import binascii 

binascii.unhexlify (var)
binascii.hexlify (var)

another thing I am not really big on is what I like to call voodoo magic code.

here would be an example

def in_data_1():
    pass

def in_data_2():
    pass

functions = {
    'data 10': in_data_1,
    'data 11':  in_data_2
}

def incoming_data1(data):
    functions[data]()

def incoming_data2(data):
    functions[data]()

def incoming_data3(data):
    functions[data]()

if there is again 2000 lines of code. this would be some smoke and mirrors.

now I know this would be a pain in the ass if there was say 20 different data values and 20 different functions. But it is easier to follow. and maintain. not having to scroll all over the place back and forth and not really knowing what the returned data is.

I am all for combining like code. so the functions we call based on the incoming data still remained because the code is shared between the different incoming data functions. just the use of the diction in favor of doing the if eliif was removed.


def in_data_1():
    pass

def in_data_2():
    pass

def incoming_data1(data):
    if data ==  'data 10':
       in_data_1()
    elif data == 'data 11':
        in_data_2()

def incoming_data2(data):
    if data ==  'data 10':
        in_data_1()
    elif data == 'data 11':
        in_data_2()

def incoming_data3(data):
    if data ==  'data 10':
        in_data_1()
    elif data == 'data 11':
        in_data_2()

Now I also think supers are fine and dandy. so long as you do not use code like this

class Class1(object):

    def run(self):
        if self.some_value == True:
            print("it's True")

class Class2(Class1):

    def __init__(self):
        self.some_value = True
        super(Class2, self).__init__()

if I am looking at Cl;ass1 that may be in a different file then Class2. how in the hell would I know where self.some_value is set?? off a hunting I would go. that falls right into the voodoo magic code slot. I see that kind of thing all the time. It's hard as hell to know what is going on.

I have really grown to despise that kind of code, specifically because of a project I head up called EventGhost. If you want to see some nutty code go look at the source for that. I am not the original Author. and I would love to ask the original author what was on his melon when he wrote it. and because the program has been around for almost 15 years. i cannot change it to much or it will break the API for the 400+ plugins that are available for it. (and that is a whole other disaster)

things like to open up a simple settings dialog. the code is across no less then 15 files and subclass of a subclass of a subclass kind of a thing. and it has you bouncing all over the place if you need to follow the data trail to find out what may be changing something in a manner that is causing an error further down the line.

kdschlosser commented 5 years ago

Oh here is another perfect example. something I did in samsungctl.


class RemoteMeta(type):

    def __call__(cls, conf):

        if isinstance(conf, dict):
            conf = Config(**conf)

        if conf.method == "legacy":
            remote = RemoteLegacy
        elif conf.method == "websocket":
            remote = RemoteWebsocket
        elif conf.method == "encrypted":
            if RemoteEncrypted is None:
                raise RuntimeError(
                    'Python 2 is not currently supported '
                    'for H and J model year TV\'s'
                )

            remote = RemoteEncrypted
        else:
            raise exceptions.ConfigUnknownMethod()

        class RemoteWrapper(remote, UPNPTV):

            def __init__(self, config):
                for name, key in KEYS.items():
                    self.__dict__[name] = KeyWrapper(self, key)

                remote.__init__(self, config)

                if (
                    config.upnp_locations is not None
                    and not config.upnp_locations
                ):
                    discover(config)

                print(config.upnp_locations)

                if config.upnp_locations:
                    UPNPTV.__init__(
                        self,
                        config.host,
                        config.upnp_locations,
                        self
                    )

                if config.path:
                    config.save()

            def __enter__(self):
                self.open()
                return self

            def __exit__(self, exc_type, exc_val, exc_tb):
                self.close()

        return RemoteWrapper(conf)

@six.add_metaclass(RemoteMeta)
class Remote(object):

    def __init__(self, config):
        self.config = config

smoke and mirrors.

this class does not a damned thing the init never gets called all it does is a redirect to RemoteMeta and RemoteMeta then builds a wrapper class RemoteWrapper with parent classes added to it and that is what gets returned..

class Remote(object):

    def __init__(self, config):
        self.config = config

the readable version of this would be to add the UPNPTV class as a parent class to RemoteLegacy RemoteEncrypted and RemoteWebsocket and duplicate the code in the init of the RemoteWrapper class in each of those Remote classes.

I did this because it was the least amount of code changes to achieve the same effect. Now that I know it will work properly I will be changing the code to the way that is easier to read.

p3g4asus commented 5 years ago

I undersand what you are saying and I agree. In the specific case it was a small file and I preferred to shorten function names. But in terms of readability and maintainability your approach is surely better. I will change and use extended names. As for Eventghost, I am a great fun of it and I developed some plugins for my personal use. I think it is really a great piace of software. I developed plugins for it but I don't think I have ever read its source. Is it written in c++ or what? What are you currently developing in that project?

p3g4asus commented 5 years ago

With your example with the RemoteMeta and RemoteWrapper classes, I got the idea. The code, as it is, it is a bit obfuscated and needs some additional time to understand what is doing. I had to spend quite some time to understand it despite the shortness of the code sample. Defining the classes separately maybe is less elegant and pythonic, but surely more functional. And can be done without duplicating many lines of code I think.

kdschlosser commented 5 years ago

I am the Administrator for EventGhost. I am the guy that pays the bills and keeps the lights on. I am the lead programmer, tho I have a guy that takes care of the GitHub end of things. He does the quality control on my PR's which is a full time job LOL.

EventGhost It's written mostly in Python with some extension modules written in C

I didn't ask for the job. It kind of got handed to me. since then we moved to a KVM VPS server updated all of the website software.. MySql PHP Apache PHPbb things like that. upgraded EG so it is running Python 2,7 at the moment. we have builds that are running 3.5 as well as x86 and x64 variants. I have gotten EG to run as a service with no GUI.... we do have plans. the problem is the time. we have a rough draft plugin repository,

It's a lot to happen in a tad over 2 years. Plus I have to take care of support questions in the forum.

We have grown tho. gone from 200 unique site visits a day to almost 500. and went from a little over 5000 downloads of EG a year to almost 25 thousand.. I still have to give the website a facelift. But I have been so damned busy with things like getting openzwave to compile on windows. so we now have a zwave plugin. getting this library up to snuff so that we have the best samsung TV plugin. I still have to finish up my Sony TV plugin. and again that is another that will be the most complete control available

kdschlosser commented 5 years ago

I may just alter the UPNP_TV class to handle it. since all of the remote classes are going to be a subclass of it.

p3g4asus commented 5 years ago

You are officially my hero. I use Eventghost mostly with voice controls (with the help of google assistant page hosted on its web server plugin) and I like it so much. It would be great for me to help in something if I could. As for samsungctl maybe I can contribute with something more if you like/need. I have some code snippets to use the upnp method MainTVAgent2:GetChannelListURL to download and parse channel list, the method MainTVAgent2:SetMainTVChannel to change the channel and MainTVAgent2:GetCurrentMainTVChannel to retrieve the current channel. All tested and working. Please tell me if you are interested in those snippets or if you want me to try to integrate them in samsungctl using a programming style as close as possible to yours, or if you are not interested. I would be happy to contribute if I can.

kdschlosser commented 5 years ago

OOOOh

You really have not done any digging into the samsungctl library have you???

try this library out.... :smile:

https://github.com/kdschlosser/UPNP_Device/tree/develop

install it using

python setup,py install

to run it. you can do that from the command line

upnp_device --help

and to just give a printout of all of the devices..

upnp_device

or you can target a specific IP

upnp_device 192.168.1.1

or more then one IP

upnp_device 192.168.1.1 192.168.1.2

you can run the methods..

get the help for a specific function

upnp_device --execute SomeUPNPClass.SomeUPNPFunction --help 192.168.1.1

passing parameters

upnp_device --execute SomeUPNPClass.SomeUPNPFunction --SomeParameter SomeValue 192.168.1.1

it will print any returned data to the screen

kdschlosser commented 5 years ago

and you are more then welcome to help out with EventGhost if you want. you can help with the code. or you can help with the support end of things in the forum.. whatever it is you want to do. but me and my cohort that handle the GitHub end of things do not mind teaching. and explaining how thing work.

It is funny. because 3 years ago was the first time I ever used EG. and i was in the forum asking for help.. and no one answered me at all. I never programmed anything other then my VCR at that point. python?? what is that?? a snake??

I could see the usefulness in EventGhost. and to be honest it kind of pissed me off that i got no help. so i dug in and started learning. I also answered everyone that posted in thee forum. even if I had no clue what they were trying to do or what the problem was.. I would tell the person that when i answered.. and I also said to them. if you are patient we can learn how to fix or how to do.. and that is how things went for about a year or so.. The guy that was the maintainer at that point in time. he knew nothing about programming. he was given the website and the code to EventGhost by the original author before he walked away. and it was kind of stagnant. I simply started making a bunch of noise. and helping everyone. next thing I know I am the administrator.

and now 3 years later.... this is where I am at.

p3g4asus commented 5 years ago

That is true, I did very few tests with upnp_device library. But the function of getting channel list and changing channels cannot be performed easyly that way. Infact to change channel you have to get its xml representation. To get it you have to download the channel list from the url returned from Getchannellisturl. The channel list is in binary format. You have to parse it and after that you get all the informations needed to create the xml representation of channels (that it is not practical to enter on the command line LOL). So in my opinion upnp library alone is quite unusable for the purpose.

p3g4asus commented 5 years ago

I am not used to ask for help. I usually start reading code and help myself. I am not patient to wait for other people's help. I will visit the forum and see what people ask and see if I can help.

kdschlosser commented 5 years ago

I know that... I was just showing you.. that whole library is apart of samsungctl..

samsungctl can change TV channel. it can also edit the OSD label for sources. as well as channels. direct input of volume, mute, brightness, contrast, sharpness, aspect ratio. the whole deal..

you are gonna love this one...


import samsungctl
config = samsungctl.Config.load('path/file')

with samsungctl.Remote(config) as remote:
    print(remote)
    print(remote.as_dict)
kdschlosser commented 5 years ago
import samsungctl
config = samsungctl.Config.load('path/file')

with samsungctl.Remote(config) as remote:
    for source in remote.sources:
        print(source.name, source.label, source.is_active)
        if source.name == 'HDMI1':
            source.activate()

        for channel in remote.channels:
            print(channel.name, channel.is_active)
kdschlosser commented 5 years ago

I have not hammered out the setting of the TV channels. maybe that is something you want to take on.

p3g4asus commented 5 years ago

The second code snippets you posted gives me an AttributeError and complains that remote has no channels attribute. However I can add the channel management if you think it can be useful.

kdschlosser commented 5 years ago

what does the first code block spit out???

samsung has no consistency with the UPNP. one year a function is under one service. and another year it is under a completely different service. so I need to see the structures that were printed out form the first code block.

p3g4asus commented 5 years ago

Here it is.

{
    'services': [{
        'manufacturerURL': 'http://www.samsung.com',
        'modelName': 'UE55H6400',
        'methods': [{
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'BrowserMode',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetCurrentBrowserMode'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'CurrentProgInfoURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetCurrentProgramInformationURL'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'SpeakerLayout',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetCurrentHTSSpeakerLayout'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'Source',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'ID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'UiID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'SetMainTVSource'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'SoundEffect',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SetHTSSoundEffect'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'APInformation',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetAPInformation'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'BrowserURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetCurrentBrowserURL'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ExtSourceViewURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'Source',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'ID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'ForcedFlag',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Normal', 'Forced', 'ADOff']
            }, {
                'default_value': None,
                'name': 'DRMType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'StartExtSourceView'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'RecordChannel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'RecordChannel2',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetRecordChannel'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ProgramName',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetACRCurrentProgramName'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'AvailableActions',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetAvailableActions'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'UID',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'DeleteSchedule'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ConflictRemindInfo',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ConflictRemindInfoURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'ReservationType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Manual', 'Program']
            }, {
                'default_value': None,
                'name': 'RemindInfo',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'ChangeSchedule'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'UID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'PlayRecordedItem'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'SecondTVURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'AntennaMode',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'ChannelListType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'SatelliteID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'name': 'ForcedFlag',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Normal', 'Forced', 'ADOff']
            }, {
                'default_value': None,
                'name': 'DRMType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'StartSecondTVView'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'AllSpeakerDistance',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SetHTSAllSpeakerDistance'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'CurrentExternalSource',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'ID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'CurrentMBRActivityIndex',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'params': [],
            'name': 'GetCurrentExternalSource'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'MaxDistance',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'AllSpeakerDistance',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetHTSAllSpeakerDistance'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'StartInstantRecording'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ChannelName',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetACRCurrentChannelName'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'AntennaMode',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'SetAntennaMode'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'SoundEffect',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'SoundEffectList',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetHTSSoundEffect'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'SpeakerChannel',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'SpeakerLFE',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'params': [],
            'name': 'GetHTSSpeakerConfig'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'SourceList',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetSourceList'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'MBRDongleStatus',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['Enable', 'Disable']
            }],
            'params': [],
            'name': 'GetMBRDongleStatus'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ScheduleListURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetScheduleListURL'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'ChannelListType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'SatelliteID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SetMainTVChannel'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'ActivityIndex',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'MBRDevice',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'name': 'MBRIRKey',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SendMBRIRKey'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ConflictRemindInfo',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ConflictRemindInfoURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'ReservationType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Manual', 'Program']
            }, {
                'default_value': None,
                'name': 'RemindInfo',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'AddSchedule'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'UID',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'DeleteRecordedItem'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'BannerInformation',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetBannerInformation'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'AllSpeakerLevel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SetHTSAllSpeakerLevel'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'ViewURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'StopView'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'StopRecord'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'DestoryGroupOwner'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'MaxLevel',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'AllSpeakerLevel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetHTSAllSpeakerLevel'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'Message',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetACRMessage'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'MBRDeviceList',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetMBRDeviceList'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'DTVInformation',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetDTVInformation'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'RecordDuration',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'SetRecordDuration'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'BrowserURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'RunBrowser'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'ChannelListVersion',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'SupportChannelList',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ChannelListURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'ChannelListType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'step': None,
                'name': 'SatelliteID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'params': [],
            'name': 'GetChannelListURL'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'BrowserCommand',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SendBrowserCommand'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'AllProgramInformationURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'AntennaMode',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'GetAllProgramInformationURL'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'DetailProgramInformation',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'AntennaMode',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'name': 'StartTime',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'GetDetailProgramInformation'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'FilteredProgramURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'Keyword',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'GetFilteredProgarmURL'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'CurrentChannel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetCurrentMainTVChannel'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'StopBrowser'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'CloneViewURL',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'name': 'ForcedFlag',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Normal', 'Forced', 'ADOff']
            }, {
                'default_value': None,
                'name': 'DRMType',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'StartCloneView'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Result',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'EnforceAKE'
        }],
        'icons': [],
        'serialNumber': '20100621',
        'UPC': '123456789012',
        'name': 'MainTVAgent2',
        'modelNumber': '1.0',
        'deviceType': 'urn:samsung.com:device:MainTVServer2:1',
        'deviceID': 'EXCJ645PSTBA6',
        'friendlyName': '[TV]Samsung LED55',
        'ProductCap': 'Y2013',
        'modelURL': 'http://www.samsung.com',
        'modelDescription': 'Samsung DTV MainTVServer2',
        'UDN': 'uuid:08583b00-008c-1000-817d-fcf136b64295',
        'manufacturer': 'Samsung Electronics'
    }, {
        'manufacturerURL': 'http://www.samsung.com/sec',
        'modelName': 'UE55H6400',
        'methods': [{
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'KeyCode',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'KeyDescription',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SendKeyCode'
        }],
        'icons': [],
        'serialNumber': '20090804RCR',
        'name': 'dial',
        'modelNumber': '1.0',
        'deviceType': 'urn:dial-multiscreen-org:device:dialreceiver:1',
        'deviceID': 'EXCJ645PSTBA6',
        'friendlyName': '[TV]Samsung LED55',
        'ProductCap': 'Resolution:1280X720,Y2014',
        'modelURL': 'http://www.samsung.com/sec',
        'modelDescription': 'Samsung TV NS',
        'UDN': 'uuid:068e7781-006e-1000-bbbf-f877b8a47bf1',
        'manufacturer': 'Samsung Electronics'
    }, {
        'manufacturerURL': 'http://www.samsung.com/sec',
        'modelDescription': 'Samsung TV DMR',
        'X_compatibleId': 'MS_DigitalMediaDeviceClass_DMR_V001',
        'methods': [{
            'ret_vals': [],
            'params': [{
                'default_value': 0,
                'step': None,
                'name': 'ConnectionID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'ConnectionComplete'
        }, {
            'ret_vals': [{
                'default_value': 0,
                'step': None,
                'name': 'ConnectionID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 0,
                'step': None,
                'name': 'AVTransportID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 0,
                'step': None,
                'name': 'RcsID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'params': [{
                'default_value': None,
                'name': 'RemoteProtocolInfo',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'name': 'PeerConnectionManager',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': 0,
                'step': None,
                'name': 'PeerConnectionID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Direction',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Input', 'Output']
            }],
            'name': 'PrepareForConnection'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Source',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'Sink',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetProtocolInfo'
        }, {
            'ret_vals': [{
                'default_value': '0',
                'name': 'ConnectionIDs',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [],
            'name': 'GetCurrentConnectionIDs'
        }, {
            'ret_vals': [{
                'default_value': 0,
                'step': None,
                'name': 'RcsID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 0,
                'step': None,
                'name': 'AVTransportID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'ProtocolInfo',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'PeerConnectionManager',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': 0,
                'step': None,
                'name': 'PeerConnectionID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Direction',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['Input', 'Output']
            }, {
                'default_value': None,
                'name': 'Status',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['OK', 'ContentFormatMismatch', 'InsufficientBandwidth', 'UnreliableChannel', 'Unknown']
            }],
            'params': [{
                'default_value': 0,
                'step': None,
                'name': 'ConnectionID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetCurrentConnectionInfo'
        }],
        'icons': [{
            'width': 48,
            'depth': 24,
            'name': 'icon_SML_png',
            'url': 'http://192.168.25.32:7676/dmr/icon_SML.png',
            'mime_type': None,
            'height': 48
        }, {
            'width': 120,
            'depth': 24,
            'name': 'icon_LRG_png',
            'url': 'http://192.168.25.32:7676/dmr/icon_LRG.png',
            'mime_type': None,
            'height': 120
        }, {
            'width': 48,
            'depth': 24,
            'name': 'icon_SML_jpg',
            'url': 'http://192.168.25.32:7676/dmr/icon_SML.jpg',
            'mime_type': None,
            'height': 48
        }, {
            'width': 120,
            'depth': 24,
            'name': 'icon_LRG_jpg',
            'url': 'http://192.168.25.32:7676/dmr/icon_LRG.jpg',
            'mime_type': None,
            'height': 120
        }],
        'X_hardwareId': 'VEN_0105&DEV_VD0001',
        'serialNumber': '20110517DMR',
        'modelNumber': 'AllShare1.0',
        'modelName': 'UE55H6400',
        'deviceType': 'urn:schemas-upnp-org:device:MediaRenderer:1',
        'deviceID': 'EXCJ645PSTBA6',
        'friendlyName': '[TV]Samsung LED55',
        'ProductCap': 'Y2014,WebURIPlayable,SeekTRACK_NR,NavigateInPause,ScreenMirroringP2PMAC=fe:f1:36:b6:42:95',
        'modelURL': 'http://www.samsung.com/sec',
        'X_DLNADOC': 'DMR-1.50',
        'UDN': 'uuid:08f0d182-0096-1000-bf66-f877b8a47bf1',
        'X_deviceCategory': 'Display.TV.LCD Multimedia.DMR',
        'manufacturer': 'Samsung Electronics',
        'name': 'ConnectionManager'
    }, {
        'manufacturerURL': 'http://www.samsung.com/sec',
        'modelName': 'UE55H6400',
        'methods': [{
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'KeyCode',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'KeyDescription',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SendKeyCode'
        }],
        'icons': [],
        'serialNumber': '20090804RCR',
        'name': 'MultiScreenService',
        'modelNumber': '1.0',
        'deviceType': 'urn:samsung.com:device:RemoteControlReceiver:1',
        'deviceID': 'EXCJ645PSTBA6',
        'friendlyName': '[TV]Samsung LED55',
        'ProductCap': 'Resolution:1920X1080,ImageZoom,ImageRotate,Y2014,ENC',
        'modelURL': 'http://www.samsung.com/sec',
        'modelDescription': 'Samsung TV RCR',
        'UDN': 'uuid:068e7780-006e-1000-bc6f-f877b8a47bf1',
        'manufacturer': 'Samsung Electronics'
    }, {
        'manufacturerURL': 'http://www.samsung.com/sec',
        'modelDescription': 'Samsung TV DMR',
        'X_compatibleId': 'MS_DigitalMediaDeviceClass_DMR_V001',
        'methods': [{
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'NextURI',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'name': 'NextURIMetaData',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SetNextAVTransportURI'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': '1',
                'name': 'Speed',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'Play'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'Pause'
        }, {
            'ret_vals': [{
                'default_value': 0,
                'step': 1,
                'name': 'Track',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 4294967295 L
            }, {
                'default_value': '00:00:00',
                'name': 'TrackDuration',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'TrackMetaData',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'TrackURI',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': '00:00:00',
                'name': 'RelTime',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': '00:00:00',
                'name': 'AbsTime',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': 2147483647,
                'step': None,
                'name': 'RelCount',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 2147483647,
                'step': None,
                'name': 'AbsCount',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetPositionInfo'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 'ON',
                'name': 'AutoSlideShowMode',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['ON', 'OFF']
            }],
            'name': 'X_SetAutoSlideShowMode'
        }, {
            'ret_vals': [{
                'default_value': 0,
                'step': None,
                'name': 'NrTracks',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 4294967295 L
            }, {
                'default_value': '00:00:00',
                'name': 'MediaDuration',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'CurrentURI',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'CurrentURIMetaData',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'NextURI',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'NextURIMetaData',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': 'NONE',
                'name': 'PlayMedium',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['NONE', 'NETWORK']
            }, {
                'default_value': 'NOT_IMPLEMENTED',
                'name': 'RecordMedium',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['NOT_IMPLEMENTED']
            }, {
                'default_value': 'NOT_IMPLEMENTED',
                'name': 'WriteStatus',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['NOT_IMPLEMENTED']
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetMediaInfo'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'TrackSize',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'RelByte',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'AbsByte',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'X_DLNA_GetBytePositionInfo'
        }, {
            'ret_vals': [{
                'default_value': 'NO_MEDIA_PRESENT',
                'name': 'CurrentTransportState',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['STOPPED', 'PAUSED_PLAYBACK', 'PLAYING', 'TRANSITIONING', 'NO_MEDIA_PRESENT']
            }, {
                'default_value': 'OK',
                'name': 'CurrentTransportStatus',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['OK', 'ERROR_OCCURRED']
            }, {
                'default_value': '1',
                'name': 'CurrentSpeed',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetTransportInfo'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'Stop'
        }, {
            'ret_vals': [{
                'default_value': 'NETWORK',
                'name': 'PlayMedia',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': 'NOT_IMPLEMENTED',
                'name': 'RecMedia',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': 'NOT_IMPLEMENTED',
                'name': 'RecQualityModes',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetDeviceCapabilities'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'Next'
        }, {
            'ret_vals': [{
                'default_value': 'NORMAL',
                'name': 'PlayMode',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['NORMAL']
            }, {
                'default_value': 'NOT_IMPLEMENTED',
                'name': 'RecQualityMode',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': ['NOT_IMPLEMENTED']
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetTransportSettings'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'CurrentURI',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }, {
                'default_value': None,
                'name': 'CurrentURIMetaData',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'SetAVTransportURI'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 'NORMAL',
                'name': 'NewPlayMode',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['NORMAL']
            }],
            'name': 'SetPlayMode'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'StoppedReason',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }, {
                'default_value': None,
                'name': 'StoppedReasonData',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'X_GetStoppedReason'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 'ON',
                'name': 'SlideShowEffectHint',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['ON', 'OFF']
            }],
            'name': 'X_SetSlideShowEffectHint'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 'REL_TIME',
                'name': 'Unit',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['TRACK_NR', 'REL_TIME', 'ABS_TIME', 'ABS_COUNT', 'REL_COUNT', 'X_DLNA_REL_BYTE', 'FRAME']
            }, {
                'default_value': None,
                'name': 'Target',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'Seek'
        }, {
            'ret_vals': [{
                'default_value': None,
                'name': 'Actions',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetCurrentTransportActions'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'Previous'
        }],
        'icons': [{
            'width': 48,
            'depth': 24,
            'name': 'icon_SML_png',
            'url': 'http://192.168.25.32:7676/dmr/icon_SML.png',
            'mime_type': None,
            'height': 48
        }, {
            'width': 120,
            'depth': 24,
            'name': 'icon_LRG_png',
            'url': 'http://192.168.25.32:7676/dmr/icon_LRG.png',
            'mime_type': None,
            'height': 120
        }, {
            'width': 48,
            'depth': 24,
            'name': 'icon_SML_jpg',
            'url': 'http://192.168.25.32:7676/dmr/icon_SML.jpg',
            'mime_type': None,
            'height': 48
        }, {
            'width': 120,
            'depth': 24,
            'name': 'icon_LRG_jpg',
            'url': 'http://192.168.25.32:7676/dmr/icon_LRG.jpg',
            'mime_type': None,
            'height': 120
        }],
        'X_hardwareId': 'VEN_0105&DEV_VD0001',
        'serialNumber': '20110517DMR',
        'modelNumber': 'AllShare1.0',
        'modelName': 'UE55H6400',
        'deviceType': 'urn:schemas-upnp-org:device:MediaRenderer:1',
        'deviceID': 'EXCJ645PSTBA6',
        'friendlyName': '[TV]Samsung LED55',
        'ProductCap': 'Y2014,WebURIPlayable,SeekTRACK_NR,NavigateInPause,ScreenMirroringP2PMAC=fe:f1:36:b6:42:95',
        'modelURL': 'http://www.samsung.com/sec',
        'X_DLNADOC': 'DMR-1.50',
        'UDN': 'uuid:08f0d182-0096-1000-bf66-f877b8a47bf1',
        'X_deviceCategory': 'Display.TV.LCD Multimedia.DMR',
        'manufacturer': 'Samsung Electronics',
        'name': 'AVTransport'
    }, {
        'manufacturerURL': 'http://www.samsung.com/sec',
        'modelDescription': 'Samsung TV DMR',
        'X_compatibleId': 'MS_DigitalMediaDeviceClass_DMR_V001',
        'methods': [{
            'ret_vals': [{
                'default_value': None,
                'name': 'CurrentMute',
                'data_type': ( < type 'bool' > , ),
                'returned_values': [False, True]
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Master']
            }],
            'name': 'GetMute'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'PresetName',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['FactoryDefaults']
            }],
            'name': 'SelectPreset'
        }, {
            'ret_vals': [{
                'default_value': None,
                'step': 1,
                'name': 'CurrentVolume',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Master']
            }],
            'name': 'GetVolume'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Master']
            }, {
                'default_value': None,
                'name': 'DesiredMute',
                'data_type': ( < type 'bool' > , ),
                'allowed_values': [False, True]
            }],
            'name': 'SetMute'
        }, {
            'ret_vals': [{
                'default_value': None,
                'step': 1,
                'name': 'CurrentContrast',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetContrast'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'step': 1,
                'name': 'DesiredSharpness',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'name': 'SetSharpness'
        }, {
            'ret_vals': [{
                'default_value': 0,
                'step': 1,
                'name': 'VideoPID',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 65535
            }, {
                'default_value': None,
                'name': 'VideoEncoding',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'X_GetVideoSelection'
        }, {
            'ret_vals': [{
                'default_value': None,
                'step': 1,
                'name': 'CurrentSharpness',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetSharpness'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 0,
                'step': 1,
                'name': 'AudioPID',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 65535
            }, {
                'default_value': None,
                'name': 'AudioEncoding',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'X_UpdateAudioSelection'
        }, {
            'ret_vals': [{
                'default_value': 'FactoryDefaults',
                'name': 'CurrentPresetNameList',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'ListPresets'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'step': 1,
                'name': 'DesiredBrightness',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'name': 'SetBrightness'
        }, {
            'ret_vals': [{
                'default_value': 0,
                'step': 1,
                'name': 'AudioPID',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 65535
            }, {
                'default_value': None,
                'name': 'AudioEncoding',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'returned_values': None
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'X_GetAudioSelection'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': 0,
                'step': 1,
                'name': 'VideoPID',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 65535
            }, {
                'default_value': None,
                'name': 'VideoEncoding',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': None
            }],
            'name': 'X_UpdateVideoSelection'
        }, {
            'ret_vals': [{
                'default_value': None,
                'step': 1,
                'name': 'CurrentBrightness',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }],
            'name': 'GetBrightness'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'step': 1,
                'name': 'DesiredContrast',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'name': 'SetContrast'
        }, {
            'ret_vals': [],
            'params': [{
                'default_value': None,
                'step': None,
                'name': 'InstanceID',
                'data_type': ( < type 'int' > , ),
                'min': None,
                'max': None
            }, {
                'default_value': None,
                'name': 'Channel',
                'data_type': ( < type 'str' > , < type 'unicode' > ),
                'allowed_values': ['Master']
            }, {
                'default_value': None,
                'step': 1,
                'name': 'DesiredVolume',
                'data_type': ( < type 'int' > , ),
                'min': 0,
                'max': 100
            }],
            'name': 'SetVolume'
        }],
        'icons': [{
            'width': 48,
            'depth': 24,
            'name': 'icon_SML_png',
            'url': 'http://192.168.25.32:7676/dmr/icon_SML.png',
            'mime_type': None,
            'height': 48
        }, {
            'width': 120,
            'depth': 24,
            'name': 'icon_LRG_png',
            'url': 'http://192.168.25.32:7676/dmr/icon_LRG.png',
            'mime_type': None,
            'height': 120
        }, {
            'width': 48,
            'depth': 24,
            'name': 'icon_SML_jpg',
            'url': 'http://192.168.25.32:7676/dmr/icon_SML.jpg',
            'mime_type': None,
            'height': 48
        }, {
            'width': 120,
            'depth': 24,
            'name': 'icon_LRG_jpg',
            'url': 'http://192.168.25.32:7676/dmr/icon_LRG.jpg',
            'mime_type': None,
            'height': 120
        }],
        'X_hardwareId': 'VEN_0105&DEV_VD0001',
        'serialNumber': '20110517DMR',
        'modelNumber': 'AllShare1.0',
        'modelName': 'UE55H6400',
        'deviceType': 'urn:schemas-upnp-org:device:MediaRenderer:1',
        'deviceID': 'EXCJ645PSTBA6',
        'friendlyName': '[TV]Samsung LED55',
        'ProductCap': 'Y2014,WebURIPlayable,SeekTRACK_NR,NavigateInPause,ScreenMirroringP2PMAC=fe:f1:36:b6:42:95',
        'modelURL': 'http://www.samsung.com/sec',
        'X_DLNADOC': 'DMR-1.50',
        'UDN': 'uuid:08f0d182-0096-1000-bf66-f877b8a47bf1',
        'X_deviceCategory': 'Display.TV.LCD Multimedia.DMR',
        'manufacturer': 'Samsung Electronics',
        'name': 'RenderingControl'
    }],
    'devices': []
}