kdschlosser / samsungctl

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

Impossible to send command to TV #40

Closed andreas-bulling closed 5 years ago

andreas-bulling commented 5 years ago

Hi,

thanks a lot for this updated library. I am playing around with it to hopefully be able to eventually integrate it with HA.

However, I can't send any commands to my Samsung TV (UE50J6250, firmware 1530). I am using websocket and tried both port 8001 and 8002 but nothing happens. I also don't see the authentication popup which suggests that the connection is actually not established properly.

Anything I can do to debug this / help with to make it easier for you to figure out why it's not working?

p3g4asus commented 5 years ago

@kdschlosser Today I debugged UPNP_device and found (and solved) 3 issues. I will report here later. Sorry but I fond them at 1.30 am and have no time to answer (too late !! have to sleep :-)) and now it's 8:15 am here in Italy and I am at work.

kdschlosser commented 5 years ago

@p3g4asus

no worries m8. thanks for helping out with th UPNP_Device Library. once the issues with it get hammered out it is going to be a pretty powerful tool to have. The UPNP_Device library is what I am using as the backbone for the UPNP end of things in samsungctl.

kdschlosser commented 5 years ago

I updated the master branch if anyone wants to have a look see.

p3g4asus commented 5 years ago

Here I am. As I sayd I found 3 issues in UPNP_device_develop 1) sock = send_to(local_address) in di discovery.py do(local_address, target_ips) function can throw exceptions if it tryes to send packets to an address that is not in the current subnet range. In my setup this happens several times. So I added a try...except block so that the thread is removed from the list as it should be. 2) Path and filename determination is buggy in upnp_class.py and service.py. it can lead to errors when the line

path = loc.replace('http://', '').split('/', 1)[-1]

generates a path that does not contain '/' (for example when loc='http://192.168.25.32:7676/smp_7_') I fixed the issue with this snippet:

path = loc.replace('http://', '').split('/', 1)[-1]
if '/' in path:
    path, file_name = path.rsplit('/', 1)
    path = os.path.join(dump, path)
else:
    file_name = path
    path = dump
if not os.path.exists(path):
    os.makedirs(path)

3) In Windows file systems in a folder named y you cannot have at the same time a folder named x and a file named x. This with your original library could happen. In my setup it tryed to create inside my dump folder the file smp_2_\smp_3_ after having created the file smp_2_ and so it raised a file not found exception because os.makedirs fails. So I appended the .xml extension to the files created.

Attached you will find the patched UPNP_device_develop zipped so that it should be easy for you to view the changes using kdiff, winmerge, beyond compare or whatever you prefer. I will attach also the output of running the test in my setup. Some empty files are created by service.py (don't know if this is correct), while upnp_class.py creates not empty files. No error or exception is thrown now. Thank you @kdschlosser for your work. As for the test of the last commit in the H_J branch, I will do it ASAP.

Please see next message about UPNP_device_develop for updated files

p3g4asus commented 5 years ago

@kdschlosser I see you updated the master branch, so I will test that. Yesterday when testing the H_J branch I thought that will be geat to have a caching mechanism inside samsungctl for H_J TVs. It should by a set of files inside a cache folder placed inside Appdata or something like that. When one issues a command with --method encrypted you look in the cache folder. If you find inside a file named with deviceId you take ctx and session id from there without asking for pin. Otherwise you make the whole pairing process saving ctx and session paramethers in a json file named with deviceId and placing it in the cache dir. There should be also a command line switch to specify the device id and command line switch to ignore the cache file if present and force to re-do the pairing process. This is just an idea of improvement that I had. Implement it only if you like and think it can be any good. Thanks again

p3g4asus commented 5 years ago

@kdschlosser Another fix for UPNP_device_develop Now the service files are not empty. There was another issue. Attaching Cheers output.zip UPNP_Device.zip

raydog153 commented 5 years ago

@p3g4asus I get error with the UPNP code you have....

Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 102, in _get_module_details
    loader = get_loader(mod_name)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 462, in get_loader
    return find_loader(fullname)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 472, in find_loader
    for importer in iter_importers(fullname):
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 428, in iter_importers
    __import__(pkg)
  File "test.py", line 19, in <module>
    for device in UPNP_Device.discover(10, logging.DEBUG, TV_IP_ADDRESS):
  File "/usr/local/lib/python2.7/site-packages/UPNP_Device/__init__.py", line 22, in discover
    yield UPNPObject(addr, locations)
  File "/usr/local/lib/python2.7/site-packages/UPNP_Device/instance_singleton.py", line 11, in __call__
    super(InstanceSingleton, cls).__call__(id, *args)
  File "/usr/local/lib/python2.7/site-packages/UPNP_Device/upnp_class.py", line 44, in __init__
    control_url = service.find('controlURL').text.replace(url, '')
AttributeError: 'NoneType' object has no attribute 'replace'
p3g4asus commented 5 years ago

@raydog153 Please try to replace the line of upnp_class.py

control_url = service.find('controlURL').text.replace(url, '')

with

try:
    control_url = service.find('controlURL').text.replace(url, '')
except:
    control_url = ''
raydog153 commented 5 years ago

@p3g4asus Thanks, I remember fixing that myself as I hit several of these bugs you fixed when I was trying this out earlier. I also hit issues with other UPNP devices on my network and issues when running with multiple adapters I think.

How are you running this thou? I cannot get dump of UPNP data or figure out how....seems it is referencing something in my site-packages. Also I think some of my problems may be due to python version I am using, what version should I be using that is most compatible with current code?

raydog153 commented 5 years ago

@p3g4asus What firmware is your TV? I have no port 800x working but was hoping that maybe I can enable something in service/debug menu or that I can use some other port open once the bugs are worked out...hence why I am still trying to debug this further.

p3g4asus commented 5 years ago

@raydog153 I am running it with python 2.7.12. I don't know the firmware version. I am not in front of the TV screen, so I cannot read it. As for running the above UPNP_device develop, probably the most convenient way to run it now that is still in development is to extract the zip in the folder x of your PC. You will get the folder x/UPNP_device. Copy x/UPNP_device/__main__.py to x/__main__.py. Navigate with the console to folder x and from there issue the command

python __main__.py -vvvv --dump x/output 192.168.25.1

192.168.25.1 is the IP of your TV. The folder x/output must exist. You should get a folder structure and xml files inside x/output Hope this helps

raydog153 commented 5 years ago

Thank, that helps, but hangs on me and also looks to be using other IP than the one I entered:

rboutotte@MacBook-Pro-2:~/samsungtv/UPNP2/UPNP_Device$ python __main__.py -vvvv --dump ./dump 172.16.16.57
Finding UPNP Devices please wait..
error:ray
local_address: 127.0.0.1

local_address: 127.94.0.1

SSDP: 239.255.255.250
M-SEARCH * HTTP/1.1
ST: upnp:rootdevice
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900
MX: 1
Content-Length: 0

local_address: 127.94.0.2

local_address: 172.16.16.57

SSDP: 239.255.255.250
M-SEARCH * HTTP/1.1
ST: upnp:rootdevice
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900
MX: 1
Content-Length: 0

SSDP: 239.255.255.250
M-SEARCH * HTTP/1.1
ST: upnp:rootdevice
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900
MX: 1
Content-Length: 0

SSDP: 239.255.255.250
M-SEARCH * HTTP/1.1
ST: upnp:rootdevice
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900
MX: 1
Content-Length: 0

SSDP: 239.255.255.250
M-SEARCH * HTTP/1.1
ST: upnp:rootdevice
MAN: "ssdp:discover"
HOST: 239.255.255.250:1900
MX: 1
Content-Length: 0

SSDP: 172.16.16.114 found LOCATION: http://172.16.16.114:8008/ssdp/device-desc.xml
SSDP: 172.16.16.114 found ST: upnp:rootdevice
SSDP: 172.16.16.114 - > HTTP/1.1 200 OK
CACHE-CONTROL: max-age=1800
DATE: Tue, 22 Jan 2019 08:55:46 G1T
EXT:
LOCATION: http://172.16.16.114:8008/ssdp/device-desc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 90e87cae-d3af-559d-ad76-d9566abcb5eb
SERVER: QuickPlay/1.0.0.0 UPnP/1.0 AirServer/1.0.0
X-User-Agent: redsonic
ST: upnp:rootdevice
USN: uuid:90e87cae-d3af-559d-ad76-d9566abcb5eb::upnp:rootdevice
BOOTID.UPNP.ORG: 3
CONFIGID.UPNP.ORG: 1

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/rboutotte/samsungtv/UPNP2/UPNP_Device/UPNP_Device/discover.py", line 224, in found_thread
    found[addr[0]].add(packet['LOCATION'])
KeyError: '172.16.16.114'
raydog153 commented 5 years ago

I think I am using wrong IP, I have several UPNP devices I may have grabbed wrong IP from discovery. Will have to debug further when I get the chance.

kdschlosser commented 5 years ago

nope there is still a problem with it. I will take a look and see what changes you mad. You probably only made the changes in a single place when they needed to be made in more then one.

EDIT scratch that. everything printed out OK.

kdschlosser commented 5 years ago

Ohhhh you are going to love this. you are going to be able to get things like what the current source is. what thee TV channel is.

when you run the UPNP_device it prints out a whole mess of information. if you redirect that to a file that can help me as well.

upnp_device --dump "path/to/save/files" > "path/to/save/files/output.txt"
p3g4asus commented 5 years ago

I think the problem is on line 218 of discovery.py: if 'LOCATION' not in packet: should be changed to if 'LOCATION' not in packet or addr[0]!=ip: Do you agree?

raydog153 commented 5 years ago

What about line 190 of discover.py:

                if addr[0] not in found:

to

                if addr[0] in found:

No longer hangs when I change this...

p3g4asus commented 5 years ago

@raydog153 I don't think that is the proper way to solve. I suspect that with your change it will not work properly anymore as it will miss some devices

raydog153 commented 5 years ago

Thank....I added your other fix and reverted mine and that seems to fix this. This is actually from a UN40J5200 model that I have access too that is almost identical to mine (I'm not home so do not have access to my model till evening). This model only has ports 7676 and 8080 open, mine has a few more.

Here is the dump (output.txt is stdout): dump.zip

p3g4asus commented 5 years ago

From the dump you posted I think that you could control your TV using SDP actions. But @kdschlosser is needed to fully interpret the dump

raydog153 commented 5 years ago

Yup...hence why I am still trying to debug. I can do screen mirror to my TV, and DLNA works, and has Smart Hub. The wake on lan feature added also works on my TV. The newer firmware's nix'd many of the open ports on these 2014/2015 models ... but since it use to work and I altering the code I can get pin screen to show up I am hopeful I'll this library will be useful.

raydog153 commented 5 years ago

@kdschlosser Here is dump and output of UN40H5203. I see mention of AllShare, MultiScreen, ScreenMirroringP2PMAC, have been able to control volume thru DLNA.

dump_UN40H5203.zip output.txt

raydog153 commented 5 years ago

@kdschlosser This is why I would like all the header info printed. While poking around I see the SDP header indicating application URL when invoking get on 'http://192.168.1.11:7676/smp_22_' which may help aid in debugging. It also shows the server being used.

screen shot 2019-01-22 at 7 28 57 pm
p3g4asus commented 5 years ago

@raydog153 @kdschlosser Those are some examples of running upnp_client with my TV based on the results of UPNP_device scan output. All the commands are running fine and report correct results.

>pip3 install async-upnp-client
>upnp-client --pprint call-action http://192.168.25.32:7676/smp_15_ RC/GetVolume InstanceID=0 Channel=Master
{
    "timestamp": 1548203391.915641,
    "service_id": "urn:upnp-org:serviceId:RenderingControl",
    "service_type": "urn:schemas-upnp-org:service:RenderingControl:1",
    "action": "GetVolume",
    "in_parameters": {
        "InstanceID": 0,
        "Channel": "Master"
    },
    "out_parameters": {
        "CurrentVolume": 33
    }
}
>upnp-client --pprint call-action http://192.168.25.32:7676/smp_15_ RC/SetMute InstanceID=0 Channel=Master DesiredMute=1
{
    "timestamp": 1548203525.0906825,
    "service_id": "urn:upnp-org:serviceId:RenderingControl",
    "service_type": "urn:schemas-upnp-org:service:RenderingControl:1",
    "action": "SetMute",
    "in_parameters": {
        "InstanceID": 0,
        "Channel": "Master",
        "DesiredMute": true
    },
    "out_parameters": {}
}
>upnp-client --pprint call-action http://192.168.25.32:7676/smp_15_ RC/SetMute InstanceID=0 Channel=Master DesiredMute=0
{
    "timestamp": 1548203543.459175,
    "service_id": "urn:upnp-org:serviceId:RenderingControl",
    "service_type": "urn:schemas-upnp-org:service:RenderingControl:1",
    "action": "SetMute",
    "in_parameters": {
        "InstanceID": 0,
        "Channel": "Master",
        "DesiredMute": false
    },
    "out_parameters": {}
}
>upnp-client --pprint call-action http://192.168.25.32:7676/smp_2_ MainTVAgent2/GetCurrentMainTVChannel
{
    "timestamp": 1548203756.981378,
    "service_id": "urn:samsung.com:serviceId:MainTVAgent2",
    "service_type": "urn:samsung.com:service:MainTVAgent2:1",
    "action": "GetCurrentMainTVChannel",
    "in_parameters": {},
    "out_parameters": {
        "Result": "OK",
        "CurrentChannel": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><Channel><ChType>DTV</ChType><MajorCh>1</MajorCh><MinorCh>65534</MinorCh><PTC>32</PTC><ProgNum>3401</ProgNum></Channel>"
    }
}
kdschlosser commented 5 years ago

OK I updated the UPNP_Device library. I am pretty sure I have the hanging issue solved. I made some changes in the discovery process that I hope will handle any issues.

I also fixed the off SCPDURL that Samsung uses. the lack of the extension specifically. There was also code that was unused that I removed from the EmbeddedDevice class.

There are some difference between how UPNP devices populate the SCPDURL XML node. some will provide the full URL while others will only provide the file name. I can swear I saw a device that provided only the filename and no path to it but a path was needed. I cannot remember what device did that. I am sure I will figure it out if i come across it again. but for the time being I removed the code that was dealing with that because it was causing other issues.

kdschlosser commented 5 years ago

I also added the CLI argument --execute

so if you do a printout of a device. You will see spots that state "Access Point" in the printout. you want that value to pass with the --execute.

if you specify -h or --help after --execute it will tell you what you need to pass for parameters.

raydog153 commented 5 years ago

So the discovery piece no longer hangs. Noticed that I still need to create the folder first prior to dump since root folder name passed in does not get created. Also cannot get the help working or figure out how to pass argument to execute command. Adding -h or --help after --execute yields same exact output.

Attempt to invoke execute:

rboutotte@MacBook-Pro-2:~/samsungtv/UPNP_Device$ python upnp_device --execute UPNPObject.RenderingControl.GetBrightness --help 172.16.16.55
Finding UPNP Devices please wait.......Service location = http://172.16.16.55:7676/smp_4_
.Service location = http://172.16.16.55:7676/smp_22_
Service location = http://172.16.16.55:7676/smp_12_
Service location = http://172.16.16.55:7676/smp_15_
.Service location = http://172.16.16.55:7676/smp_18_

Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/rboutotte/samsungtv/UPNP_Device/upnp_device/__main__.py", line 209, in <module>
    main()
  File "/Users/rboutotte/samsungtv/UPNP_Device/upnp_device/__main__.py", line 156, in main
    type=param.py_data_type,
AttributeError: 'UI4' object has no attribute 'py_data_type'

Folder issue:

  File "/usr/local/lib/python2.7/site-packages/UPNP_Device/discover.py", line 101, in convert_ssdp_response
    with open(os.path.join(dump, 'SSDP.log'), 'a') as f:
IOError: [Errno 2] No such file or directory: './dump/SSDP.log'
kdschlosser commented 5 years ago

I might have missed setting the python data type for a UPNP UI4 data type. let me go look

kdschlosser commented 5 years ago

I updated it once again. I know for 100% certainty that 100% of the data_type objects now have a data type associated with them. I also now have to make the folder if it does not exist

raydog153 commented 5 years ago

Hmmm.....then something else is going on. I get same issue, here is log of install for both python 2.7/3 and both failing to run for different reasons.

console.log

kdschlosser commented 5 years ago

for python 2 you are not using the new version of thee library.

the new version does not have print statements that print this out

Service location = http://192.168.1.11:7676/smp_4_

in python 3 there is no next method I forgot I have to change it to use the next function

kdschlosser commented 5 years ago

it should be fixed now.

kdschlosser commented 5 years ago

as far as python 2 goes. go into you site-packages folder. and make sure there is no egg file for UPNP_Device. I changed the zip-safe flag in thee setup file. there could be a bug in distutils where it doesn't remove the old egg file.

raydog153 commented 5 years ago

So I thought it was something like that, even tried uninstalling it. So I think it may have been due to being on OS with case sensitive file system, anyway past that issue and now it's hanging on me again and same for both versions. Can you tell I'm new to python :)

rboutotte@MacBook-Pro-2:~/samsungtv/UPNP_Device$ python3 upnp_device --execute UPNPObject.RenderingControl.GetBrightness --help 192.168.1.11
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/site-packages/UPNP_Device-0.1.0b0-py3.7.egg/UPNP_Device/discover.py", line 134, in do
    sock = send_to(local_address)
  File "/usr/local/lib/python3.7/site-packages/UPNP_Device-0.1.0b0-py3.7.egg/UPNP_Device/discover.py", line 130, in send_to
    sock.sendto(ssdp_packet.encode('utf-8'), (destination, 1900))
OSError: [Errno 49] Can't assign requested address

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/site-packages/UPNP_Device-0.1.0b0-py3.7.egg/UPNP_Device/discover.py", line 134, in do
    sock = send_to(local_address)
  File "/usr/local/lib/python3.7/site-packages/UPNP_Device-0.1.0b0-py3.7.egg/UPNP_Device/discover.py", line 130, in send_to
    sock.sendto(ssdp_packet.encode('utf-8'), (destination, 1900))
OSError: [Errno 49] Can't assign requested address
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/site-packages/UPNP_Device-0.1.0b0-py3.7.egg/UPNP_Device/discover.py", line 134, in do
    sock = send_to(local_address)
  File "/usr/local/lib/python3.7/site-packages/UPNP_Device-0.1.0b0-py3.7.egg/UPNP_Device/discover.py", line 130, in send_to
    sock.sendto(ssdp_packet.encode('utf-8'), (destination, 1900))
OSError: [Errno 49] Can't assign requested address

^CTraceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "upnp_device/__main__.py", line 209, in <module>
    main()
  File "upnp_device/__main__.py", line 100, in main
    event.wait(1)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 552, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 300, in wait
    gotit = waiter.acquire(True, timeout)
KeyboardInterrupt
Finding UPNP Devices please wait......
rboutotte@MacBook-Pro-2:~/samsungtv/UPNP_Device$
raydog153 commented 5 years ago

So I forget how I fixed this before, but it has something to do with the adapter_ips. Here is my adapter_ips: ['127.0.0.1', '127.94.0.1', '127.94.0.2', '192.168.1.42']

It should only use the non 127.x.x.x.

Adding in printout of adapter_ip I see this: IP(ip='127.0.0.1', network_prefix=8, nice_name='lo0') IP(ip='127.94.0.1', network_prefix=8, nice_name='lo0') IP(ip='127.94.0.2', network_prefix=8, nice_name='lo0') IP(ip='192.168.1.42', network_prefix=24, nice_name='en0')

So should 'lo*' (loopback) be excluded, or ones with network_prefix != 24?

raydog153 commented 5 years ago

Success at last...at least for getting the help command to work for execute:

rboutotte@MacBook-Pro-2:~/samsungtv/UPNP_Device$ python3 upnp_device --execute UPNPObject.RenderingControl.GetBrightness --help 192.168.1.11
Finding UPNP Devices please wait..........
usage: --execute RenderingControl.GetBrightness [-h] --InstanceID INSTANCEID

optional arguments:
  -h, --help            show this help message and exit
  --InstanceID INSTANCEID
rboutotte@MacBook-Pro-2:~/samsungtv/UPNP_Device$

For now changed line 59 in discover.py to:

            if isinstance(adapter_ip.ip, tuple) or adapter_ip.nice_name == 'lo0':
raydog153 commented 5 years ago

As well as success for executing:

rboutotte@MacBook-Pro-2:~/samsungtv/UPNP_Device$ python3 upnp_device --execute UPNPObject.RenderingControl.GetBrightness --InstanceID 0 192.168.1.11
Finding UPNP Devices please wait..........
CurrentBrightness: 32

This is great, gives me a starting point for getting some things working. Going to explore this a bit more.

This issue is also gotten too long, and wrong topic as we are in samsungctl but fixing issue under UPNP_Device repo. Should we get this closed (is original issue fixed)?

kdschlosser commented 5 years ago

ok cool i will add that fix. open an issue in the UPNP_Device repo.

kdschlosser commented 5 years ago

OK so this should be all set at this point. the original issue was not being able to connect with an encrypted websocket. and that has now been added to the library.